[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 21:07:17 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=67192
--- Comment #38 from Antaryami Pandia <xqb748 at motorola.com> 2011-09-21 21:07:17 PST ---
(In reply to comment #37)
> (From update of attachment 107142 [details])
> 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?
Actually focusController::setInitialFocus() it uses the focus direction to determine which node to focus, eg. the first focusable node or the last.
> >> Source/WebKit/gtk/webkit/webkitwebview.h:255
> >> + gboolean forward);
> >
> > Extra space between gboolean and forward [whitespace/declaration] [3]
>
> You need one more space here.
As per earlier review comments I should use enum in place of boolean.So please let me know if I should keep the boolean or use enum.
--
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