[Webkit-unassigned] [Bug 19392] [Gtk] Enable WebInspector in the Gtk port

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 15 04:29:06 PDT 2008


------- Comment #9 from jmalonzo at gmail.com  2008-07-15 04:29 PDT -------
Hi Christian,

(In reply to comment #8)
> >+    /**
> >+    * WebKitWebSettings:enable-developer-extras:
> >+    *
> >+    * Whether developer extensions should be enabled.
> >+    *
> >+    * Since: 1.0.2
> >+    */
> >+    g_object_class_install_property(gobject_class,
> >+                                    PROP_ENABLE_DEVELOPER_EXTRAS,
> >+                                    g_param_spec_boolean(
> >+                                    "enable-developer-extras",
> >+                                    "Enable Developer Extras",
> >+                                    "Enables special extensions that help developers",
> >+                                    FALSE,
> >+                                    flags));
> That property name feels a little awkward. Would enable-debug do it as well?

Mac and Win call this "developer extras". Calling this enable-debug or
diverging for that matter would be confusing especially if we are going to use
the Mac and Win ports as our reference implementation.

> >+    /**
> >+     * WebKitWebView::create-inspector-web-view:
> >+     * @web_view: the object on which the signal is emitted
> >+     * @return: a newly allocated #WebKitWebView or %NULL
> >+     *
> >+     * Emitted when the creation of a new window for the Web Inspector
> >+     * is requested.  If this signal is handled the signal handler
> >+     * should return the newly created #WebKitWebView.
> >+     *
> >+     * The signal handlers should not try to deal with the reference
> >+     * count for the new #WebKitWebView. The widget to which the
> >+     * widget is added will handle that.
> >+     */
> > * create-inspector-web-view doesn't seem right. How about inspect-web-view
> > because isn't that what we're doing here?
> I tend to disagree. There is a web view being created, and the name should
> reflect that. 'inspect-web-view' looks like something that operates on an
> existing inspector. However I wonder if the name can be a little shorter, for
> instance would create-inspector be a good name? On the other hand, it might be
> less clear, not sure about that.

To me "inspect-web-view" means we are inspecting a/the web-view. I agree that
there is a web view being created, but that web view is "special" because
rather than displaying normal content like most web views, it displays
information about a web view's content. 

Gtk events, for example, means something happened (a widget was clicked,
toggled, about to be destroyed, etc..). We should do the same thing here (e.g.
a web view is about to be inspected, whatever). Creating an inspector is less
clear as by itself, an inspector is really not stand-alone but is associated
with/inspecting a web view.

Conceptually, there should be difference between a WebView and a WebInspector
(which is a web view + other things that developers care about).

> > Apart from that looks good. (Not sure if we should have a WebKitWebInspector
> > class though. Mac and win ports have it so maybe we should mimic one as well) 
> What is the purpose of a WebKitWebInspector class here? Right now you can load
> the inspector into an arbitrary web view, including a sub class. But that won't
> work if the inspector is a different class.
> I'd like to see an explanation of why we need another class.

I'm not sure about this either but one thing that comes to mind is testability
of the inspector. Perhaps when there's a use case we can add it or when we have
actual tests.


Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list