[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

simon.fraser at apple.com simon.fraser at apple.com
Thu Oct 29 20:44:01 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 8a158ef0328906d17c0adb45ffbbc3428ceb77f0
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 13 22:53:34 2009 +0000

    2009-10-13  Simon Fraser  <simon.fraser at apple.com>
    
            Reviewed by Dan Bernstein.
    
            Visibility:visible inside a compositing layer doesn't make the element visible
            https://bugs.webkit.org/show_bug.cgi?id=30339
    
            When deciding if a layer had any renderable content, RenderLayerBacking::paintIntoLayer()
            only consulted hasVisibleContent(), which does not take into a account child layers which
            may be visible. We also have to consult hasVisibleDescendant() as well.
    
            Test: compositing/compositing-visible-descendant.html
    
            * rendering/RenderLayer.h:
            (WebCore::RenderLayer::hasVisibleDescendant):
            * rendering/RenderLayerBacking.cpp:
            (WebCore::RenderLayerBacking::paintIntoLayer):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49520 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 7cb8d70..c6e0947 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2009-10-13  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Visibility:visible inside a compositing layer doesn't make the element visible
+        https://bugs.webkit.org/show_bug.cgi?id=30339
+        
+        Test painting of a visibilty:visible layer inside a composited, visibility:hidden layer.
+
+        * compositing/compositing-visible-descendant.html: Added.
+        * platform/mac/compositing/compositing-visible-descendant-expected.checksum: Added.
+        * platform/mac/compositing/compositing-visible-descendant-expected.png: Added.
+        * platform/mac/compositing/compositing-visible-descendant-expected.txt: Added.
+
 2009-10-13  Alexey Proskuryakov  <ap at apple.com>
 
         Reviewed by Dan Bernstein.
diff --git a/LayoutTests/compositing/compositing-visible-descendant.html b/LayoutTests/compositing/compositing-visible-descendant.html
new file mode 100644
index 0000000..597bbc1
--- /dev/null
+++ b/LayoutTests/compositing/compositing-visible-descendant.html
@@ -0,0 +1,53 @@
+<!DOCTYPE>
+
+<html>
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+  <title>visibility:hidden on child of compositing layer</title>
+  <style type="text/css" media="screen">
+    .box {
+      height: 100px;
+      width: 100px;
+    }
+    
+    .outer {
+      position: absolute;
+      top: 40px;
+      left: 20px;
+      height: 100px;
+      width: 100px;
+      outline: 2px solid black;
+      visibility: hidden;
+      -webkit-transform: translateZ(0);
+    }
+        
+    .inner {
+      position: relative;
+      height: 100px;
+      width: 100px;
+      background-color: green;
+      visibility: visible;
+    }
+    
+    #indicator {
+      position: absolute;
+      top: 40px;
+      left: 20px;
+      height: 100px;
+      width: 100px;
+      background-color: red;
+    }
+  </style>
+</head>
+<body>
+
+<p>You should see one green square below.</p>
+<div id="indicator"></div>
+
+<div class="outer box">
+    <div class="inner box">
+    </div>
+</div>
+
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/compositing/compositing-visible-descendant-expected.checksum b/LayoutTests/platform/mac/compositing/compositing-visible-descendant-expected.checksum
new file mode 100644
index 0000000..921c3bc
--- /dev/null
+++ b/LayoutTests/platform/mac/compositing/compositing-visible-descendant-expected.checksum
@@ -0,0 +1 @@
+4ba7308a0fdafbc76c944109f75b7fde
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/compositing/compositing-visible-descendant-expected.png b/LayoutTests/platform/mac/compositing/compositing-visible-descendant-expected.png
new file mode 100644
index 0000000..946e1da
Binary files /dev/null and b/LayoutTests/platform/mac/compositing/compositing-visible-descendant-expected.png differ
diff --git a/LayoutTests/platform/mac/compositing/compositing-visible-descendant-expected.txt b/LayoutTests/platform/mac/compositing/compositing-visible-descendant-expected.txt
new file mode 100644
index 0000000..4ba7739
--- /dev/null
+++ b/LayoutTests/platform/mac/compositing/compositing-visible-descendant-expected.txt
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x576
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 256x18
+          text run at (0,0) width 256: "You should see one green square below."
+layer at (20,40) size 100x100
+  RenderBlock (positioned) {DIV} at (20,40) size 100x100 [bgcolor=#FF0000]
+layer at (20,40) size 100x100
+  RenderBlock (positioned) {DIV} at (20,40) size 100x100
+layer at (20,40) size 100x100
+  RenderBlock (relative positioned) {DIV} at (0,0) size 100x100 [bgcolor=#008000]
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8eecefb..22ac5c9 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2009-10-13  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Visibility:visible inside a compositing layer doesn't make the element visible
+        https://bugs.webkit.org/show_bug.cgi?id=30339
+        
+        When deciding if a layer had any renderable content, RenderLayerBacking::paintIntoLayer()
+        only consulted hasVisibleContent(), which does not take into a account child layers which
+        may be visible. We also have to consult hasVisibleDescendant() as well.
+
+        Test: compositing/compositing-visible-descendant.html
+
+        * rendering/RenderLayer.h:
+        (WebCore::RenderLayer::hasVisibleDescendant):
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::paintIntoLayer):
+
 2009-10-13  Laszlo Gombos  <laszlo.1.gombos at nokia.com>
 
         Reviewed by Simon Hausmann.
diff --git a/WebCore/rendering/RenderLayer.h b/WebCore/rendering/RenderLayer.h
index 9d2212b..e6a15c5 100644
--- a/WebCore/rendering/RenderLayer.h
+++ b/WebCore/rendering/RenderLayer.h
@@ -327,6 +327,7 @@ public:
     Vector<RenderLayer*>* normalFlowList() const { return m_normalFlowList; }
 
     bool hasVisibleContent() const { return m_hasVisibleContent; }
+    bool hasVisibleDescendant() const { return m_hasVisibleDescendant; }
     void setHasVisibleContent(bool);
     void dirtyVisibleContentStatus();
 
diff --git a/WebCore/rendering/RenderLayerBacking.cpp b/WebCore/rendering/RenderLayerBacking.cpp
index 941817c..50e4756 100644
--- a/WebCore/rendering/RenderLayerBacking.cpp
+++ b/WebCore/rendering/RenderLayerBacking.cpp
@@ -886,7 +886,7 @@ void RenderLayerBacking::paintIntoLayer(RenderLayer* rootLayer, GraphicsContext*
     if (paintingRoot && !renderer()->isDescendantOf(paintingRoot))
         paintingRootForRenderer = paintingRoot;
 
-    bool shouldPaint = m_owningLayer->hasVisibleContent() && m_owningLayer->isSelfPaintingLayer();
+    bool shouldPaint = (m_owningLayer->hasVisibleContent() || m_owningLayer->hasVisibleDescendant()) && m_owningLayer->isSelfPaintingLayer();
 
     if (shouldPaint && (paintingPhase & GraphicsLayerPaintBackground)) {
         // If this is the root then we need to send in a bigger bounding box

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list