FKA: No way to get focus from DOM to shadow DOM components (Was: HTML5 media controls...
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 May 2016 21:01:32 +0000 (21:01 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 May 2016 21:01:32 +0000 (21:01 +0000)
commit43d356e109602c94fc450be777d77ff84ce8ff35
treec8ff59aebf38cb10a8b232e9d2ba3080f8bf2732
parent33c56bb1d06178481f93fc60dd801c074e0ebd24
FKA: No way to get focus from DOM to shadow DOM components (Was: HTML5 media controls not keyboard accessible)
https://bugs.webkit.org/show_bug.cgi?id=117857

Reviewed by Jer Noble.

Source/WebCore:

The bug was caused by hasCustomFocusLogic returning true on media elements.

Fix the bug by removing this function so that FocusController will walk into the shadow tree of media elements
to look for focusable elements. This will allow AT such as Voice Over to iterate through controls.

We don't seem to draw focus rings inside the media elements but that could be tweaked in a separate patch.

Test: media/tab-focus-inside-media-elements.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::hasCustomFocusLogic): Deleted.
* html/HTMLMediaElement.h:

LayoutTests:

Added a regression test for moving focus into media elements by pressing tab key.

* media/tab-focus-inside-media-elements-expected.txt: Added.
* media/tab-focus-inside-media-elements.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@200520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/media/tab-focus-inside-media-elements-expected.txt [new file with mode: 0644]
LayoutTests/media/tab-focus-inside-media-elements.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h