⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 106876 in webkit


Ignore:
Timestamp:
Feb 6, 2012, 4:52:02 PM (15 years ago)
Author:
jer.noble@apple.com
Message:

REGRESSION (r104303): Clicking inline video controls gives the video a focus ring
https://bugs.webkit.org/show_bug.cgi?id=77288

Reviewed by Darin Adler.

Source/WebCore:

Test: media/video-mouse-focus.html

Do not allow media elements to be focused by mouse click by overriding isMouseFocusable
and returning false.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::isMouseFocusable):

  • html/HTMLMediaElement.h:

LayoutTests:

  • media/video-mouse-focus-expected.txt: Added.
  • media/video-mouse-focus.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r106873 r106876  
     12012-02-03  Jer Noble  <jer.noble@apple.com>
     2
     3        REGRESSION (r104303): Clicking inline video controls gives the video a focus ring
     4        https://bugs.webkit.org/show_bug.cgi?id=77288
     5
     6        Reviewed by Darin Adler.
     7
     8        * media/video-mouse-focus-expected.txt: Added.
     9        * media/video-mouse-focus.html: Added.
     10
    1112012-02-06  Ehsan Akhgari  <ehsan.akhgari@gmail.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r106875 r106876  
     12012-02-03  Jer Noble  <jer.noble@apple.com>
     2
     3        REGRESSION (r104303): Clicking inline video controls gives the video a focus ring
     4        https://bugs.webkit.org/show_bug.cgi?id=77288
     5
     6        Reviewed by Darin Adler.
     7
     8        Test: media/video-mouse-focus.html
     9
     10        Do not allow media elements to be focused by mouse click by overriding isMouseFocusable
     11        and returning false.
     12
     13        * html/HTMLMediaElement.cpp:
     14        (WebCore::HTMLMediaElement::isMouseFocusable):
     15        * html/HTMLMediaElement.h:
     16
    1172012-02-06  Anders Carlsson  <andersca@apple.com>
    218
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r106769 r106876  
    314314    // If no controls specified, we should still be able to focus the element if it has tabIndex.
    315315    return controls() ||  HTMLElement::supportsFocus();
     316}
     317
     318bool HTMLMediaElement::isMouseFocusable() const
     319{
     320    return false;
    316321}
    317322
  • trunk/Source/WebCore/html/HTMLMediaElement.h

    r106769 r106876  
    337337
    338338    virtual bool supportsFocus() const;
     339    virtual bool isMouseFocusable() const;
    339340    virtual void attributeChanged(Attribute*) OVERRIDE;
    340341    virtual bool rendererIsNeeded(const NodeRenderingContext&);
Note: See TracChangeset for help on using the changeset viewer.