2011-06-10 Darin Adler <darin@apple.com>
authorDarin Adler <darin@apple.com>
Fri, 10 Jun 2011 17:05:31 +0000 (17:05 +0000)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Mon, 27 Jun 2011 17:29:29 +0000 (14:29 -0300)
commit0b569f36ebbdb7e11faaf4de013db6b62ec3387b
tree6d89f3012ebafbdb5edd70287336efd1a3eb016c
parentb160ef299ffc11d749268e8d81c2fb70c795d723
2011-06-10  Darin Adler  <darin@apple.com>

        Reviewed by Eric Carlson.

        REGRESSION: Fullscreen video controller can't be dragged
        https://bugs.webkit.org/show_bug.cgi?id=62462

        No regression test because we don't have machinery for testing the fullscreen
        mode. We may find a way to add this in the future.

        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlPanelElement::MediaControlPanelElement): Initialize new
        booleans related to dragging.
        (WebCore::MediaControlPanelElement::startDrag): Added. Starts drag if dragging
        is allowed and a drag isn't already in progress.
        (WebCore::MediaControlPanelElement::continueDrag): Added. Moves the window if
        dragging is already in progress.
        (WebCore::MediaControlPanelElement::endDrag): Added. Ends the capture that is
        done during the dragging process.
        (WebCore::MediaControlPanelElement::setPosition): Added. Positions the panel
        using explicit top/left.
        (WebCore::MediaControlPanelElement::resetPosition): Added. Removes the positioning
        done by setPosition.
        (WebCore::MediaControlPanelElement::defaultEventHandler): Added. Calls startDrag,
        continueDrag, and endDrag in response to mouse events.
        (WebCore::MediaControlPanelElement::setCanBeDragged): Added.
        * html/shadow/MediaControlElements.h: Added new function and data members
        as mentioned above.

        * html/shadow/MediaControlRootElement.cpp:
        (WebCore::MediaControlRootElement::enteredFullscreen): Call setCanBeDragged(true)
        so you can drag the panel while in fullscreen.
        (WebCore::MediaControlRootElement::exitedFullscreen): Call setCanBeDragged(false)
        so you can't drag the panel while not in fullscreen. Also call resetPosition so
        position changes from dragging don't affect the panel in other contexts.

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