Title: [104589] trunk
Revision
104589
Author
jer.no...@apple.com
Date
2012-01-10 09:38:34 -0800 (Tue, 10 Jan 2012)

Log Message

Elements can appear over fullscreen video
https://bugs.webkit.org/show_bug.cgi?id=75913

Reviewed by Simon Fraser.

Source/WebCore:

No new tests; updated fullscreen/full-screen-zIndex.html to trigger error condition.

RenderFullScreenPlaceholder inherits the pre-fullscreen element's style, causing a stacking
context to be created.  Instead of making the placeholder the parent of the RenderFullScreen
object, make the two renderers siblings.  Then the stacking context created by the placeholder
will not affect the z-ordering of the RenderFullScreen.

* rendering/RenderFullScreen.cpp:
(RenderFullScreen::wrapRenderer):
(RenderFullScreen::unwrapRenderer):
(RenderFullScreen::createPlaceholder):

LayoutTests:

Update the test to trigger the error condition in the linked bug.

* fullscreen/full-screen-zIndex.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (104588 => 104589)


--- trunk/LayoutTests/ChangeLog	2012-01-10 17:34:33 UTC (rev 104588)
+++ trunk/LayoutTests/ChangeLog	2012-01-10 17:38:34 UTC (rev 104589)
@@ -1,3 +1,14 @@
+2012-01-09  Jer Noble  <jer.no...@apple.com>
+
+        Elements can appear over fullscreen video
+        https://bugs.webkit.org/show_bug.cgi?id=75913
+
+        Reviewed by Simon Fraser.
+
+        Update the test to trigger the error condition in the linked bug.
+
+        * fullscreen/full-screen-zIndex.html:
+
 2012-01-10  Julien Chaffraix  <jchaffr...@webkit.org>
 
         REGRESSION (r93614): Safari Reader doesn't repaint correctly when scrolling

Modified: trunk/LayoutTests/fullscreen/full-screen-zIndex.html (104588 => 104589)


--- trunk/LayoutTests/fullscreen/full-screen-zIndex.html	2012-01-10 17:34:33 UTC (rev 104588)
+++ trunk/LayoutTests/fullscreen/full-screen-zIndex.html	2012-01-10 17:38:34 UTC (rev 104589)
@@ -26,6 +26,8 @@
                 height: 100px;
                 border: 4px solid darkgreen;
                 background-color: green;
+                z-index: 100;
+                position: relative;
             }
             #block2 {
                 width: 100px;

Modified: trunk/Source/WebCore/ChangeLog (104588 => 104589)


--- trunk/Source/WebCore/ChangeLog	2012-01-10 17:34:33 UTC (rev 104588)
+++ trunk/Source/WebCore/ChangeLog	2012-01-10 17:38:34 UTC (rev 104589)
@@ -1,3 +1,22 @@
+2012-01-09  Jer Noble  <jer.no...@apple.com>
+
+        Elements can appear over fullscreen video
+        https://bugs.webkit.org/show_bug.cgi?id=75913
+
+        Reviewed by Simon Fraser.
+
+        No new tests; updated fullscreen/full-screen-zIndex.html to trigger error condition.
+
+        RenderFullScreenPlaceholder inherits the pre-fullscreen element's style, causing a stacking
+        context to be created.  Instead of making the placeholder the parent of the RenderFullScreen
+        object, make the two renderers siblings.  Then the stacking context created by the placeholder
+        will not affect the z-ordering of the RenderFullScreen.
+
+        * rendering/RenderFullScreen.cpp:
+        (RenderFullScreen::wrapRenderer):
+        (RenderFullScreen::unwrapRenderer):
+        (RenderFullScreen::createPlaceholder):
+
 2012-01-10  Pavel Feldman  <pfeld...@google.com>
 
         Web Inspector: add "free flow DOM editing" experiment.

Modified: trunk/Source/WebCore/rendering/RenderFullScreen.cpp (104588 => 104589)


--- trunk/Source/WebCore/rendering/RenderFullScreen.cpp	2012-01-10 17:34:33 UTC (rev 104588)
+++ trunk/Source/WebCore/rendering/RenderFullScreen.cpp	2012-01-10 17:38:34 UTC (rev 104589)
@@ -117,21 +117,20 @@
         fullscreenRenderer->addChild(object);
     }
     document->setFullScreenRenderer(fullscreenRenderer);
-    if (fullscreenRenderer->placeholder())
-        return fullscreenRenderer->placeholder();
     return fullscreenRenderer;
 }
 
 void RenderFullScreen::unwrapRenderer()
 {
-    RenderObject* holder = placeholder() ? placeholder() : this;
-    if (holder->parent()) {
+    if (parent()) {
         RenderObject* child;
         while ((child = firstChild())) {
             child->remove();
-            holder->parent()->addChild(child, holder);
+            parent()->addChild(child, this);
         }
     }
+    if (placeholder())
+        placeholder()->remove();
     remove();
     document()->setFullScreenRenderer(0);
 }
@@ -151,11 +150,8 @@
     if (!m_placeholder) {
         m_placeholder = new (document()->renderArena()) RenderFullScreenPlaceholder(this);
         m_placeholder->setStyle(style);
-        if (parent()) {
+        if (parent())
             parent()->addChild(m_placeholder, this);
-            remove();
-        }
-        m_placeholder->addChild(this);
     } else
         m_placeholder->setStyle(style);
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to