Changeset 200520 in webkit


Ignore:
Timestamp:
May 6, 2016 2:01:32 PM (8 years ago)
Author:
rniwa@webkit.org
Message:

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.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r200518 r200520  
     12016-05-06  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        FKA: No way to get focus from DOM to shadow DOM components (Was: HTML5 media controls not keyboard accessible)
     4        https://bugs.webkit.org/show_bug.cgi?id=117857
     5
     6        Reviewed by Jer Noble.
     7
     8        Added a regression test for moving focus into media elements by pressing tab key.
     9
     10        * media/tab-focus-inside-media-elements-expected.txt: Added.
     11        * media/tab-focus-inside-media-elements.html: Added.
     12
    1132016-05-06  Filip Pizlo  <fpizlo@apple.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r200519 r200520  
     12016-05-06  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        FKA: No way to get focus from DOM to shadow DOM components (Was: HTML5 media controls not keyboard accessible)
     4        https://bugs.webkit.org/show_bug.cgi?id=117857
     5
     6        Reviewed by Jer Noble.
     7
     8        The bug was caused by hasCustomFocusLogic returning true on media elements.
     9
     10        Fix the bug by removing this function so that FocusController will walk into the shadow tree of media elements
     11        to look for focusable elements. This will allow AT such as Voice Over to iterate through controls.
     12
     13        We don't seem to draw focus rings inside the media elements but that could be tweaked in a separate patch.
     14
     15        Test: media/tab-focus-inside-media-elements.html
     16
     17        * html/HTMLMediaElement.cpp:
     18        (WebCore::HTMLMediaElement::hasCustomFocusLogic): Deleted.
     19        * html/HTMLMediaElement.h:
     20
    1212016-05-06  Anders Carlsson  <andersca@apple.com>
    222
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r200516 r200520  
    660660#endif
    661661
    662 bool HTMLMediaElement::hasCustomFocusLogic() const
    663 {
    664     return true;
    665 }
    666 
    667662bool HTMLMediaElement::supportsFocus() const
    668663{
  • trunk/Source/WebCore/html/HTMLMediaElement.h

    r200490 r200520  
    497497    bool canHaveUserAgentShadowRoot() const final { return true; }
    498498
    499     bool hasCustomFocusLogic() const override;
    500499    bool supportsFocus() const override;
    501500    bool isMouseFocusable() const override;
Note: See TracChangeset for help on using the changeset viewer.