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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 27 18:52:34 PDT 2009


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





--- Comment #26 from Jan Alonzo <jmalonzo at gmail.com>  2009-10-27 18:52:34 PDT ---
(From update of attachment 41996)
> +    // 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.

> +/**
> + * webkit_web_inspector_inspect_coordinates:
> + * @web_inspector: the #WebKitWebInspector that will do the inspection
> + * @x: the X coordinate of the node to be inspected
> + * @y: the Y coordinate of the node to be inspected
> + *
> + * 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.

> + *
> + * Since: 1.1.17
> + */
> +void webkit_web_inspector_inspect_coordinates(WebKitWebInspector* webInspector, gdouble x, gdouble y)
> +{
> +    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.

> +    HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active);
> +    IntPoint documentPoint = view->windowToContents(IntPoint(static_cast<int>(x), static_cast<int>(y)));
> +    HitTestResult result(documentPoint);
> +

-- 
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