2011-02-15 Ami Fischman <fischman@chromium.org>
Reviewed by David Levin.
Remove the artificial -32px shift for media controls in mediaDocuments
so that they overlap the canvas as they do in non-mediaDocuments.
This also fixes test_shell failing to update the media slider (see
linked crbug below).
https://bugs.webkit.org/show_bug.cgi?id=27798
http://crbug.com/72623
Test: media/video-controls-in-media-document.html
Added a render test that asserts that the controls show up in the
expected spot (0,208) instead of below the canvas (0,240).
* css/mediaControlsChromium.css:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/media/video-controls-in-media-document.html b/LayoutTests/media/video-controls-in-media-document.html
new file mode 100644
index 0000000..ba65b66
--- /dev/null
+++ b/LayoutTests/media/video-controls-in-media-document.html
@@ -0,0 +1,12 @@
+<p>Test that controls don't increase the size of the container (i.e. are
+rendered overlapping with the video canvas).<p>
+<script src="media-file.js" type="text/javascript"></script>
+
+<iframe style="width: 400px; height: 300px; border: 0px;" id="container"> </iframe>
+
+<script type="text/javascript">
+var iframe = document.getElementById("container");
+layoutTestController.waitUntilDone();
+iframe.onload = function() { layoutTestController.notifyDone(); };
+iframe.src = findMediaFile("video", "content/test");
+</script>
diff --git a/LayoutTests/platform/chromium/media/video-controls-in-media-document-expected.checksum b/LayoutTests/platform/chromium/media/video-controls-in-media-document-expected.checksum
new file mode 100644
index 0000000..4f48a74
--- /dev/null
+++ b/LayoutTests/platform/chromium/media/video-controls-in-media-document-expected.checksum
@@ -0,0 +1 @@
+78e82614917ae67a43fe567eed8d6fad
\ No newline at end of file
diff --git a/LayoutTests/platform/chromium/media/video-controls-in-media-document-expected.png b/LayoutTests/platform/chromium/media/video-controls-in-media-document-expected.png
new file mode 100644
index 0000000..965496c
--- /dev/null
+++ b/LayoutTests/platform/chromium/media/video-controls-in-media-document-expected.png
Binary files differ
diff --git a/LayoutTests/platform/chromium/media/video-controls-in-media-document-expected.txt b/LayoutTests/platform/chromium/media/video-controls-in-media-document-expected.txt
new file mode 100644
index 0000000..4331d93
--- /dev/null
+++ b/LayoutTests/platform/chromium/media/video-controls-in-media-document-expected.txt
@@ -0,0 +1,36 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x576
+ RenderBlock {P} at (0,0) size 784x20
+ RenderText {#text} at (0,0) size 660x19
+ text run at (0,0) width 660: "Test that controls don't increase the size of the container (i.e. are rendered overlapping with the video canvas)."
+ RenderBlock {P} at (0,36) size 784x300
+ RenderPartObject {IFRAME} at (0,0) size 400x300
+ layer at (0,0) size 400x300
+ RenderView at (0,0) size 400x300
+ layer at (0,0) size 400x300
+ RenderBlock {HTML} at (0,0) size 400x300
+ RenderBody {BODY} at (8,8) size 384x284 [bgcolor=#262626]
+ layer at (40,30) size 320x240
+ RenderVideo {VIDEO} at (40,30) size 320x240
+ layer at (40,30) size 320x240
+ RenderBlock (relative positioned) {DIV} at (0,0) size 320x240
+ layer at (40,238) size 320x32
+ RenderFlexibleBox (positioned) {DIV} at (0,208) size 320x32 [bgcolor=#00000099]
+ layer at (47,244) size 18x19
+ RenderButton {INPUT} at (7,6) size 18x19
+ layer at (70,238) size 256x32
+ RenderFlexibleBox (positioned) {DIV} at (30,0) size 256x32 [border: (1px solid #FFFFFF33) none (1px solid #FFFFFF33)]
+ RenderSlider {INPUT} at (7,7) size 184x18 [color=#328CDF] [bgcolor=#FFFFFF14] [border: (1px solid #FFFFFF33)]
+ RenderBlock {DIV} at (1,-5) size 9x29
+ layer at (267,244) size 58x20 scrollHeight 21
+ RenderFlexibleBox {DIV} at (197,6) size 58x20 [color=#FFFFFF]
+ RenderBlock (anonymous) at (8,0) size 42x21
+ RenderText {#text} at (0,1) size 42x19
+ text run at (0,1) width 42: "00:00"
+ layer at (326,238) size 34x32
+ RenderButton {INPUT} at (286,0) size 34x32
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index 9add870..3741546 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -291,3 +291,7 @@
# This port doesn't support v8 i18n extension.
fast/js/i18n-bindings-locale.html
+
+# Waiting for someone with a mac to baseline this (new) test for mac.
+# https://bugs.webkit.org/show_bug.cgi?id=54436
+media/video-controls-in-media-document.html
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 66835a5..7819ec5 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2011-02-15 Ami Fischman <fischman@chromium.org>
+
+ Reviewed by David Levin.
+
+ Remove the artificial -32px shift for media controls in mediaDocuments
+ so that they overlap the canvas as they do in non-mediaDocuments.
+ This also fixes test_shell failing to update the media slider (see
+ linked crbug below).
+
+ https://bugs.webkit.org/show_bug.cgi?id=27798
+ http://crbug.com/72623
+
+ Test: media/video-controls-in-media-document.html
+ Added a render test that asserts that the controls show up in the
+ expected spot (0,208) instead of below the canvas (0,240).
+
+ * css/mediaControlsChromium.css:
+
2011-02-15 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Darin Adler.
diff --git a/Source/WebCore/css/mediaControlsChromium.css b/Source/WebCore/css/mediaControlsChromium.css
index b8adc2c..60c7d62 100644
--- a/Source/WebCore/css/mediaControlsChromium.css
+++ b/Source/WebCore/css/mediaControlsChromium.css
@@ -42,7 +42,7 @@
}
video:-webkit-full-page-media::-webkit-media-controls-panel {
- bottom: -32px;
+ bottom: 0px;
}
audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button {