Title: [125590] trunk
Revision
125590
Author
[email protected]
Date
2012-08-14 12:38:04 -0700 (Tue, 14 Aug 2012)

Log Message

Fullscreen/normal volume sliders don't stay in sync
https://bugs.webkit.org/show_bug.cgi?id=93867

Reviewed by Eric Carlson.

Source/WebCore:

Change the full screen volume slider, if present, when the media element's volume
changes.

Test: media/video-controls-fullscreen-volume.html

* html/shadow/MediaControlRootElement.cpp:
(WebCore::MediaControlRootElement::changedVolume):

LayoutTests:

New test checking that volume changes in the media element are reflected in the full
screen volume slider.

* media/video-controls-fullscreen-volume-expected.txt: Added.
* media/video-controls-fullscreen-volume.html: Added.
* platform/chromium/TestExpectations: Skip this test on chromium.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (125589 => 125590)


--- trunk/LayoutTests/ChangeLog	2012-08-14 19:17:39 UTC (rev 125589)
+++ trunk/LayoutTests/ChangeLog	2012-08-14 19:38:04 UTC (rev 125590)
@@ -1,3 +1,17 @@
+2012-08-14  Jer Noble  <[email protected]>
+
+        Fullscreen/normal volume sliders don't stay in sync
+        https://bugs.webkit.org/show_bug.cgi?id=93867
+
+        Reviewed by Eric Carlson.
+
+        New test checking that volume changes in the media element are reflected in the full
+        screen volume slider.
+
+        * media/video-controls-fullscreen-volume-expected.txt: Added.
+        * media/video-controls-fullscreen-volume.html: Added.
+        * platform/chromium/TestExpectations: Skip this test on chromium.
+
 2012-08-14  Adrienne Walker  <[email protected]>
 
         [chromium] Mark fast/regex/unicodeCaseInsensitive.html expectation as crashing

Added: trunk/LayoutTests/media/video-controls-fullscreen-volume-expected.txt (0 => 125590)


--- trunk/LayoutTests/media/video-controls-fullscreen-volume-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/media/video-controls-fullscreen-volume-expected.txt	2012-08-14 19:38:04 UTC (rev 125590)
@@ -0,0 +1,8 @@
+EVENT(canplay)
+EVENT(webkitfullscreenchange)
+RUN(video.volume = 1)
+EXPECTED (volumeSlider.value == '1') OK
+RUN(video.volume = 0.5)
+EXPECTED (volumeSlider.value == '0.5') OK
+END OF TEST
+

Added: trunk/LayoutTests/media/video-controls-fullscreen-volume.html (0 => 125590)


--- trunk/LayoutTests/media/video-controls-fullscreen-volume.html	                        (rev 0)
+++ trunk/LayoutTests/media/video-controls-fullscreen-volume.html	2012-08-14 19:38:04 UTC (rev 125590)
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Video Element - Full Screen Volume Test</title>
+    <script src=""
+    <script src=""
+    <script src=""
+    <script src=""
+    <script>
+        var volumeSlider;
+
+        var startTest = function() {
+            findMediaElement();
+            waitForEvent(video, 'canplay', oncanplay);
+            video.src = "" 'content/test');
+        };
+
+        var _oncanplay_ = function() {
+            waitForEvent(video, 'webkitfullscreenchange', onfullscreenchange);
+            runWithKeyDown(function(){ video.webkitRequestFullscreen(); })
+        };
+
+        var _onfullscreenchange_ = function() {
+            volumeSlider = mediaControlsElement(internals.shadowRoot(video).firstChild, "-webkit-media-controls-fullscreen-volume-slider");
+            run('video.volume = 1');
+            testExpected('volumeSlider.value', 1);
+            run('video.volume = 0.5');
+            testExpected('volumeSlider.value', 0.5);
+            endTest();
+        };
+    </script>
+</head>
+<body _onload_="startTest()">
+    
+    <video controls></video>    
+    
+</body>
+</html>
\ No newline at end of file

Modified: trunk/LayoutTests/platform/chromium/TestExpectations (125589 => 125590)


--- trunk/LayoutTests/platform/chromium/TestExpectations	2012-08-14 19:17:39 UTC (rev 125589)
+++ trunk/LayoutTests/platform/chromium/TestExpectations	2012-08-14 19:38:04 UTC (rev 125590)
@@ -846,6 +846,9 @@
 // _javascript_Core bindings willfully have different behavior than V8 bindings
 WONTFIX SKIP : plugins/npruntime/overrides-all-properties.html = TEXT
 
+// Chromium doesn't use fullscreen-specific media controls
+WONTFIX SKIP : media/video-controls-fullscreen-volume.html = TEXT
+
 // -----------------------------------------------------------------
 // TESTS TO FIX
 // -----------------------------------------------------------------

Modified: trunk/Source/WebCore/ChangeLog (125589 => 125590)


--- trunk/Source/WebCore/ChangeLog	2012-08-14 19:17:39 UTC (rev 125589)
+++ trunk/Source/WebCore/ChangeLog	2012-08-14 19:38:04 UTC (rev 125590)
@@ -1,3 +1,18 @@
+2012-08-14  Jer Noble  <[email protected]>
+
+        Fullscreen/normal volume sliders don't stay in sync
+        https://bugs.webkit.org/show_bug.cgi?id=93867
+
+        Reviewed by Eric Carlson.
+
+        Change the full screen volume slider, if present, when the media element's volume
+        changes.
+
+        Test: media/video-controls-fullscreen-volume.html
+
+        * html/shadow/MediaControlRootElement.cpp:
+        (WebCore::MediaControlRootElement::changedVolume):
+
 2012-08-14  Olivier Blin  <[email protected]>
 
         Remove unused yyparse method in CSSParser

Modified: trunk/Source/WebCore/html/shadow/MediaControlRootElement.cpp (125589 => 125590)


--- trunk/Source/WebCore/html/shadow/MediaControlRootElement.cpp	2012-08-14 19:17:39 UTC (rev 125589)
+++ trunk/Source/WebCore/html/shadow/MediaControlRootElement.cpp	2012-08-14 19:38:04 UTC (rev 125590)
@@ -480,6 +480,9 @@
 {
     if (m_volumeSlider)
         m_volumeSlider->setVolume(m_mediaController->volume());
+
+    if (m_fullScreenVolumeSlider)
+        m_fullScreenVolumeSlider->setVolume(m_mediaController->volume());
 }
 
 void MediaControlRootElement::enteredFullscreen()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to