Changeset 104301 in webkit


Ignore:
Timestamp:
Jan 6, 2012 10:28:43 AM (12 years ago)
Author:
jer.noble@apple.com
Message:

REGRESSION (r90797): Full screen video HUD cannot be dragged horizontally
https://bugs.webkit.org/show_bug.cgi?id=75200

Reviewed by Eric Carlson.

Source/WebCore:

Test: fullscreen/video-controls-drag.html

The !important rules in fullscreenQuickTime.css are overriding the styles added by the
drag operation in MediaControlElements.cpp. Give the panel a "dragged" class in setPosition
(clearing it in resetPosition) that allows the !important rules to apply only when the
panel is not dragged.

  • css/fullscreenQuickTime.css:

(video:-webkit-full-screen::-webkit-media-controls-panel):
(video:-webkit-full-screen::-webkit-media-controls-panel:not(.dragged)):

  • html/shadow/MediaControlElements.cpp:

(WebCore::MediaControlPanelElement::setPosition):
(WebCore::MediaControlPanelElement::resetPosition):

LayoutTests:

  • fullscreen/video-controls-drag-expected.txt: Added.
  • fullscreen/video-controls-drag.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r104300 r104301  
     12012-01-05  Jer Noble  <jer.noble@apple.com>
     2
     3        REGRESSION (r90797): Full screen video HUD cannot be dragged horizontally
     4        https://bugs.webkit.org/show_bug.cgi?id=75200
     5
     6        Reviewed by Eric Carlson.
     7
     8        * fullscreen/video-controls-drag-expected.txt: Added.
     9        * fullscreen/video-controls-drag.html: Added.
     10
    1112012-01-06  Stephen White  <senorblanco@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r104290 r104301  
     12012-01-05  Jer Noble  <jer.noble@apple.com>
     2
     3        REGRESSION (r90797): Full screen video HUD cannot be dragged horizontally
     4        https://bugs.webkit.org/show_bug.cgi?id=75200
     5
     6        Reviewed by Eric Carlson.
     7
     8        Test: fullscreen/video-controls-drag.html
     9
     10        The !important rules in fullscreenQuickTime.css are overriding the styles added by the
     11        drag operation in MediaControlElements.cpp.  Give the panel a "dragged" class in setPosition
     12        (clearing it in resetPosition) that allows the !important rules to apply only when the
     13        panel is not dragged.
     14
     15        * css/fullscreenQuickTime.css:
     16        (video:-webkit-full-screen::-webkit-media-controls-panel):
     17        (video:-webkit-full-screen::-webkit-media-controls-panel:not(.dragged)):
     18        * html/shadow/MediaControlElements.cpp:
     19        (WebCore::MediaControlPanelElement::setPosition):
     20        (WebCore::MediaControlPanelElement::resetPosition):
     21
    1222012-01-05  Antti Koivisto  <antti@apple.com>
    223
  • trunk/Source/WebCore/css/fullscreenQuickTime.css

    r90797 r104301  
    3030    -webkit-appearance: none !important;
    3131
    32     bottom: 50px !important;
    33     left: 50% !important;
    34     margin-left: -220px !important;
    3532    padding: 12px 0 0 10px !important;
    3633    width: 430px !important;
     
    5754
    5855    -webkit-transition: opacity 0.3s linear !important;
     56}
     57
     58video:-webkit-full-screen::-webkit-media-controls-panel:not(.dragged) {
     59    bottom: 50px !important;
     60    left: 50% !important;
     61    margin-left: -220px !important;
    5962}
    6063
  • trunk/Source/WebCore/html/shadow/MediaControlElements.cpp

    r103486 r104301  
    3535#include "CSSStyleSelector.h"
    3636#include "CSSValueKeywords.h"
     37#include "DOMTokenList.h"
    3738#include "EventNames.h"
    3839#include "FloatConversion.h"
     
    186187    style->setProperty(CSSPropertyMarginLeft, 0.0, CSSPrimitiveValue::CSS_PX);
    187188    style->setProperty(CSSPropertyMarginTop, 0.0, CSSPrimitiveValue::CSS_PX);
     189
     190    ExceptionCode ignored;
     191    classList()->add("dragged", ignored);
    188192}
    189193
     
    196200    style->removeProperty(CSSPropertyMarginLeft);
    197201    style->removeProperty(CSSPropertyMarginTop);
     202
     203    ExceptionCode ignored;
     204    classList()->remove("dragged", ignored);
    198205}
    199206
Note: See TracChangeset for help on using the changeset viewer.