Diff
Modified: trunk/LayoutTests/ChangeLog (114956 => 114957)
--- trunk/LayoutTests/ChangeLog 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/LayoutTests/ChangeLog 2012-04-23 22:41:01 UTC (rev 114957)
@@ -1,3 +1,29 @@
+2012-04-23 Victor Carbune <vcarb...@adobe.com>
+
+ Simplify volume slider rendering
+ https://bugs.webkit.org/show_bug.cgi?id=82150
+
+ Reviewed by Eric Carlson.
+
+ Added new TEXT baselines for Mac.
+ Baselines for GTK and Chromium need to be re-generated as well.
+
+ * media/video-controls-rendering-toggle-display-none-expected.txt: Added.
+ * media/video-controls-rendering-toggle-display-none.html: Added.
+ * platform/chromium/test_expectations.txt: Updated test expectations
+ * platform/gtk/test_expectations.txt: Updated test expectations.
+ Commented out a duplicate test marked as CRASH because otherwise cq complains.
+ * platform/mac/fast/hidpi/video-controls-in-hidpi-expected.txt: Updated.
+ * platform/mac/media/audio-controls-rendering-expected.txt: Updated.
+ * platform/mac/media/audio-repaint-expected.txt: Updated.
+ * platform/mac/media/controls-after-reload-expected.txt: Updated.
+ * platform/mac/media/controls-strict-expected.txt: Updated.
+ * platform/mac/media/media-controls-clone-expected.txt: Updated.
+ * platform/mac/media/video-controls-rendering-expected.txt: Updated.
+ * platform/mac/media/video-display-toggle-expected.txt: Updated.
+ * platform/mac/media/video-no-audio-expected.txt: Updated.
+ * platform/mac/media/video-playing-and-pause-expected.txt: Updated.
+
2012-04-23 Filip Pizlo <fpi...@apple.com>
DFG must keep alive values that it will perform speculations on
Added: trunk/LayoutTests/media/video-controls-rendering-toggle-display-none-expected.txt (0 => 114957)
--- trunk/LayoutTests/media/video-controls-rendering-toggle-display-none-expected.txt (rev 0)
+++ trunk/LayoutTests/media/video-controls-rendering-toggle-display-none-expected.txt 2012-04-23 22:41:01 UTC (rev 114957)
@@ -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
+
Added: trunk/LayoutTests/media/video-controls-rendering-toggle-display-none.html (0 => 114957)
--- trunk/LayoutTests/media/video-controls-rendering-toggle-display-none.html (rev 0)
+++ trunk/LayoutTests/media/video-controls-rendering-toggle-display-none.html 2012-04-23 22:41:01 UTC (rev 114957)
@@ -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;
+ }
+
+ 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 (114956 => 114957)
--- trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-04-23 22:41:01 UTC (rev 114957)
@@ -3422,6 +3422,24 @@
BUGWK37244 : tables/mozilla/bugs/bug27038-1.html = IMAGE+TEXT
BUGWK37244 : tables/mozilla/bugs/bug27038-2.html = IMAGE+TEXT
+// Need rebaselining.
+BUGWK82150 : media/media-document-audio-repaint.html = TEXT
+BUGWK82150 : media/video-no-audio.html = TEXT
+BUGWK82150 : media/controls-strict.html = TEXT
+BUGWK82150 : media/video-volume-slider.html = TEXT
+BUGWK82150 : media/controls-styling.html = TEXT
+BUGWK82150 : media/video-display-toggle.html = TEXT
+BUGWK82150 : media/audio-repaint.html = TEXT
+BUGWK82150 : media/audio-controls-rendering.html = TEXT
+BUGWK82150 : media/video-zoom-controls.html = TEXT
+BUGWK82150 : media/video-controls-rendering.html = TEXT
+BUGWK82150 : media/controls-without-preload.html = TEXT
+BUGWK82150 : media/media-controls-clone.html = TEXT
+BUGWK82150 : fast/layers/video-layer.html = TEXT
+BUGWK82150 : media/video-empty-source.html = TEXT
+BUGWK82150 : media/video-playing-and-pause.html = TEXT
+BUGWK82150 : media/controls-after-reload.html = TEXT
+
// New test, flaky since added in r110965.
BUGWK82097 : editing/selection/move-by-word-visually-crash-test-5.html = PASS TIMEOUT
Modified: trunk/LayoutTests/platform/gtk/test_expectations.txt (114956 => 114957)
--- trunk/LayoutTests/platform/gtk/test_expectations.txt 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/LayoutTests/platform/gtk/test_expectations.txt 2012-04-23 22:41:01 UTC (rev 114957)
@@ -310,7 +310,7 @@
BUGWK76814 DEBUG : fast/xmlhttprequest/xmlhttprequest-get.xhtml = CRASH
BUGWK74297 : http/tests/security/cross-origin-xsl-redirect-BLOCKED.html = PASS CRASH
-BUGWK83679 DEBUG : editing/undo/undo-smart-delete-reversed-selection.html = CRASH
+// BUGWK83679 DEBUG : editing/undo/undo-smart-delete-reversed-selection.html = CRASH
// Crashes on GStreamer side when loading one of the media elements of the test.
BUGWK50155 : fast/events/tabindex-focus-blur-all.html = CRASH
@@ -1544,6 +1544,16 @@
BUGWK84378 : media/track/track-cue-rendering-snap-to-lines-not-set.html = FAIL
+// Need new baselines.
+BUGWK82150 : media/audio-controls-rendering.html = TEXT
+BUGWK82150 : media/audio-repaint.html = TEXT
+BUGWK82150 : media/controls-strict.html = TEXT
+BUGWK82150 : media/controls-styling.html = TEXT
+BUGWK82150 : media/controls-without-preload.html = TEXT
+BUGWK82150 : media/media-controls-clone.html = TEXT
+BUGWK82150 : media/media-document-audio-repaint.html = TEXT
+BUGWK82150 : media/video-controls-rendering.html = TEXT
+
//////////////////////////////////////////////////////////////////////////////////////////
// End of Tests failing
//////////////////////////////////////////////////////////////////////////////////////////
Modified: trunk/LayoutTests/platform/mac/fast/hidpi/video-controls-in-hidpi-expected.txt (114956 => 114957)
--- trunk/LayoutTests/platform/mac/fast/hidpi/video-controls-in-hidpi-expected.txt 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/LayoutTests/platform/mac/fast/hidpi/video-controls-in-hidpi-expected.txt 2012-04-23 22:41:01 UTC (rev 114957)
@@ -16,3 +16,4 @@
RenderDeprecatedFlexibleBox (relative positioned) {DIV} at (0,125) size 300x25
RenderButton {INPUT} at (6,3) size 18x18
RenderButton {INPUT} at (32,4) size 16x16
+ RenderBlock {DIV} at (49,12) size 0x0
Modified: trunk/LayoutTests/platform/mac/media/audio-controls-rendering-expected.txt (114956 => 114957)
--- trunk/LayoutTests/platform/mac/media/audio-controls-rendering-expected.txt 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/LayoutTests/platform/mac/media/audio-controls-rendering-expected.txt 2012-04-23 22:41:01 UTC (rev 114957)
@@ -33,9 +33,11 @@
RenderBlock (anonymous) at (7,0) size 31x11
RenderText {#text} at (0,0) size 31x11
text run at (0,0) width 31: "-00:07"
- RenderButton {INPUT} at (177,6) size 14x12
+ RenderBlock {DIV} at (175,6) size 25x12
layer at (57,51) size 10x8
RenderBlock (relative positioned) {DIV} at (0,0) size 10x8
+layer at (185,48) size 14x12
+ RenderButton zI: 2 {INPUT} at (2,0) size 14x12
layer at (8,85) size 320x25
RenderDeprecatedFlexibleBox (relative positioned) {DIV} at (0,0) size 320x25
layer at (8,85) size 320x25
@@ -55,9 +57,11 @@
RenderBlock (anonymous) at (7,0) size 31x11
RenderText {#text} at (0,0) size 31x11
text run at (0,0) width 31: "-00:07"
- RenderButton {INPUT} at (297,6) size 14x12
+ RenderBlock {DIV} at (295,6) size 25x12
layer at (102,94) size 10x8
RenderBlock (relative positioned) {DIV} at (0,0) size 10x8
+layer at (305,91) size 14x12
+ RenderButton zI: 2 {INPUT} at (2,0) size 14x12
layer at (8,128) size 320x100
RenderMedia {AUDIO} at (8,128) size 320x100 [bgcolor=#0000FF]
layer at (8,128) size 320x100
@@ -79,6 +83,8 @@
RenderBlock (anonymous) at (7,0) size 31x11
RenderText {#text} at (0,0) size 31x11
text run at (0,0) width 31: "-00:07"
- RenderButton {INPUT} at (297,6) size 14x12
+ RenderBlock {DIV} at (295,6) size 25x12
layer at (102,212) size 10x8
RenderBlock (relative positioned) {DIV} at (0,0) size 10x8
+layer at (305,209) size 14x12
+ RenderButton zI: 2 {INPUT} at (2,0) size 14x12
Modified: trunk/LayoutTests/platform/mac/media/audio-repaint-expected.txt (114956 => 114957)
--- trunk/LayoutTests/platform/mac/media/audio-repaint-expected.txt 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/LayoutTests/platform/mac/media/audio-repaint-expected.txt 2012-04-23 22:41:01 UTC (rev 114957)
@@ -33,9 +33,11 @@
RenderBlock (anonymous) at (7,0) size 31x11
RenderText {#text} at (0,0) size 31x11
text run at (0,0) width 31: "-00:00"
- RenderButton {INPUT} at (177,6) size 14x12
+ RenderBlock {DIV} at (175,6) size 25x12
layer at (114,76) size 10x8
RenderBlock (relative positioned) {DIV} at (0,0) size 10x8
+layer at (185,73) size 14x12
+ RenderButton zI: 2 {INPUT} at (2,0) size 14x12
layer at (8,42) size 200x25
RenderDeprecatedFlexibleBox (relative positioned) {DIV} at (0,0) size 200x25
layer at (8,42) size 200x25
@@ -55,9 +57,11 @@
RenderBlock (anonymous) at (7,0) size 31x11
RenderText {#text} at (0,0) size 31x11
text run at (0,0) width 31: "-00:00"
- RenderButton {INPUT} at (177,6) size 14x12
+ RenderBlock {DIV} at (175,6) size 25x12
layer at (114,51) size 10x8
RenderBlock (relative positioned) {DIV} at (0,0) size 10x8
+layer at (185,48) size 14x12
+ RenderButton zI: 2 {INPUT} at (2,0) size 14x12
layer at (8,144) size 200x25
RenderMedia {AUDIO} at (0,102) size 200x25
layer at (8,144) size 200x25
@@ -79,6 +83,8 @@
RenderBlock (anonymous) at (7,0) size 31x11
RenderText {#text} at (0,0) size 31x11
text run at (0,0) width 31: "-00:00"
- RenderButton {INPUT} at (177,6) size 14x12
+ RenderBlock {DIV} at (175,6) size 25x12
layer at (114,153) size 10x8
RenderBlock (relative positioned) {DIV} at (0,0) size 10x8
+layer at (185,150) size 14x12
+ RenderButton zI: 2 {INPUT} at (2,0) size 14x12
Modified: trunk/LayoutTests/platform/mac/media/controls-after-reload-expected.txt (114956 => 114957)
--- trunk/LayoutTests/platform/mac/media/controls-after-reload-expected.txt 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/LayoutTests/platform/mac/media/controls-after-reload-expected.txt 2012-04-23 22:41:01 UTC (rev 114957)
@@ -30,6 +30,8 @@
RenderText {#text} at (0,0) size 31x11
text run at (0,0) width 31: "-00:06"
RenderButton {INPUT} at (297,4) size 16x16
- RenderButton {INPUT} at (267,6) size 14x12
+ RenderBlock {DIV} at (265,6) size 25x12
layer at (102,266) size 10x8
RenderBlock (relative positioned) {DIV} at (0,0) size 10x8
+layer at (275,263) size 14x12
+ RenderButton zI: 2 {INPUT} at (2,0) size 14x12
Modified: trunk/LayoutTests/platform/mac/media/controls-strict-expected.txt (114956 => 114957)
--- trunk/LayoutTests/platform/mac/media/controls-strict-expected.txt 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/LayoutTests/platform/mac/media/controls-strict-expected.txt 2012-04-23 22:41:01 UTC (rev 114957)
@@ -30,6 +30,8 @@
RenderText {#text} at (0,0) size 31x11
text run at (0,0) width 31: "-00:06"
RenderButton {INPUT} at (297,4) size 16x16
- RenderButton {INPUT} at (267,6) size 14x12
+ RenderBlock {DIV} at (265,6) size 25x12
layer at (102,274) size 10x8
RenderBlock (relative positioned) {DIV} at (0,0) size 10x8
+layer at (275,271) size 14x12
+ RenderButton zI: 2 {INPUT} at (2,0) size 14x12
Modified: trunk/LayoutTests/platform/mac/media/media-controls-clone-expected.txt (114956 => 114957)
--- trunk/LayoutTests/platform/mac/media/media-controls-clone-expected.txt 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/LayoutTests/platform/mac/media/media-controls-clone-expected.txt 2012-04-23 22:41:01 UTC (rev 114957)
@@ -17,21 +17,25 @@
RenderDeprecatedFlexibleBox (relative positioned) {DIV} at (0,125) size 300x25
RenderButton {INPUT} at (6,3) size 18x18
RenderButton {INPUT} at (32,4) size 16x16
+ RenderBlock {DIV} at (49,12) size 0x0
layer at (308,133) size 200x25
RenderDeprecatedFlexibleBox (relative positioned) {DIV} at (0,0) size 200x25
layer at (308,133) size 200x25
RenderDeprecatedFlexibleBox (relative positioned) {DIV} at (0,0) size 200x25
RenderButton {INPUT} at (6,3) size 18x18
RenderButton {INPUT} at (32,4) size 16x16
+ RenderBlock {DIV} at (49,12) size 0x0
layer at (8,162) size 300x150
RenderDeprecatedFlexibleBox (relative positioned) {DIV} at (0,0) size 300x150
layer at (8,287) size 300x25
RenderDeprecatedFlexibleBox (relative positioned) {DIV} at (0,125) size 300x25
RenderButton {INPUT} at (6,3) size 18x18
RenderButton {INPUT} at (32,4) size 16x16
+ RenderBlock {DIV} at (49,12) size 0x0
layer at (308,287) size 200x25
RenderDeprecatedFlexibleBox (relative positioned) {DIV} at (0,0) size 200x25
layer at (308,287) size 200x25
RenderDeprecatedFlexibleBox (relative positioned) {DIV} at (0,0) size 200x25
RenderButton {INPUT} at (6,3) size 18x18
RenderButton {INPUT} at (32,4) size 16x16
+ RenderBlock {DIV} at (49,12) size 0x0
Modified: trunk/LayoutTests/platform/mac/media/video-controls-rendering-expected.txt (114956 => 114957)
--- trunk/LayoutTests/platform/mac/media/video-controls-rendering-expected.txt 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/LayoutTests/platform/mac/media/video-controls-rendering-expected.txt 2012-04-23 22:41:01 UTC (rev 114957)
@@ -35,9 +35,11 @@
RenderText {#text} at (0,0) size 31x11
text run at (0,0) width 31: "-00:06"
RenderButton {INPUT} at (297,4) size 16x16
- RenderButton {INPUT} at (267,6) size 14x12
+ RenderBlock {DIV} at (265,6) size 25x12
layer at (102,266) size 10x8
RenderBlock (relative positioned) {DIV} at (0,0) size 10x8
+layer at (275,263) size 14x12
+ RenderButton zI: 2 {INPUT} at (2,0) size 14x12
layer at (8,282) size 320x240
RenderDeprecatedFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240
layer at (8,497) size 320x25
@@ -58,9 +60,11 @@
RenderText {#text} at (0,0) size 31x11
text run at (0,0) width 31: "-00:06"
RenderButton {INPUT} at (297,4) size 16x16
- RenderButton {INPUT} at (267,6) size 14x12
+ RenderBlock {DIV} at (265,6) size 25x12
layer at (102,506) size 10x8
RenderBlock (relative positioned) {DIV} at (0,0) size 10x8
+layer at (275,503) size 14x12
+ RenderButton zI: 2 {INPUT} at (2,0) size 14x12
layer at (8,522) size 320x240
RenderVideo {VIDEO} at (8,522) size 320x240
layer at (8,522) size 320x240
@@ -83,6 +87,8 @@
RenderText {#text} at (0,0) size 31x11
text run at (0,0) width 31: "-00:06"
RenderButton {INPUT} at (297,4) size 16x16
- RenderButton {INPUT} at (267,6) size 14x12
+ RenderBlock {DIV} at (265,6) size 25x12
layer at (102,746) size 10x8
RenderBlock (relative positioned) {DIV} at (0,0) size 10x8
+layer at (275,743) size 14x12
+ RenderButton zI: 2 {INPUT} at (2,0) size 14x12
Modified: trunk/LayoutTests/platform/mac/media/video-display-toggle-expected.txt (114956 => 114957)
--- trunk/LayoutTests/platform/mac/media/video-display-toggle-expected.txt 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/LayoutTests/platform/mac/media/video-display-toggle-expected.txt 2012-04-23 22:41:01 UTC (rev 114957)
@@ -29,6 +29,8 @@
RenderText {#text} at (0,0) size 31x11
text run at (0,0) width 31: "-00:06"
RenderButton {INPUT} at (297,4) size 16x16
- RenderButton {INPUT} at (267,6) size 14x12
+ RenderBlock {DIV} at (265,6) size 25x12
layer at (102,250) size 10x8
RenderBlock (relative positioned) {DIV} at (0,0) size 10x8
+layer at (275,247) size 14x12
+ RenderButton zI: 2 {INPUT} at (2,0) size 14x12
Modified: trunk/LayoutTests/platform/mac/media/video-no-audio-expected.txt (114956 => 114957)
--- trunk/LayoutTests/platform/mac/media/video-no-audio-expected.txt 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/LayoutTests/platform/mac/media/video-no-audio-expected.txt 2012-04-23 22:41:01 UTC (rev 114957)
@@ -30,5 +30,6 @@
RenderText {#text} at (0,0) size 31x11
text run at (0,0) width 31: "-00:09"
RenderButton {INPUT} at (329,4) size 16x16
+ RenderBlock {DIV} at (322,12) size 0x0
layer at (102,314) size 10x8
RenderBlock (relative positioned) {DIV} at (0,0) size 10x8
Modified: trunk/LayoutTests/platform/mac/media/video-playing-and-pause-expected.txt (114956 => 114957)
--- trunk/LayoutTests/platform/mac/media/video-playing-and-pause-expected.txt 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/LayoutTests/platform/mac/media/video-playing-and-pause-expected.txt 2012-04-23 22:41:01 UTC (rev 114957)
@@ -31,6 +31,8 @@
RenderText {#text} at (0,0) size 31x11
text run at (0,0) width 31: "-00:06"
RenderButton {INPUT} at (297,4) size 16x16
- RenderButton {INPUT} at (267,6) size 14x12
+ RenderBlock {DIV} at (265,6) size 25x12
layer at (102,292) size 10x8
RenderBlock (relative positioned) {DIV} at (0,0) size 10x8
+layer at (275,289) size 14x12
+ RenderButton zI: 2 {INPUT} at (2,0) size 14x12
Modified: trunk/Source/WebCore/ChangeLog (114956 => 114957)
--- trunk/Source/WebCore/ChangeLog 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/Source/WebCore/ChangeLog 2012-04-23 22:41:01 UTC (rev 114957)
@@ -1,3 +1,34 @@
+2012-04-23 Victor Carbune <vcarb...@adobe.com>
+
+ Simplify volume slider rendering
+ https://bugs.webkit.org/show_bug.cgi?id=82150
+
+ Reviewed by Eric Carlson.
+
+ Test: media/video-controls-rendering-toggle-display-none.html
+
+ * css/mediaControlsChromium.css: Update controls css for Chromium.
+ (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
+ (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
+ (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
+ * css/mediaControlsGtk.css: Update controls css for GTK.
+ (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
+ (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
+ * css/mediaControlsQuickTime.css: Update controls css for Safari.
+ (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
+ (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
+ (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
+ * html/shadow/MediaControlElements.cpp: Removed particular renderer.
+ (WebCore):
+ * html/shadow/MediaControlElements.h:
+ (MediaControlVolumeSliderContainerElement): Remoed particular renderer.
+ * html/shadow/MediaControlRootElement.cpp:
+ (WebCore::MediaControlRootElement::create): Added a div element as a container. Removed extra unused mute button.
+ * html/shadow/MediaControlRootElementChromium.cpp: Added an extra div
+ element as a container for the mute button and the volume slider to
+ easily position them relative to each other.
+ (WebCore::MediaControlRootElementChromium::create):
+
2012-04-23 Sheriff Bot <webkit.review....@gmail.com>
Unreviewed, rolling out r109981.
Modified: trunk/Source/WebCore/css/mediaControlsChromium.css (114956 => 114957)
--- trunk/Source/WebCore/css/mediaControlsChromium.css 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/Source/WebCore/css/mediaControlsChromium.css 2012-04-23 22:41:01 UTC (rev 114957)
@@ -41,6 +41,7 @@
audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel {
-webkit-user-select: none;
+ -webkit-box-pack: end;
position: relative;
overflow: visible;
bottom: 0;
@@ -54,9 +55,13 @@
bottom: 0px;
}
+audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel {
+ -webkit-box-align: end;
+}
+
audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button {
-webkit-appearance: media-mute-button;
- position: absolute;
+ position: relative;
top: auto;
bottom: 0;
right: 0;
@@ -149,7 +154,7 @@
audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container {
-webkit-appearance: media-volume-slider-container;
- position: absolute;
+ position: relative;
width: 34px;
height: 100px;
Modified: trunk/Source/WebCore/css/mediaControlsGtk.css (114956 => 114957)
--- trunk/Source/WebCore/css/mediaControlsGtk.css 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/Source/WebCore/css/mediaControlsGtk.css 2012-04-23 22:41:01 UTC (rev 114957)
@@ -42,6 +42,8 @@
audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button {
width: 20px;
height: 20px;
+ position: relative;
+ z-index: 2;
}
audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button {
@@ -91,6 +93,8 @@
position: absolute;
height: 100px;
width: 20px;
+ bottom: 20px;
+ z-index: 1;
}
audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider {
Modified: trunk/Source/WebCore/css/mediaControlsQuickTime.css (114956 => 114957)
--- trunk/Source/WebCore/css/mediaControlsQuickTime.css 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/Source/WebCore/css/mediaControlsQuickTime.css 2012-04-23 22:41:01 UTC (rev 114957)
@@ -48,6 +48,9 @@
margin-left: 2px;
margin-right: 9px;
border: none !important;
+
+ position: relative;
+ z-index: 2;
}
audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button {
@@ -200,8 +203,8 @@
-webkit-appearance: media-volume-slider-container;
position: absolute;
- top: 0;
- left: 0;
+ bottom: 0px;
+ z-index: 1;
width: 22px;
height: 114px;
@@ -218,16 +221,3 @@
width: 10px;
height: 80px;
}
-
-audio::-webkit-media-controls-volume-slider-mute-button, video::-webkit-media-controls-volume-slider-mute-button {
- -webkit-appearance: media-volume-slider-mute-button;
- display: inline;
- position: absolute;
-
- bottom: 5px;
- left: 4px;
-
- width: 14px;
- height: 12px;
- border: none !important;
-}
Modified: trunk/Source/WebCore/html/shadow/MediaControlElements.cpp (114956 => 114957)
--- trunk/Source/WebCore/html/shadow/MediaControlElements.cpp 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/Source/WebCore/html/shadow/MediaControlElements.cpp 2012-04-23 22:41:01 UTC (rev 114957)
@@ -319,34 +319,6 @@
// ----------------------------
-class RenderMediaVolumeSliderContainer : public RenderBlock {
-public:
- RenderMediaVolumeSliderContainer(Node*);
-
-private:
- virtual void layout();
-};
-
-RenderMediaVolumeSliderContainer::RenderMediaVolumeSliderContainer(Node* node)
- : RenderBlock(node)
-{
-}
-
-void RenderMediaVolumeSliderContainer::layout()
-{
- RenderBlock::layout();
- if (style()->display() == NONE || !previousSibling() || !previousSibling()->isBox())
- return;
-
- RenderBox* buttonBox = toRenderBox(previousSibling());
-
- LayoutStateDisabler layoutStateDisabler(view());
-
- IntPoint offset = theme()->volumeSliderOffsetFromMuteButton(buttonBox, pixelSnappedSize());
- setX(offset.x() + buttonBox->offsetLeft());
- setY(offset.y() + buttonBox->offsetTop());
-}
-
inline MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement(Document* document)
: MediaControlElement(document)
{
@@ -359,11 +331,6 @@
return element.release();
}
-RenderObject* MediaControlVolumeSliderContainerElement::createRenderer(RenderArena* arena, RenderStyle*)
-{
- return new (arena) RenderMediaVolumeSliderContainer(this);
-}
-
void MediaControlVolumeSliderContainerElement::defaultEventHandler(Event* event)
{
if (!event->isMouseEvent() || event->type() != eventNames().mouseoutEvent)
Modified: trunk/Source/WebCore/html/shadow/MediaControlElements.h (114956 => 114957)
--- trunk/Source/WebCore/html/shadow/MediaControlElements.h 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/Source/WebCore/html/shadow/MediaControlElements.h 2012-04-23 22:41:01 UTC (rev 114957)
@@ -158,7 +158,6 @@
private:
MediaControlVolumeSliderContainerElement(Document*);
- virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
virtual void defaultEventHandler(Event*);
virtual MediaControlElementType displayType() const;
virtual const AtomicString& shadowPseudoId() const;
Modified: trunk/Source/WebCore/html/shadow/MediaControlRootElement.cpp (114956 => 114957)
--- trunk/Source/WebCore/html/shadow/MediaControlRootElement.cpp 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/Source/WebCore/html/shadow/MediaControlRootElement.cpp 2012-04-23 22:41:01 UTC (rev 114957)
@@ -174,11 +174,8 @@
controls->m_fullScreenButton = fullScreenButton.get();
panel->appendChild(fullScreenButton.release(), ec, true);
- RefPtr<MediaControlPanelMuteButtonElement> panelMuteButton = MediaControlPanelMuteButtonElement::create(document, controls.get());
- controls->m_panelMuteButton = panelMuteButton.get();
- panel->appendChild(panelMuteButton.release(), ec, true);
- if (ec)
- return 0;
+ // The mute button and the slider element should be in the same div.
+ RefPtr<HTMLDivElement> panelVolumeControlContainer = HTMLDivElement::create(document);
if (document->page()->theme()->usesMediaControlVolumeSlider()) {
RefPtr<MediaControlVolumeSliderContainerElement> volumeSliderContainer = MediaControlVolumeSliderContainerElement::create(document);
@@ -189,18 +186,22 @@
if (ec)
return 0;
- RefPtr<MediaControlVolumeSliderMuteButtonElement> volumeSliderMuteButton = MediaControlVolumeSliderMuteButtonElement::create(document);
- controls->m_volumeSliderMuteButton = volumeSliderMuteButton.get();
- volumeSliderContainer->appendChild(volumeSliderMuteButton.release(), ec, true);
- if (ec)
- return 0;
-
controls->m_volumeSliderContainer = volumeSliderContainer.get();
- panel->appendChild(volumeSliderContainer.release(), ec, true);
+ panelVolumeControlContainer->appendChild(volumeSliderContainer.release(), ec, true);
if (ec)
return 0;
}
+ RefPtr<MediaControlPanelMuteButtonElement> panelMuteButton = MediaControlPanelMuteButtonElement::create(document, controls.get());
+ controls->m_panelMuteButton = panelMuteButton.get();
+ panelVolumeControlContainer->appendChild(panelMuteButton.release(), ec, true);
+ if (ec)
+ return 0;
+
+ panel->appendChild(panelVolumeControlContainer, ec, true);
+ if (ec)
+ return 0;
+
// FIXME: Only create when needed <http://webkit.org/b/57163>
RefPtr<MediaControlFullscreenVolumeMinButtonElement> fullScreenMinVolumeButton = MediaControlFullscreenVolumeMinButtonElement::create(document);
controls->m_fullScreenMinVolumeButton = fullScreenMinVolumeButton.get();
Modified: trunk/Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp (114956 => 114957)
--- trunk/Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp 2012-04-23 22:36:08 UTC (rev 114956)
+++ trunk/Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp 2012-04-23 22:41:01 UTC (rev 114957)
@@ -106,11 +106,7 @@
if (ec)
return 0;
- RefPtr<MediaControlPanelMuteButtonElement> panelMuteButton = MediaControlPanelMuteButtonElement::create(document, controls.get());
- controls->m_panelMuteButton = panelMuteButton.get();
- panel->appendChild(panelMuteButton.release(), ec, true);
- if (ec)
- return 0;
+ RefPtr<HTMLDivElement> panelVolumeControlContainer = HTMLDivElement::create(document);
RefPtr<MediaControlVolumeSliderContainerElement> volumeSliderContainer = MediaControlVolumeSliderContainerElement::create(document);
@@ -121,10 +117,20 @@
return 0;
controls->m_volumeSliderContainer = volumeSliderContainer.get();
- panel->appendChild(volumeSliderContainer.release(), ec, true);
+ panelVolumeControlContainer->appendChild(volumeSliderContainer.release(), ec, true);
if (ec)
return 0;
+ RefPtr<MediaControlPanelMuteButtonElement> panelMuteButton = MediaControlPanelMuteButtonElement::create(document, controls.get());
+ controls->m_panelMuteButton = panelMuteButton.get();
+ panelVolumeControlContainer->appendChild(panelMuteButton.release(), ec, true);
+ if (ec)
+ return 0;
+
+ panel->appendChild(panelVolumeControlContainer, ec, true);
+ if (ec)
+ return 0;
+
controls->m_panel = panel.get();
controls->appendChild(panel.release(), ec, true);
if (ec)