Fix the semantics of passing contentsVisible flag to GraphicsLayers
authorshawnsingh@chromium.org <shawnsingh@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2012 19:53:05 +0000 (19:53 +0000)
committershawnsingh@chromium.org <shawnsingh@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2012 19:53:05 +0000 (19:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=76975

Reviewed by Simon Fraser.

Source/WebCore:

This patch is covered by existing tests, in particular
compositing/visibility/layer-visible-content.html; its
expectations are rebaselined.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):

LayoutTests:

* compositing/visibility/layer-visible-content-expected.txt: rebaselined expectations.
* compositing/visibility/visibility-image-layers-dynamic-expected.txt: rebaselined expectations.
* platform/chromium/test_expectations.txt: removed the expectation that the test fails on chromium, it should pass now.

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

LayoutTests/ChangeLog
LayoutTests/compositing/visibility/layer-visible-content-expected.txt
LayoutTests/compositing/visibility/visibility-image-layers-dynamic-expected.txt
LayoutTests/platform/chromium/test_expectations.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerBacking.cpp

index 28d3ab60f80918b5c4c5fed566a46352c5770fa2..f5e61022b0626cf4f355b245d8bb354feec65a81 100644 (file)
@@ -1,3 +1,14 @@
+2012-01-25  Shawn Singh  <shawnsingh@chromium.org>
+
+        Fix the semantics of passing contentsVisible flag to GraphicsLayers
+        https://bugs.webkit.org/show_bug.cgi?id=76975
+
+        Reviewed by Simon Fraser.
+
+        * compositing/visibility/layer-visible-content-expected.txt: rebaselined expectations.
+        * compositing/visibility/visibility-image-layers-dynamic-expected.txt: rebaselined expectations.
+        * platform/chromium/test_expectations.txt: removed the expectation that the test fails on chromium, it should pass now.
+
 2012-01-25  MORITA Hajime  <morrita@google.com>
 
         Unreviewed test fix to followup r105900.
index a5c18c4877079eeb0d238ed07d07d4d8ed7837a0..b7e3fbda0ac309ec0d13d2107c6739a1230bacef 100644 (file)
@@ -3,11 +3,10 @@
   (children 1
     (GraphicsLayer
       (bounds 800.00 600.00)
-      (children 1
+      (children 2
         (GraphicsLayer
           (bounds 200.00 200.00)
           (drawsContent 1)
-          (contentsVisible 0)
           (children 1
             (GraphicsLayer
               (bounds 200.00 200.00)
             )
           )
         )
+        (GraphicsLayer
+          (bounds 800.00 15.00)
+          (opacity 0.00)
+          (drawsContent 1)
+        )
       )
     )
   )
index a10ebd47b96ec69210e4484ea886457edd7392f1..e7be785badc2f243bfaacfed94add23ea42929c8 100644 (file)
@@ -35,7 +35,6 @@ Initial
         (GraphicsLayer
           (position 14.00 314.00)
           (bounds 757.00 152.00)
-          (contentsVisible 0)
           (children 1
             (GraphicsLayer
               (position 20.00 20.00)
@@ -50,10 +49,10 @@ Initial
 After step 1
 
 (GraphicsLayer
-  (bounds 785.00 1301.00)
+  (bounds 785.00 1286.00)
   (children 1
     (GraphicsLayer
-      (bounds 785.00 1301.00)
+      (bounds 785.00 1286.00)
       (children 3
         (GraphicsLayer
           (position 14.00 6.00)
@@ -80,7 +79,6 @@ After step 1
         (GraphicsLayer
           (position 14.00 314.00)
           (bounds 757.00 152.00)
-          (contentsVisible 0)
           (children 1
             (GraphicsLayer
               (position 20.00 20.00)
@@ -95,10 +93,10 @@ After step 1
 After step 2
 
 (GraphicsLayer
-  (bounds 785.00 1965.00)
+  (bounds 785.00 1935.00)
   (children 1
     (GraphicsLayer
-      (bounds 785.00 1965.00)
+      (bounds 785.00 1935.00)
       (children 3
         (GraphicsLayer
           (position 14.00 6.00)
@@ -124,7 +122,6 @@ After step 2
         (GraphicsLayer
           (position 14.00 314.00)
           (bounds 757.00 152.00)
-          (contentsVisible 0)
           (children 1
             (GraphicsLayer
               (position 20.00 20.00)
index 1119d5655beab70e15136d7a2d9a6b2831f3d690..7f0a94696547197131a3c6aa97cfe7b628603ba3 100644 (file)
@@ -4004,8 +4004,6 @@ BUG_CARYCLARK MAC : fast/dom/blur-contenteditable.html = IMAGE
 // Need to implement file name logging.
 BUGWK76572 : http/tests/download = FAIL
 
-BUGWK76716 : compositing/visibility/layer-visible-content.html = IMAGE+TEXT
-
 BUGWK76967 : media/media-fragments/TC0030-TC0039.html = PASS TIMEOUT
 
 BUGABARTH : media/audio-garbage-collect.html = PASS FAIL
index 63f3a4c2ead127871038636d47033f89484a67e4..b0d76de1add6bd0c555bf8675ed6adf6276a84a7 100644 (file)
@@ -1,3 +1,17 @@
+2012-01-25  Shawn Singh  <shawnsingh@chromium.org>
+
+        Fix the semantics of passing contentsVisible flag to GraphicsLayers
+        https://bugs.webkit.org/show_bug.cgi?id=76975
+
+        Reviewed by Simon Fraser.
+
+        This patch is covered by existing tests, in particular
+        compositing/visibility/layer-visible-content.html; its
+        expectations are rebaselined.
+
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
+
 2012-01-25  Tony Chang  <tony@chromium.org>
 
         support overflow:auto and overflow:scroll in new flexbox
index 628185c358b91b04f983487b06276952ed63aef1..7e9ed4ab05d1ba9857edb1100900a9c692e5e734 100644 (file)
@@ -403,7 +403,11 @@ void RenderLayerBacking::updateGraphicsLayerGeometry()
 #endif
     
     m_owningLayer->updateVisibilityStatus();
-    m_graphicsLayer->setContentsVisible(m_owningLayer->hasVisibleContent());
+
+    // m_graphicsLayer is the corresponding GraphicsLayer for this RenderLayer and its non-compositing
+    // descendants. So, the visibility flag for m_graphicsLayer should be true if there are any
+    // non-compositing visible layers.
+    m_graphicsLayer->setContentsVisible(m_owningLayer->hasVisibleContent() || m_owningLayer->hasVisibleDescendant());
     
     RenderStyle* style = renderer()->style();
     m_graphicsLayer->setPreserves3D(style->transformStyle3D() == TransformStyle3DPreserve3D && !renderer()->hasReflection());