- Revision
- 104301
- Author
- jer.no...@apple.com
- Date
- 2012-01-06 10:28:43 -0800 (Fri, 06 Jan 2012)
Log 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.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (104300 => 104301)
--- trunk/LayoutTests/ChangeLog 2012-01-06 18:06:50 UTC (rev 104300)
+++ trunk/LayoutTests/ChangeLog 2012-01-06 18:28:43 UTC (rev 104301)
@@ -1,3 +1,13 @@
+2012-01-05 Jer Noble <jer.no...@apple.com>
+
+ REGRESSION (r90797): Full screen video HUD cannot be dragged horizontally
+ https://bugs.webkit.org/show_bug.cgi?id=75200
+
+ Reviewed by Eric Carlson.
+
+ * fullscreen/video-controls-drag-expected.txt: Added.
+ * fullscreen/video-controls-drag.html: Added.
+
2012-01-06 Stephen White <senorbla...@chromium.org>
[Chromium] Remove fast/files/domurl-script-execution-context-crash.html
Added: trunk/LayoutTests/fullscreen/video-controls-drag-expected.txt (0 => 104301)
--- trunk/LayoutTests/fullscreen/video-controls-drag-expected.txt (rev 0)
+++ trunk/LayoutTests/fullscreen/video-controls-drag-expected.txt 2012-01-06 18:28:43 UTC (rev 104301)
@@ -0,0 +1,7 @@
+This tests that the video element's controls are draggable in full screen. Press any key to continue.
+
+EVENT(webkitfullscreenchange)
+EXPECTED (endBox.left - startBox.left == '15') OK
+EXPECTED (endBox.top - startBox.top == '15') OK
+END OF TEST
+
Added: trunk/LayoutTests/fullscreen/video-controls-drag.html (0 => 104301)
--- trunk/LayoutTests/fullscreen/video-controls-drag.html (rev 0)
+++ trunk/LayoutTests/fullscreen/video-controls-drag.html 2012-01-06 18:28:43 UTC (rev 104301)
@@ -0,0 +1,41 @@
+<body>
+ <p>This tests that the video element's controls are draggable in full screen. Press any key to continue.</p>
+ <video id="video" width="300" controls></video>
+ <script src=""
+ <script src=""
+ <script>
+ var video = document.getElementById('video');
+ var shadowRoot;
+ var panel;
+ var startBox;
+ var endBox;
+
+ var fullscreenChanged = function(event)
+ {
+ if (callback)
+ callback(event)
+ };
+ waitForEvent(document, 'webkitfullscreenchange', function() {
+ if (window.internals) {
+ panel = mediaControlsElement(internals.shadowRoot(video).firstChild, '-webkit-media-controls-panel');
+ startBox = internals.boundingBox(panel);
+
+ eventSender.mouseMoveTo(startBox.left + 5, startBox.top + 5);
+ eventSender.mouseDown();
+
+ eventSender.mouseMoveTo(startBox.left + 20, startBox.top + 20);
+ eventSender.mouseUp();
+
+ endBox = internals.boundingBox(panel);
+
+ testExpected("endBox.left - startBox.left", 15);
+ testExpected("endBox.top - startBox.top", 15);
+ endTest();
+ }
+ else
+ logResult(false, "window.internals == undefined");
+ });
+
+ runWithKeyDown(function(){video.webkitRequestFullScreen()});
+ </script>
+</body>
Modified: trunk/Source/WebCore/ChangeLog (104300 => 104301)
--- trunk/Source/WebCore/ChangeLog 2012-01-06 18:06:50 UTC (rev 104300)
+++ trunk/Source/WebCore/ChangeLog 2012-01-06 18:28:43 UTC (rev 104301)
@@ -1,3 +1,24 @@
+2012-01-05 Jer Noble <jer.no...@apple.com>
+
+ REGRESSION (r90797): Full screen video HUD cannot be dragged horizontally
+ https://bugs.webkit.org/show_bug.cgi?id=75200
+
+ Reviewed by Eric Carlson.
+
+ 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):
+
2012-01-05 Antti Koivisto <an...@apple.com>
REGRESSION (r104060): fast/forms/textarea-metrics.html is failing
Modified: trunk/Source/WebCore/css/fullscreenQuickTime.css (104300 => 104301)
--- trunk/Source/WebCore/css/fullscreenQuickTime.css 2012-01-06 18:06:50 UTC (rev 104300)
+++ trunk/Source/WebCore/css/fullscreenQuickTime.css 2012-01-06 18:28:43 UTC (rev 104301)
@@ -29,9 +29,6 @@
-webkit-box-pack: end !important;
-webkit-appearance: none !important;
- bottom: 50px !important;
- left: 50% !important;
- margin-left: -220px !important;
padding: 12px 0 0 10px !important;
width: 430px !important;
height: 48px !important;
@@ -58,6 +55,12 @@
-webkit-transition: opacity 0.3s linear !important;
}
+video:-webkit-full-screen::-webkit-media-controls-panel:not(.dragged) {
+ bottom: 50px !important;
+ left: 50% !important;
+ margin-left: -220px !important;
+}
+
video:-webkit-animating-full-screen-transition::-webkit-media-controls-panel {
opacity: 0 ! important;
-webkit-transition: opacity 0 ! important;
Modified: trunk/Source/WebCore/html/shadow/MediaControlElements.cpp (104300 => 104301)
--- trunk/Source/WebCore/html/shadow/MediaControlElements.cpp 2012-01-06 18:06:50 UTC (rev 104300)
+++ trunk/Source/WebCore/html/shadow/MediaControlElements.cpp 2012-01-06 18:28:43 UTC (rev 104301)
@@ -34,6 +34,7 @@
#include "CSSStyleSelector.h"
#include "CSSValueKeywords.h"
+#include "DOMTokenList.h"
#include "EventNames.h"
#include "FloatConversion.h"
#include "Frame.h"
@@ -185,6 +186,9 @@
style->setProperty(CSSPropertyTop, top, CSSPrimitiveValue::CSS_PX);
style->setProperty(CSSPropertyMarginLeft, 0.0, CSSPrimitiveValue::CSS_PX);
style->setProperty(CSSPropertyMarginTop, 0.0, CSSPrimitiveValue::CSS_PX);
+
+ ExceptionCode ignored;
+ classList()->add("dragged", ignored);
}
void MediaControlPanelElement::resetPosition()
@@ -195,6 +199,9 @@
style->removeProperty(CSSPropertyTop);
style->removeProperty(CSSPropertyMarginLeft);
style->removeProperty(CSSPropertyMarginTop);
+
+ ExceptionCode ignored;
+ classList()->remove("dragged", ignored);
}
void MediaControlPanelElement::makeOpaque()