Title: [139824] trunk
Revision
139824
Author
charles....@torchmobile.com.cn
Date
2013-01-15 19:02:58 -0800 (Tue, 15 Jan 2013)

Log Message

Fullscreen element should not share styles with it's siblings.
https://bugs.webkit.org/show_bug.cgi?id=106888

Reviewed by George Staikos.

Source/WebCore:

Test: fullscreen/full-screen-no-style-sharing.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithElement):

LayoutTests:

* fullscreen/full-screen-no-style-sharing-expected.txt: Added.
* fullscreen/full-screen-no-style-sharing.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (139823 => 139824)


--- trunk/LayoutTests/ChangeLog	2013-01-16 03:00:27 UTC (rev 139823)
+++ trunk/LayoutTests/ChangeLog	2013-01-16 03:02:58 UTC (rev 139824)
@@ -1,3 +1,13 @@
+2013-01-15  Charles Wei  <charles....@torchmobile.com.cn>
+
+        Fullscreen element should not share styles with it's siblings.
+        https://bugs.webkit.org/show_bug.cgi?id=106888
+
+        Reviewed by George Staikos.
+
+        * fullscreen/full-screen-no-style-sharing-expected.txt: Added.
+        * fullscreen/full-screen-no-style-sharing.html: Added.
+
 2013-01-15  Dominic Cooney   <domin...@chromium.org>
 
         [Chromium] Unreviewed gardening.

Added: trunk/LayoutTests/fullscreen/full-screen-no-style-sharing-expected.txt (0 => 139824)


--- trunk/LayoutTests/fullscreen/full-screen-no-style-sharing-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fullscreen/full-screen-no-style-sharing-expected.txt	2013-01-16 03:02:58 UTC (rev 139824)
@@ -0,0 +1,3 @@
+EVENT(webkitfullscreenchange) TEST(video2.clientWidth==document.body.clientWidth) OK
+END OF TEST
+

Added: trunk/LayoutTests/fullscreen/full-screen-no-style-sharing.html (0 => 139824)


--- trunk/LayoutTests/fullscreen/full-screen-no-style-sharing.html	                        (rev 0)
+++ trunk/LayoutTests/fullscreen/full-screen-no-style-sharing.html	2013-01-16 03:02:58 UTC (rev 139824)
@@ -0,0 +1,17 @@
+<body>
+    <video id="video1" width="1"></video>
+    <video id="video2" width="1"></video>
+    <script src=""
+    <script src=""
+    <script>
+        var video2 = document.getElementById('video2');
+        // Bail out early if the full screen API is not enabled or is missing:
+        if (Element.prototype.webkitRequestFullScreen == undefined) {
+            logResult(false, "Element.prototype.webkitRequestFullScreen == undefined");
+            endTest();
+        } else {
+            waitForEventTestAndEnd(document, 'webkitfullscreenchange', "video2.clientWidth==document.body.clientWidth");
+            runWithKeyDown(function(){video2.webkitRequestFullScreen()});
+        }
+    </script>
+</body>

Modified: trunk/Source/WebCore/ChangeLog (139823 => 139824)


--- trunk/Source/WebCore/ChangeLog	2013-01-16 03:00:27 UTC (rev 139823)
+++ trunk/Source/WebCore/ChangeLog	2013-01-16 03:02:58 UTC (rev 139824)
@@ -1,3 +1,15 @@
+2013-01-15  Charles Wei  <charles....@torchmobile.com.cn>
+
+        Fullscreen element should not share styles with it's siblings.
+        https://bugs.webkit.org/show_bug.cgi?id=106888
+
+        Reviewed by George Staikos.
+
+        Test: fullscreen/full-screen-no-style-sharing.html
+
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::canShareStyleWithElement):
+
 2013-01-15  Tim Horton  <timothy_hor...@apple.com>
 
         Clamp TileCache visibleRect to WKView's visibleRect

Modified: trunk/Source/WebCore/css/StyleResolver.cpp (139823 => 139824)


--- trunk/Source/WebCore/css/StyleResolver.cpp	2013-01-16 03:00:27 UTC (rev 139823)
+++ trunk/Source/WebCore/css/StyleResolver.cpp	2013-01-16 03:02:58 UTC (rev 139824)
@@ -1245,6 +1245,10 @@
         return false;
 #endif
 
+#if ENABLE(FULLSCREEN_API)
+    if (element == element->document()->webkitCurrentFullScreenElement() || m_element == m_element->document()->webkitCurrentFullScreenElement())
+        return false;
+#endif
     return true;
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to