2011-05-28 Jer Noble <jer.noble@apple.com>
authorJer Noble <jer.noble@apple.com>
Sat, 28 May 2011 19:41:14 +0000 (19:41 +0000)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Fri, 3 Jun 2011 20:37:50 +0000 (17:37 -0300)
commit926adc655ba66b115e7eecdece03bd07ffdcf13e
tree2a04172a0c0190b52fe802a0f46a8716ad5ea596
parent15ad108273711698be9dd8cb2f059d19ebe96fdf
2011-05-28  Jer Noble  <jer.noble@apple.com>

        Reviewed by Maciej Stachowiak.

        Mouse clicks propagate outside full-screen media controls.
        https://bugs.webkit.org/show_bug.cgi?id=61689

        Mouse click events are propagating out of the media controls, so mouse click
        listeners registered on the video element are getting fired when the user
        clicks on media controller buttons.  By default, block propagation of click
        events from MediaControlElements by overriding preDispatchEventHandler, and
        convert all instances of defaultEventHandler -> preDispatchEventHandler.  Change
        all calls of event->setDefaultHandled() to event->stopPropagation().

        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlElement::preDispatchEventHandler): Added.  Block
            propagation of all mouse click events.
        (WebCore::MediaControlVolumeSliderContainerElement::preDispatchEventHandler):
            Renamed from setDefaultHandled.
        (WebCore::MediaControlMuteButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlPanelMuteButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlPlayButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlSeekButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlRewindButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlReturnToRealtimeButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlToggleClosedCaptionsButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlTimelineElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlVolumeSliderElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlFullscreenButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlFullscreenVolumeMinButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlFullscreenVolumeMaxButtonElement::preDispatchEventHandler): Ditto.
        * html/shadow/MediaControlElements.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@87622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/html/shadow/MediaControlElements.h