Bug 38546

Summary: Node.focus() fails to move focus from subframe properly
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: FramesAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric, tonikitoo, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
test case
none
proposed fix
none
better fix adele: review+

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
platform/mac/accessibility/frame-with-title.html

-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
<rdar://problem/7971735>