Title: [106459] trunk
Revision
106459
Author
[email protected]
Date
2012-02-01 02:31:15 -0800 (Wed, 01 Feb 2012)

Log Message

Fix the semantics of passing contentsVisible flag to GraphicsLayers
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 expected result
* compositing/visibility/layer-visible-content.html: fixed height so that result is platform-independent
* platform/chromium/test_expectations.txt: removed fail expectation, it should pass now.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (106458 => 106459)


--- trunk/LayoutTests/ChangeLog	2012-02-01 10:25:36 UTC (rev 106458)
+++ trunk/LayoutTests/ChangeLog	2012-02-01 10:31:15 UTC (rev 106459)
@@ -1,3 +1,14 @@
+2012-02-01  Shawn Singh  <[email protected]>
+
+        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 expected result
+        * compositing/visibility/layer-visible-content.html: fixed height so that result is platform-independent
+        * platform/chromium/test_expectations.txt: removed fail expectation, it should pass now.
+
 2012-02-01  Philippe Normand  <[email protected]>
 
         Unreviewed, GTK rebaseline after r106445

Modified: trunk/LayoutTests/compositing/visibility/layer-visible-content-expected.txt (106458 => 106459)


--- trunk/LayoutTests/compositing/visibility/layer-visible-content-expected.txt	2012-02-01 10:25:36 UTC (rev 106458)
+++ trunk/LayoutTests/compositing/visibility/layer-visible-content-expected.txt	2012-02-01 10:31:15 UTC (rev 106459)
@@ -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)
@@ -19,6 +18,11 @@
             )
           )
         )
+        (GraphicsLayer
+          (bounds 800.00 16.00)
+          (opacity 0.00)
+          (drawsContent 1)
+        )
       )
     )
   )

Modified: trunk/LayoutTests/compositing/visibility/layer-visible-content.html (106458 => 106459)


--- trunk/LayoutTests/compositing/visibility/layer-visible-content.html	2012-02-01 10:25:36 UTC (rev 106458)
+++ trunk/LayoutTests/compositing/visibility/layer-visible-content.html	2012-02-01 10:31:15 UTC (rev 106459)
@@ -37,6 +37,7 @@
     }
     pre {
         opacity: 0; /* hide in pixel result */
+        height: 16px; /* avoid platform-dependent height difference of hidden text layer-tree */
     }
   </style>
   <script>

Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (106458 => 106459)


--- trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-02-01 10:25:36 UTC (rev 106458)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-02-01 10:31:15 UTC (rev 106459)
@@ -4014,8 +4014,6 @@
 // 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 TIMEOUT

Modified: trunk/Source/WebCore/ChangeLog (106458 => 106459)


--- trunk/Source/WebCore/ChangeLog	2012-02-01 10:25:36 UTC (rev 106458)
+++ trunk/Source/WebCore/ChangeLog	2012-02-01 10:31:15 UTC (rev 106459)
@@ -1,3 +1,17 @@
+2012-02-01  Shawn Singh  <[email protected]>
+
+        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-02-01  Philippe Normand  <[email protected]>
 
         Unreviewed, another GTK build fix after r106446.

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (106458 => 106459)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2012-02-01 10:25:36 UTC (rev 106458)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2012-02-01 10:31:15 UTC (rev 106459)
@@ -403,8 +403,12 @@
 #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() || hasVisibleNonCompositingDescendantLayers());
+
     RenderStyle* style = renderer()->style();
     m_graphicsLayer->setPreserves3D(style->transformStyle3D() == TransformStyle3DPreserve3D && !renderer()->hasReflection());
     m_graphicsLayer->setBackfaceVisibility(style->backfaceVisibility() == BackfaceVisibilityVisible);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to