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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 7 21:12:02 PDT 2011


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





--- Comment #11 from Antaryami Pandia <xqb748 at motorola.com>  2011-09-07 21:12:03 PST ---
(In reply to comment #10)
> (From update of attachment 106552 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=106552&action=review
> 
> > Source/WebKit/gtk/tests/testwebview.c:390
> > +
> > +    gtk_widget_show_all(window);
> > +    g_signal_connect(window, "map-event",
> > +                     G_CALLBACK(map_event_cb), loop);
> > +    g_main_loop_run(loop);
> > +
> > +    webkit_web_view_load_uri(view, uri);
> > +    g_main_loop_run(loop);
> > +
> > +    webkit_web_view_set_initial_focus(view, true);
> > +    g_main_loop_run(loop);
> > +
> > +    g_free(uri);
> > +    gtk_widget_destroy(window);
> 
> Your test has no assertions!
> 
> > Source/WebKit/gtk/webkit/webkitwebview.cpp:4031
> > + * Set the initial focus element.
> 
> Even with this documentation, I'm still not sure what this API does or how it works. I think this could be exanded greatly here. Does GTK+ even have the concept of focus direction? What situations is this API useful?

The basic purpose of the API is to set the initial focus in the document.This is need for spatial navigation(keyboard navigation) feature.So with spatial navigation when when a page is loaded, user should be able see the initial position of focus without pressing tab/arrow key.As also mentioned in initial comments, this API is already present in other ports.

The test function doesn't have any assertion as its a pretty simple function that just create a window, view and sets the focus on the page loaded.Please let me know any potential place for assertion?

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