After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 628459 - attaching inspector breaks EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW
attaching inspector breaks EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
unspecified
Other Linux
: Normal major
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-09-01 00:55 UTC by Diego Escalante Urrelo (not reading bugmail)
Modified: 2010-12-06 16:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ephy-embed: clean up embed widget skeleton (6.74 KB, patch)
2010-11-06 23:28 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
ephy-embed: clean up embed widget skeleton (6.74 KB, patch)
2010-11-07 20:40 UTC, Diego Escalante Urrelo (not reading bugmail)
reviewed Details | Review
ephy-embed: fix inspect-web-view handler (2.46 KB, patch)
2010-11-07 20:40 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
ephy-embed: respect inspector last attach status (1.70 KB, patch)
2010-11-08 03:22 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
ephy-embed: clean up embed widget skeleton (8.98 KB, patch)
2010-12-06 15:50 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review

Description Diego Escalante Urrelo (not reading bugmail) 2010-09-01 00:55:47 UTC
A couple of extensions and likely other code relayed on this:

#define EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW(view) (EPHY_EMBED (gtk_widget_get_parent (gtk_widget_get_parent (GTK_WIDGET (view)))))

This should give the EphyEmbed, but when the inspector is attached it gives the GtkVPaned.

Perhaps -not sure GtkPaned allows- we should just have the GtkVPaned all the time and base EphyEmbed on that instead of GtkVBox (we have an internal vbox AFAICT anyway)?
Comment 1 Diego Escalante Urrelo (not reading bugmail) 2010-11-06 23:28:16 UTC
Created attachment 173973 [details] [review]
ephy-embed: clean up embed widget skeleton

The inspector embedding breaks some assumptions about the internal embed
widgetry, mainly breaking EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW macro.
The embed now has the main EphyWebView in a GtkPaned permanently.

Bug #628459
Comment 2 Diego Escalante Urrelo (not reading bugmail) 2010-11-06 23:35:25 UTC
This patch fixes the internal skeleton but seems to expose a crash. It seems some object is dying too early, maybe we should create the inspector everytime it's requested (btw there are continuity problems with our current code anyway)?

(epiphany:8690): Gtk-CRITICAL **: gtk_scrolled_window_add: assertion `child_widget == NULL' failed

Program received signal SIGSEGV, Segmentation fault.
0xb6fd53af in WebCore::InspectorFrontendHost::sendMessageToBackend(WTF::String const&) () from /home/diego/gnome/build/lib/libwebkitgtk-3.0.so.0
(gdb) bt
  • #0 WebCore::InspectorFrontendHost::sendMessageToBackend(WTF::String const&)
    from /home/diego/gnome/build/lib/libwebkitgtk-3.0.so.0
  • #1 WebCore::jsInspectorFrontendHostPrototypeFunctionSendMessageToBackend(JSC::ExecState*)
    from /home/diego/gnome/build/lib/libwebkitgtk-3.0.so.0
  • #2 ??
  • #3 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
    from /home/diego/gnome/build/lib/libwebkitgtk-3.0.so.0
  • #4 JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
    from /home/diego/gnome/build/lib/libwebkitgtk-3.0.so.0
  • #5 WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*)
    from /home/diego/gnome/build/lib/libwebkitgtk-3.0.so.0
  • #6 WebCore::EventTarget::fireEventListeners(WebCore::Event*, WebCore::EventTargetData*, WTF::Vector<WebCore::RegisteredEventListener, 1u>&)
    from /home/diego/gnome/build/lib/libwebkitgtk-3.0.so.0
  • #7 WebCore::EventTarget::fireEventListeners(WebCore::Event*)
    from /home/diego/gnome/build/lib/libwebkitgtk-3.0.so.0
  • #8 WebCore::Node::handleLocalEvents(WebCore::Event*)
    from /home/diego/gnome/build/lib/libwebkitgtk-3.0.so.0
  • #9 WebCore::Node::dispatchGenericEvent(WTF::PassRefPtr<WebCore::Event>)
    from /home/diego/gnome/build/lib/libwebkitgtk-3.0.so.0
  • #10 WebCore::Node::dispatchEvent(WTF::PassRefPtr<WebCore::Event>)
    from /home/diego/gnome/build/lib/libwebkitgtk-3.0.so.0
  • #11 WebCore::Node::dispatchMouseEvent(WTF::AtomicString const&, int, int, int, int, int, int, bool, bool, bool, bool, bool, WebCore::Node*, WTF::PassRefPtr<WebCore::Event>)
    from /home/diego/gnome/build/lib/libwebkitgtk-3.0.so.0
  • #12 WebCore::Node::dispatchMouseEvent(WebCore::PlatformMouseEvent const&, WTF::AtomicString const&, int, WebCore::Node*)
    from /home/diego/gnome/build/lib/libwebkitgtk-3.0.so.0
  • #13 WebCore::EventHandler::dispatchMouseEvent(WTF::AtomicString const&, WebCore::Node*, bool, int, WebCore::PlatformMouseEvent const&, bool)
    from /home/diego/gnome/build/lib/libwebkitgtk-3.0.so.0
  • #14 WebCore::EventHandler::handleMouseMoveEvent(WebCore::PlatformMouseEvent const&, WebCore::HitTestResult*)
    from /home/diego/gnome/build/lib/libwebkitgtk-3.0.so.0
  • #15 WebCore::EventHandler::mouseMoved(WebCore::PlatformMouseEvent const&)
    from /home/diego/gnome/build/lib/libwebkitgtk-3.0.so.0
  • #16 webkit_web_view_motion_event(_GtkWidget*, _GdkEventMotion*)
    from /home/diego/gnome/build/lib/libwebkitgtk-3.0.so.0
  • #17 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 85
  • #18 g_type_class_meta_marshal
    at gclosure.c line 877
  • #19 g_closure_invoke
    at gclosure.c line 766
  • #20 signal_emit_unlocked_R
    at gsignal.c line 3290
  • #21 g_signal_emit_valist
    at gsignal.c line 2993
  • #22 g_signal_emit
    at gsignal.c line 3040
  • #23 gtk_widget_event_internal
    at gtkwidget.c line 5911
  • #24 gtk_propagate_event
  • #25 gtk_main_do_event
    at gtkmain.c line 1753
  • #26 gdk_event_source_dispatch
    at gdkeventsource.c line 303
  • #27 g_main_dispatch
    at gmain.c line 2229
  • #28 g_main_context_dispatch
    at gmain.c line 2786
  • #29 g_main_context_iterate
    at gmain.c line 2864
  • #30 g_main_loop_run
    at gmain.c line 3072
  • #31 gtk_main
    at gtkmain.c line 1321
  • #32 main
    at ephy-main.c line 736

Comment 3 Diego Escalante Urrelo (not reading bugmail) 2010-11-07 08:36:30 UTC
Fixed the crash, it was a wrong assumption when creating the inspector web view.

Still behaves funky when the inspector is closed and reopened.
Comment 4 Diego Escalante Urrelo (not reading bugmail) 2010-11-07 20:40:14 UTC
Created attachment 174025 [details] [review]
ephy-embed: clean up embed widget skeleton

The inspector embedding breaks some assumptions about the internal embed
widgetry, mainly breaking EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW macro.
The embed now has the main EphyWebView in a GtkPaned permanently.

Bug #628459
Comment 5 Diego Escalante Urrelo (not reading bugmail) 2010-11-07 20:40:31 UTC
Created attachment 174026 [details] [review]
ephy-embed: fix inspect-web-view handler

It assumes that the scrolled window is always clean of children.

Bug #628459
Comment 6 Diego Escalante Urrelo (not reading bugmail) 2010-11-07 20:42:03 UTC
It seems the funky behaviour on open/close comes from webkitgtk. On our side, this two patches are correct and fix actual epiphany bugs.
Comment 7 Diego Escalante Urrelo (not reading bugmail) 2010-11-08 03:22:55 UTC
Created attachment 174038 [details] [review]
ephy-embed: respect inspector last attach status

Not sure if this should be in WebKitGTK or it's ok here...

Bug #628459
Comment 8 Gustavo Noronha (kov) 2010-11-09 11:33:29 UTC
Review of attachment 174025 [details] [review]:

I like the idea, and it looks right to me!
Comment 9 Diego Escalante Urrelo (not reading bugmail) 2010-12-06 15:50:16 UTC
Created attachment 175928 [details] [review]
ephy-embed: clean up embed widget skeleton

The inspector embedding breaks some assumptions about the internal embed
widgetry, mainly breaking EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW macro.
The embed now has the main EphyWebView in a GtkPaned permanently.

Bug #628459
Comment 10 Diego Escalante Urrelo (not reading bugmail) 2010-12-06 16:12:22 UTC
Attachment 175928 [details] pushed as a775451 - ephy-embed: clean up embed widget skeleton

I'm marking this as FIXED because the embed status is a different issue and requires hacking WebKitGTK+.