Bug 27171 - [Gtk] REGRESSION (r45440): fails at fast/events/frame-programmatic-focus.html
Summary: [Gtk] REGRESSION (r45440): fails at fast/events/frame-programmatic-focus.html
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2009-07-10 19:56 PDT by Jan Alonzo
Modified: 2009-07-13 03:12 PDT (History)
0 users

See Also:


Attachments
implement grab-focus (3.12 KB, patch)
2009-07-10 20:04 PDT, Jan Alonzo
gustavo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Alonzo 2009-07-10 19:56:31 PDT
Changeset: http://trac.webkit.org/changeset/45440

Test: fast/events/frame-programmatic-focus.html

Test diff:
 <input> focused
 <input> blurred
 main frame blurred
-iframe focused
 <input> in iframe focused
 <input> in frame blurred
 iframe blurred
-main frame focused
 <input> focused

The fix in http://trac.webkit.org/changeset/45470 is incomplete. focus-in and focus-out events seem to only happen when there's user interaction.

The fix is to implement grab_focus in the WebView as well so it will work when focus is set programmatically.

Patch coming...
Comment 1 Jan Alonzo 2009-07-10 20:04:39 PDT
Created attachment 32605 [details]
implement grab-focus
Comment 2 Gustavo Noronha (kov) 2009-07-12 04:40:57 PDT
Comment on attachment 32605 [details]
implement grab-focus

> -        core(webView)->focusController()->setActive(frame);
> -        core(webView)->focusController()->setFocused(true);
> +        focusController->setActive(true);
> +        focusController->setFocused(true);

The only change that makes me a bit nervous is going from frame to true here. I believe there might have been a reason to not set it unconditionally? r=me, but please either revert this specific change, or add a comment here on the bug so that we have a way of tracking this down.
Comment 3 Jan Alonzo 2009-07-13 03:12:21 PDT
(In reply to comment #2)
> (From update of attachment 32605 [details])
> > -        core(webView)->focusController()->setActive(frame);
> > -        core(webView)->focusController()->setFocused(true);
> > +        focusController->setActive(true);
> > +        focusController->setFocused(true);
> 
> The only change that makes me a bit nervous is going from frame to true here. I
> believe there might have been a reason to not set it unconditionally? r=me, but
> please either revert this specific change, or add a comment here on the bug so
> that we have a way of tracking this down.

Thanks. I reverted the change and landed it in http://trac.webkit.org/changeset/45802.