Bug 38546 - Node.focus() fails to move focus from subframe properly
Summary: Node.focus() fails to move focus from subframe properly
Alias: None
Product: WebKit
Classification: Unclassified
Component: Frames (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexey Proskuryakov
Keywords: InRadar
Depends on:
Reported: 2010-05-04 14:06 PDT by Alexey Proskuryakov
Modified: 2010-05-11 17:01 PDT (History)
4 users (show)

See Also:

test case (851 bytes, text/html)
2010-05-04 14:06 PDT, Alexey Proskuryakov
no flags Details
proposed fix (28.05 KB, patch)
2010-05-04 14:25 PDT, Alexey Proskuryakov
no flags Details | Formatted Diff | Diff
better fix (28.14 KB, patch)
2010-05-07 11:36 PDT, Alexey Proskuryakov
adele: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2010-05-04 14:06:02 PDT
Created attachment 55045 [details]
test case

If focus is in a subframe, and a script tries to take it to outer frame, this results in inconsistent focus state. A focused input isn't painted as such, but it keyboard input still goes into it. See attached test case.
Comment 1 Alexey Proskuryakov 2010-05-04 14:06:38 PDT
See also: bug 26824.
Comment 2 Alexey Proskuryakov 2010-05-04 14:25:44 PDT
Created attachment 55049 [details]
proposed fix
Comment 3 Alexey Proskuryakov 2010-05-05 11:26:51 PDT
Committed <http://trac.webkit.org/changeset/58830>.
Comment 4 WebKit Review Bot 2010-05-05 12:00:15 PDT
http://trac.webkit.org/changeset/58830 might have broken SnowLeopard Intel Release (Tests)
Comment 5 Alexey Proskuryakov 2010-05-05 12:11:49 PDT

-PASS accessibilityController.focusedElement.description is 'AXDescription: All Packages'
-PASS accessibilityController.focusedElement.description is 'AXDescription: packageListFrame'
+FAIL accessibilityController.focusedElement.description should be AXDescription: All Packages. Was AXDescription: .
+FAIL accessibilityController.focusedElement.description should be AXDescription: packageListFrame. Was AXDescription: .
Comment 6 Alexey Proskuryakov 2010-05-05 12:20:47 PDT
Rolled out in r58836. Calling focus() from JavaScript uses the same code path, and is somehow broken by this change.
Comment 7 Alexey Proskuryakov 2010-05-07 11:36:54 PDT
Created attachment 55400 [details]
better fix

Same idea, hopefully less nonsensical implementation.
Comment 8 Alexey Proskuryakov 2010-05-07 11:41:15 PDT
Committed <http://trac.webkit.org/changeset/58961>.
Comment 9 Alexey Proskuryakov 2010-05-11 17:01:55 PDT