Title: [103489] trunk
Revision
103489
Author
commit-qu...@webkit.org
Date
2011-12-21 20:41:34 -0800 (Wed, 21 Dec 2011)

Log Message

[chromium] Scale audio, video tags in MediaDocument to fit in window.
https://bugs.webkit.org/show_bug.cgi?id=73948

Source/WebCore:

Add CSS max-height: 100%, max-width: 100% settings to the audio and
video tags when in MediaDocuments.

Patch by Dale Curtis <dalecur...@chromium.org> on 2011-12-21
Reviewed by Eric Seidel.

Test: media/video-scales-in-media-document.html

* css/mediaControlsChromium.css:
(audio:-webkit-full-page-media, video:-webkit-full-page-media):

LayoutTests:

Added new layout test to verify audio, video tags scale to fit
undersized containers.

Patch by Dale Curtis <dalecur...@chromium.org> on 2011-12-21
Reviewed by Eric Seidel.

* media/video-scales-in-media-document-expected.txt: Added.
* media/video-scales-in-media-document.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (103488 => 103489)


--- trunk/LayoutTests/ChangeLog	2011-12-22 04:39:15 UTC (rev 103488)
+++ trunk/LayoutTests/ChangeLog	2011-12-22 04:41:34 UTC (rev 103489)
@@ -1,3 +1,16 @@
+2011-12-21  Dale Curtis  <dalecur...@chromium.org>
+
+        [chromium] Scale audio, video tags in MediaDocument to fit in window.
+        https://bugs.webkit.org/show_bug.cgi?id=73948
+
+        Added new layout test to verify audio, video tags scale to fit
+        undersized containers.
+
+        Reviewed by Eric Seidel.
+
+        * media/video-scales-in-media-document-expected.txt: Added.
+        * media/video-scales-in-media-document.html: Added.
+
 2011-12-21  Eric Carlson  <eric.carl...@apple.com>
 
         Fix text track cue font size and colors

Added: trunk/LayoutTests/media/video-scales-in-media-document-expected.txt (0 => 103489)


--- trunk/LayoutTests/media/video-scales-in-media-document-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/media/video-scales-in-media-document-expected.txt	2011-12-22 04:41:34 UTC (rev 103489)
@@ -0,0 +1,7 @@
+Test that video media documents scale to fit undersized containers.
+
+
+EXPECTED (200 == '200') OK
+EXPECTED (163 == '163') OK
+END OF TEST
+

Added: trunk/LayoutTests/media/video-scales-in-media-document.html (0 => 103489)


--- trunk/LayoutTests/media/video-scales-in-media-document.html	                        (rev 0)
+++ trunk/LayoutTests/media/video-scales-in-media-document.html	2011-12-22 04:41:34 UTC (rev 103489)
@@ -0,0 +1,32 @@
+<html>
+    <head>
+        <script src=""
+        <script src=""
+        <script>
+            function canPlayThrough(event) {
+                var video = event.target;
+                testExpected(video.offsetWidth, 200);
+                testExpected(video.offsetHeight, 163);
+                endTest();
+            }
+
+            function iframeLoad() {
+                var iframe = document.querySelector("iframe");
+                var video = iframe.contentDocument.querySelector("video");
+                video.addEventListener("canplaythrough", canPlayThrough);
+                video.load()
+            }
+
+            function load() {
+                var iframe = document.querySelector("iframe");
+                iframe._onload_ = iframeLoad;
+                iframe.src = "" "content/counting");
+            }
+        </script>
+    </head>
+
+    <body _onload_="load()">
+        <p>Test that video media documents scale to fit undersized containers.</p>
+        <iframe style="width: 200px; height: 200px;"></iframe>
+   </body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (103488 => 103489)


--- trunk/Source/WebCore/ChangeLog	2011-12-22 04:39:15 UTC (rev 103488)
+++ trunk/Source/WebCore/ChangeLog	2011-12-22 04:41:34 UTC (rev 103489)
@@ -1,3 +1,18 @@
+2011-12-21  Dale Curtis  <dalecur...@chromium.org>
+
+        [chromium] Scale audio, video tags in MediaDocument to fit in window.
+        https://bugs.webkit.org/show_bug.cgi?id=73948
+
+        Add CSS max-height: 100%, max-width: 100% settings to the audio and
+        video tags when in MediaDocuments.
+
+        Reviewed by Eric Seidel.
+
+        Test: media/video-scales-in-media-document.html
+
+        * css/mediaControlsChromium.css:
+        (audio:-webkit-full-page-media, video:-webkit-full-page-media):
+
 2011-12-21  Konrad Piascik  <kpias...@rim.com>
 
         Implement the _javascript_Core bindings for eventListenerHandlerLocation

Modified: trunk/Source/WebCore/css/mediaControlsChromium.css (103488 => 103489)


--- trunk/Source/WebCore/css/mediaControlsChromium.css	2011-12-22 04:39:15 UTC (rev 103488)
+++ trunk/Source/WebCore/css/mediaControlsChromium.css	2011-12-22 04:41:34 UTC (rev 103489)
@@ -30,6 +30,11 @@
     height: 32px;
 }
 
+audio:-webkit-full-page-media, video:-webkit-full-page-media {
+    max-height: 100%;
+    max-width: 100%;
+}
+
 audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel {
     -webkit-user-select: none;
     position: absolute;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to