Commit d05b8a4d authored by jer.noble@apple.com's avatar jer.noble@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.

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.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9cf5929a
2012-01-05 Jer Noble <jer.noble@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 <senorblanco@chromium.org>
[Chromium] Remove fast/files/domurl-script-execution-context-crash.html
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
<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="full-screen-test.js"></script>
<script src="../media/media-controls.js"></script>
<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>
2012-01-05 Jer Noble <jer.noble@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 <antti@apple.com>
REGRESSION (r104060): fast/forms/textarea-metrics.html is failing
......@@ -29,9 +29,6 @@ video:-webkit-full-screen::-webkit-media-controls-panel {
-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 @@ video:-webkit-full-screen::-webkit-media-controls-panel {
-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;
......
......@@ -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 @@ void MediaControlPanelElement::setPosition(const LayoutPoint& position)
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 @@ void MediaControlPanelElement::resetPosition()
style->removeProperty(CSSPropertyTop);
style->removeProperty(CSSPropertyMarginLeft);
style->removeProperty(CSSPropertyMarginTop);
ExceptionCode ignored;
classList()->remove("dragged", ignored);
}
void MediaControlPanelElement::makeOpaque()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment