[Webkit-unassigned] [Bug 67192] API to set initial focus in gtk webkit

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 21 09:30:35 PDT 2011


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





--- Comment #37 from Martin Robinson <mrobinson at webkit.org>  2011-09-21 09:30:35 PST ---
(From update of attachment 107142)
View in context: https://bugs.webkit.org/attachment.cgi?id=107142&action=review

> Source/WebKit/gtk/webkit/webkitwebview.cpp:4048
> +void webkit_web_view_set_initial_focus(WebKitWebView* webView, gboolean forward)
> +{
> +    g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
> +
> +    Page* page = core(webView);
> +    if (!page || !page->focusController())
> +        return;
> +
> +    page->focusController()->focusedOrMainFrame()->document()->setFocusedNode(0);
> +    page->focusController()->setInitialFocus(forward ? FocusDirectionForward : FocusDirectionBackward, 0);
> +}

Ah, this is a one-time thing...might want to update the documentation about that. What does this do exactly? Does it always focus the first node and then just set the focus direction?

>> Source/WebKit/gtk/webkit/webkitwebview.h:255
>> +                                                 gboolean              forward);
> 
> Extra space between gboolean and forward  [whitespace/declaration] [3]

You need one more space here.

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