Diff
Modified: trunk/LayoutTests/ChangeLog (118840 => 118841)
--- trunk/LayoutTests/ChangeLog 2012-05-29 22:24:47 UTC (rev 118840)
+++ trunk/LayoutTests/ChangeLog 2012-05-29 22:28:15 UTC (rev 118841)
@@ -1,3 +1,16 @@
+2012-05-29 Victor Carbune <[email protected]>
+
+ Display cues in the controls area
+ https://bugs.webkit.org/show_bug.cgi?id=87591
+
+ Reviewed by Eric Carlson.
+
+ * media/media-volume-slider-rendered-normal-expected.txt: Renamed from LayoutTests/media/video-controls-rendering-toggle-display-none-expected.txt.
+ * media/media-volume-slider-rendered-normal.html: Renamed from LayoutTests/media/video-controls-rendering-toggle-display-none.html.
+ * platform/chromium/test_expectations.txt: Unmarked tests.
+ * platform/efl/test_expectations.txt: Unmarked tests.
+ * platform/mac/test_expectations.txt: Unmarked tests.
+
2012-05-29 Raphael Kubo da Costa <[email protected]>
[EFL] Gardening. Unskip passing test.
Copied: trunk/LayoutTests/media/media-volume-slider-rendered-normal-expected.txt (from rev 118840, trunk/LayoutTests/media/video-controls-rendering-toggle-display-none-expected.txt) (0 => 118841)
--- trunk/LayoutTests/media/media-volume-slider-rendered-normal-expected.txt (rev 0)
+++ trunk/LayoutTests/media/media-volume-slider-rendered-normal-expected.txt 2012-05-29 22:28:15 UTC (rev 118841)
@@ -0,0 +1,9 @@
+Tests that the video controls are properly rendered when the display none is set and unset.
+
+** The volume slider should have almost the same left offset as the mute button **
+EXPECTED (volumeSliderElement.offsetLeft >= muteButtonElement.offsetLeft - threshold == 'true') OK
+EXPECTED (volumeSliderElement.offsetLeft <= muteButtonElement.offsetLeft + threshold == 'true') OK
+
+** The volume slider should be on top of the mute button **
+EXPECTED (volumeSliderElement.offsetTop < muteButtonElement.offsetTop == 'true') OK
+
Copied: trunk/LayoutTests/media/media-volume-slider-rendered-normal.html (from rev 118840, trunk/LayoutTests/media/video-controls-rendering-toggle-display-none.html) (0 => 118841)
--- trunk/LayoutTests/media/media-volume-slider-rendered-normal.html (rev 0)
+++ trunk/LayoutTests/media/media-volume-slider-rendered-normal.html 2012-05-29 22:28:15 UTC (rev 118841)
@@ -0,0 +1,70 @@
+<html>
+<head>
+ <title>Test rendering of volume slider of video tag</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ <script>
+ var video;
+ var panel;
+ var threshold = 2;
+
+ var muteButtonCoordinates;
+ var volumeSliderCoordinates;
+
+ var volumeSliderElement;
+ var muteButtonElement;
+
+ function init()
+ {
+ video = document.getElementsByTagName("video")[0];
+ video.src = "" "content/test");
+ }
+
+ function test()
+ {
+ if (window.eventSender) {
+ try {
+ muteButtonCoordinates = mediaControlsButtonCoordinates(video, "mute-button");
+ volumeSliderCoordinates = mediaControlsButtonCoordinates(video, "volume-slider-container");
+ } catch (exception) {
+ layoutTestController.notifyDone();
+ return;
+ }
+ }
+
+ panel = mediaControlsElement(internals.shadowRoot(video).firstChild, "-webkit-media-controls-panel");
+ volumeSliderElement = mediaControlsElement(internals.shadowRoot(video).firstChild, "-webkit-media-controls-volume-slider-container");
+ muteButtonElement = mediaControlsElement(internals.shadowRoot(video).firstChild, "-webkit-media-controls-mute-button");
+
+ // Ensure paint without controls.
+ video.controls = false;
+ document.body.offsetTop;
+
+ // Ensure (re)paint with controls displayed.
+ video.controls = true;
+ document.body.offsetTop;
+
+ // Move the mouse back over the mute button.
+ eventSender.mouseMoveTo(muteButtonCoordinates[0], muteButtonCoordinates[1]);
+
+ // Test that the left offset of both controls is equal.
+ consoleWrite("");
+ consoleWrite("** The volume slider should have almost the same left offset as the mute button **");
+ testExpected("volumeSliderElement.offsetLeft >= muteButtonElement.offsetLeft - threshold", true);
+ testExpected("volumeSliderElement.offsetLeft <= muteButtonElement.offsetLeft + threshold", true);
+
+ consoleWrite("");
+ consoleWrite("** The volume slider should be on top of the mute button **");
+ testExpected("volumeSliderElement.offsetTop < muteButtonElement.offsetTop", true);
+
+ layoutTestController.notifyDone();
+ }
+ </script>
+</head>
+<body _onload_="init()">
+ Tests that the video controls are properly rendered when the display none is set and unset.<br>
+
+ <video _oncanplaythrough_="test()" controls preload="true"></video>
+</body>
+</html>
Deleted: trunk/LayoutTests/media/video-controls-rendering-toggle-display-none-expected.txt (118840 => 118841)
--- trunk/LayoutTests/media/video-controls-rendering-toggle-display-none-expected.txt 2012-05-29 22:24:47 UTC (rev 118840)
+++ trunk/LayoutTests/media/video-controls-rendering-toggle-display-none-expected.txt 2012-05-29 22:28:15 UTC (rev 118841)
@@ -1,9 +0,0 @@
-Tests that the video controls are properly rendered when the display none is set and unset.
-
-** The volume slider should have almost the same left offset as the mute button **
-EXPECTED (volumeSliderElement.offsetLeft >= muteButtonElement.offsetLeft - threshold == 'true') OK
-EXPECTED (volumeSliderElement.offsetLeft <= muteButtonElement.offsetLeft + threshold == 'true') OK
-
-** The volume slider should be on top of the mute button **
-EXPECTED (volumeSliderElement.offsetTop < muteButtonElement.offsetTop == 'true') OK
-
Deleted: trunk/LayoutTests/media/video-controls-rendering-toggle-display-none.html (118840 => 118841)
--- trunk/LayoutTests/media/video-controls-rendering-toggle-display-none.html 2012-05-29 22:24:47 UTC (rev 118840)
+++ trunk/LayoutTests/media/video-controls-rendering-toggle-display-none.html 2012-05-29 22:28:15 UTC (rev 118841)
@@ -1,70 +0,0 @@
-<html>
-<head>
- <title>Test rendering of volume slider of video tag</title>
- <script src=""
- <script src=""
- <script src=""
- <script>
- var video;
- var panel;
- var threshold = 2;
-
- var muteButtonCoordinates;
- var volumeSliderCoordinates;
-
- var volumeSliderElement;
- var muteButtonElement;
-
- function init()
- {
- video = document.getElementsByTagName("video")[0];
- video.src = "" "content/test");
- }
-
- function test()
- {
- if (window.eventSender) {
- try {
- muteButtonCoordinates = mediaControlsButtonCoordinates(video, "mute-button");
- volumeSliderCoordinates = mediaControlsButtonCoordinates(video, "volume-slider-container");
- } catch (exception) {
- layoutTestController.notifyDone();
- return;
- }
-
- eventSender.mouseMoveTo(muteButtonCoordinates[0], muteButtonCoordinates[1]);
- }
-
- panel = mediaControlsElement(internals.shadowRoot(video).firstChild, "-webkit-media-controls-panel");
- volumeSliderElement = mediaControlsElement(internals.shadowRoot(video).firstChild, "-webkit-media-controls-volume-slider-container");
- muteButtonElement = mediaControlsElement(internals.shadowRoot(video).firstChild, "-webkit-media-controls-mute-button");
-
-
- // Ensure paint with display property set to "none".
- panel.style.display = "none";
- document.body.offsetTop;
-
- // Ensure (re)paint with default display property.
- panel.style.removeProperty("display");
- document.body.offsetTop;
-
- // Test that the left offset of both controls is equal.
- consoleWrite("");
- consoleWrite("** The volume slider should have almost the same left offset as the mute button **");
- testExpected("volumeSliderElement.offsetLeft >= muteButtonElement.offsetLeft - threshold", true);
- testExpected("volumeSliderElement.offsetLeft <= muteButtonElement.offsetLeft + threshold", true);
-
- consoleWrite("");
- consoleWrite("** The volume slider should be on top of the mute button **");
- testExpected("volumeSliderElement.offsetTop < muteButtonElement.offsetTop", true);
-
- layoutTestController.notifyDone();
- }
- </script>
-</head>
-<body _onload_="init()">
- Tests that the video controls are properly rendered when the display none is set and unset.<br>
-
- <video _oncanplaythrough_="test()" controls preload="true"></video>
-</body>
-</html>
Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (118840 => 118841)
--- trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-05-29 22:24:47 UTC (rev 118840)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-05-29 22:28:15 UTC (rev 118841)
@@ -3027,9 +3027,6 @@
BUGWK81402 WIN : media/track/track-active-cues.html = PASS TIMEOUT
BUGWK83882 : media/track/track-mode.html = PASS TEXT TIMEOUT
-BUGWK85990 : media/video-controls-rendering-toggle-display-none.html = TEXT
-BUGWK85990 : media/video-controls-toggling.html = TIMEOUT
-
BUGWK72271 SNOWLEOPARD DEBUG : fast/dom/node-iterator-reference-node-moved-crash.html = PASS CRASH
BUGWK72376 WIN : fast/forms/file/input-file-label.html = TEXT PASS
Modified: trunk/LayoutTests/platform/efl/test_expectations.txt (118840 => 118841)
--- trunk/LayoutTests/platform/efl/test_expectations.txt 2012-05-29 22:24:47 UTC (rev 118840)
+++ trunk/LayoutTests/platform/efl/test_expectations.txt 2012-05-29 22:28:15 UTC (rev 118841)
@@ -70,10 +70,6 @@
BUGWKEFL SKIP : http/tests/misc/prefetch-purpose.html = FAIL
BUGWKEFL SKIP : loader/reload-subresource-when-type-changes.html = FAIL
-// Seems to fail on mac as well
-BUGWK85990 : media/video-controls-rendering-toggle-display-none.html = TEXT
-BUGWK85990 : media/video-controls-toggling.html = TIMEOUT TEXT
-
// Perf tests are way too slow and some may fail due to timeout.
WONTFIX : perf/adding-radio-buttons.html = FAIL PASS
WONTFIX : perf/array-binary-search.html = FAIL PASS
Modified: trunk/LayoutTests/platform/mac/test_expectations.txt (118840 => 118841)
--- trunk/LayoutTests/platform/mac/test_expectations.txt 2012-05-29 22:24:47 UTC (rev 118840)
+++ trunk/LayoutTests/platform/mac/test_expectations.txt 2012-05-29 22:28:15 UTC (rev 118841)
@@ -213,9 +213,6 @@
// Interferes with the tests that should pass
BUGWK85689 SKIP : fast/animation/request-animation-frame-disabled.html = TEXT
-BUGWK85990 : media/video-controls-rendering-toggle-display-none.html = TEXT
-BUGWK85990 : media/video-controls-toggling.html = TIMEOUT TEXT
-
BUGWK85308 : ietestcenter/css3/valuesandunits/units-000.htm = IMAGE
BUGWK85310 : ietestcenter/css3/valuesandunits/units-010.htm = IMAGE
Modified: trunk/Source/WebCore/ChangeLog (118840 => 118841)
--- trunk/Source/WebCore/ChangeLog 2012-05-29 22:24:47 UTC (rev 118840)
+++ trunk/Source/WebCore/ChangeLog 2012-05-29 22:28:15 UTC (rev 118841)
@@ -1,3 +1,31 @@
+2012-05-29 Victor Carbune <[email protected]>
+
+ Display cues in the controls area
+ https://bugs.webkit.org/show_bug.cgi?id=87591
+
+ Reviewed by Eric Carlson.
+
+ Changed the behaviour to implicitly hide the volume slidebar
+ if the controls are hidden (due mouse moving out of the video
+ area or controls are toggled through JS).
+
+ This seems to be the simplest fix to this issue, otherwise
+ on toggling the display:none property on the controls the
+ volume slidebar might appear below the video.
+
+ Re-enabled failing tests for this functionality.
+
+ * html/shadow/MediaControlElements.cpp:
+ (WebCore::MediaControlPanelElement::makeTransparent): Re-enabled
+ timer to set the display:none property on the controls.
+ * html/shadow/MediaControlRootElement.cpp:
+ (WebCore::MediaControlRootElement::hide): Added a call to hide
+ the volume slider.
+ (WebCore::MediaControlRootElement::makeTransparent): Same.
+ * html/shadow/MediaControlRootElementChromium.cpp:
+ (WebCore::MediaControlRootElementChromium::hide): Same.
+ (WebCore::MediaControlRootElementChromium::makeTransparent): Same.
+
2012-05-29 Adrienne Walker <[email protected]>
Fix transparent iframes with composited contents in WK1 on Mac
Modified: trunk/Source/WebCore/html/shadow/MediaControlElements.cpp (118840 => 118841)
--- trunk/Source/WebCore/html/shadow/MediaControlElements.cpp 2012-05-29 22:24:47 UTC (rev 118840)
+++ trunk/Source/WebCore/html/shadow/MediaControlElements.cpp 2012-05-29 22:28:15 UTC (rev 118841)
@@ -256,6 +256,7 @@
setInlineStyleProperty(CSSPropertyOpacity, 0.0, CSSPrimitiveValue::CSS_NUMBER);
m_opaque = false;
+ startTimer();
}
void MediaControlPanelElement::defaultEventHandler(Event* event)
Modified: trunk/Source/WebCore/html/shadow/MediaControlRootElement.cpp (118840 => 118841)
--- trunk/Source/WebCore/html/shadow/MediaControlRootElement.cpp 2012-05-29 22:24:47 UTC (rev 118840)
+++ trunk/Source/WebCore/html/shadow/MediaControlRootElement.cpp 2012-05-29 22:28:15 UTC (rev 118841)
@@ -301,6 +301,7 @@
{
m_panel->setIsDisplayed(false);
m_panel->hide();
+ m_volumeSliderContainer->hide();
}
void MediaControlRootElement::makeOpaque()
@@ -311,6 +312,7 @@
void MediaControlRootElement::makeTransparent()
{
m_panel->makeTransparent();
+ m_volumeSliderContainer->hide();
}
void MediaControlRootElement::reset()
Modified: trunk/Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp (118840 => 118841)
--- trunk/Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp 2012-05-29 22:24:47 UTC (rev 118840)
+++ trunk/Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp 2012-05-29 22:28:15 UTC (rev 118841)
@@ -178,6 +178,7 @@
{
m_panel->setIsDisplayed(false);
m_panel->hide();
+ m_volumeSliderContainer->hide();
}
void MediaControlRootElementChromium::makeOpaque()
@@ -188,6 +189,7 @@
void MediaControlRootElementChromium::makeTransparent()
{
m_panel->makeTransparent();
+ m_volumeSliderContainer->hide();
}
void MediaControlRootElementChromium::reset()