[Webkit-unassigned] [Bug 22551] [GTK] API to start inspector for a WebView

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 28 04:04:38 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=22551





--- Comment #27 from Gustavo Noronha (kov) <gns at gnome.org>  2009-10-28 04:04:37 PDT ---
(In reply to comment #26)
> (From update of attachment 41996 [details])
> > +    // Make the Web Inspector work when running tests
> > +    if (g_file_test("WebCore/inspector/front-end/inspector.html", G_FILE_TEST_EXISTS)) {
> 
> I believe this will fail in srcdir != builddir scenario when running the tests.
> Ditto with localizedStrings.js.

It should work fine, I am testing in such a scenario - the same used by the
buildbot. The only thing that needs to happen is you need to be at the $srcdir
when running the tests (which is what happens in the bot). I would prefer doing
something more flexible, but have no idea of how.

> > + * Causes the Web Inspector to inspect the node that is located at the
> > + * given coordinates.
> 
> It would be nice to put a  note here where to get those coordinates from, and
> valid values of x & y.

Sounds fair. The most common way would be getting them from a mouse press
GdkEvent, I believe (coming from handling the button_press_event).

> > +    g_return_if_fail(WEBKIT_IS_WEB_INSPECTOR(webInspector));
> > +    g_return_if_fail((x >= 0) && (y >= 0));
> 
> I really think we should just make x & y guints so we don't need to do checks
> like these and the int casts below.
> The usage in the epiphany patch also casts the int to double unnecessarily.

I don't have a too strong opinion on this. I am just following what's in
GdkEvent, really. In Epiphany we have to cast back because the EphyEmbedEvent
object stores this information as int. I am assuming that is a historical
artifact from gecko times, and most API users would instead use GdkEvent
directly.

http://library.gnome.org/devel/gdk/unstable/gdk-Events.html#gdk-event-get-coords

Xan, do you want to untie this? =)

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



More information about the webkit-unassigned mailing list