Fullscreen content doesn't use fullscreen controller on Windows
authorjeffm@apple.com <jeffm@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Jul 2011 14:02:17 +0000 (14:02 +0000)
committerjeffm@apple.com <jeffm@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Jul 2011 14:02:17 +0000 (14:02 +0000)
https://bugs.webkit.org/show_bug.cgi?id=64540
<rdar://problem/9510455>

Source/WebCore:

Reviewed by Darin Adler.

RenderThemeWin needs to override extraFullScreenStyleSheet() to return
the fullscreenQuickTime stylesheet.

Test added to fullscreen/video-controls-override.html.

* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::extraFullScreenStyleSheet): Added.
* rendering/RenderThemeWin.h: Override extraFullScreenStyleSheet().

LayoutTests:

Reviewed by Darin Adler.

Add another test to video-controls-override.html to verify that
we're using the correct fullscreen controller by checking the
height of the controller panel, which is taller than the non-fullscreen
version. Unfortunately, the fullscreen tests don't work on Windows
yet, but I verified this would have caught this issue by simulating
the bug on the Mac.

* fullscreen/video-controls-override-expected.txt: Add new test to check the height of the panel.

* fullscreen/video-controls-override.html: Add new test to check the height of the panel, and
log errors if window.internals or window.layoutTestController are undefined.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@91066 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fullscreen/video-controls-override-expected.txt
LayoutTests/fullscreen/video-controls-override.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderThemeWin.cpp
Source/WebCore/rendering/RenderThemeWin.h

index f0cd591..c735b0c 100644 (file)
@@ -1,3 +1,23 @@
+2011-07-15  Jeff Miller  <jeffm@apple.com>
+
+        Fullscreen content doesn't use fullscreen controller on Windows
+        https://bugs.webkit.org/show_bug.cgi?id=64540
+        <rdar://problem/9510455>
+
+        Reviewed by Darin Adler.
+        
+        Add another test to video-controls-override.html to verify that
+        we're using the correct fullscreen controller by checking the
+        height of the controller panel, which is taller than the non-fullscreen
+        version. Unfortunately, the fullscreen tests don't work on Windows
+        yet, but I verified this would have caught this issue by simulating
+        the bug on the Mac.
+
+        * fullscreen/video-controls-override-expected.txt: Add new test to check the height of the panel.
+
+        * fullscreen/video-controls-override.html: Add new test to check the height of the panel, and
+        log errors if window.internals or window.layoutTestController are undefined.
+
 2011-07-15  Mike West  <mkwst@chromium.org>
 
         Web Inspector: Rename console.markTimeline() to console.timeStamp() for Firebug compatibility.
index d6c906d..9e2f0ab 100644 (file)
@@ -5,6 +5,7 @@ EXPECTED (shadowRoot = internals.shadowRoot(video) != 'null') OK
 EXPECTED (panel = shadowRoot.firstChild.firstChild != 'null') OK
 EXPECTED (internals.shadowPseudoId(panel) == '-webkit-media-controls-panel') OK
 EXPECTED (document.defaultView.getComputedStyle(panel)['display'] != 'none') OK
+EXPECTED (document.defaultView.getComputedStyle(panel)['height'] == '48px') OK
 EVENT(webkitfullscreenchange)
 EXPECTED (document.defaultView.getComputedStyle(panel)['display'] == 'none') OK
 END OF TEST
index 69d5098..ecb868b 100644 (file)
                 testExpected("panel = shadowRoot.firstChild.firstChild", null, "!=");
                 testExpected("internals.shadowPseudoId(panel)", "-webkit-media-controls-panel");
                 testExpected("document.defaultView.getComputedStyle(panel)['display']", 'none', "!=");
+                testExpected("document.defaultView.getComputedStyle(panel)['height']", '48px');
             }
+            else
+                logResult(false, "window.internals == undefined");
+            
             callback = cancelledFullScreen;
             document.webkitCancelFullScreen();
         };
@@ -30,6 +34,9 @@
         var cancelledFullScreen = function() {
             if (window.layoutTestController)
                 testExpected("document.defaultView.getComputedStyle(panel)['display']", 'none');
+            else
+                logResult(false, "window.layoutTestController == undefined");
+
             endTest();
         };
 
index 7b65f45..642b261 100644 (file)
@@ -1,3 +1,20 @@
+2011-07-15  Jeff Miller  <jeffm@apple.com>
+
+        Fullscreen content doesn't use fullscreen controller on Windows
+        https://bugs.webkit.org/show_bug.cgi?id=64540
+        <rdar://problem/9510455>
+
+        Reviewed by Darin Adler.
+
+        RenderThemeWin needs to override extraFullScreenStyleSheet() to return
+        the fullscreenQuickTime stylesheet.
+
+        Test added to fullscreen/video-controls-override.html.
+
+        * rendering/RenderThemeWin.cpp:
+        (WebCore::RenderThemeWin::extraFullScreenStyleSheet): Added.
+        * rendering/RenderThemeWin.h: Override extraFullScreenStyleSheet().
+
 2011-07-15  Nikolas Zimmermann  <nzimmermann@rim.com>
 
         Not reviewed. Fix build failure introduced in r91061.
index a355c67..7a7afcc 100644 (file)
@@ -1035,6 +1035,13 @@ String RenderThemeWin::extraMediaControlsStyleSheet()
     return String(mediaControlsQuickTimeUserAgentStyleSheet, sizeof(mediaControlsQuickTimeUserAgentStyleSheet));
 }
 
+#if ENABLE(FULLSCREEN_API)
+String RenderThemeWin::extraFullScreenStyleSheet()
+{
+    return String(fullscreenQuickTimeUserAgentStyleSheet, sizeof(fullscreenQuickTimeUserAgentStyleSheet));
+}
+#endif
+
 bool RenderThemeWin::supportsClosedCaptioning() const
 {
         // We rely on QuickTime to render captions so only enable the button for a video element.
index 373b479..3f33a6d 100644 (file)
@@ -124,6 +124,9 @@ public:
 
 #if ENABLE(VIDEO)
     virtual String extraMediaControlsStyleSheet();
+#if ENABLE(FULLSCREEN_API)
+    virtual String extraFullScreenStyleSheet();
+#endif
     virtual bool supportsClosedCaptioning() const;
     virtual bool paintMediaControlsBackground(RenderObject*, const PaintInfo&, const IntRect&);
     virtual bool paintMediaFullscreenButton(RenderObject*, const PaintInfo&, const IntRect&);