Title: [106841] branches/chromium/1025
Revision
106841
Author
shawnsi...@chromium.org
Date
2012-02-06 13:19:30 -0800 (Mon, 06 Feb 2012)

Log Message

Merge 106459 - 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.


TBR=shawnsi...@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9342003

Modified Paths

Diff

Modified: branches/chromium/1025/LayoutTests/compositing/visibility/layer-visible-content-expected.txt (106840 => 106841)


--- branches/chromium/1025/LayoutTests/compositing/visibility/layer-visible-content-expected.txt	2012-02-06 21:17:49 UTC (rev 106840)
+++ branches/chromium/1025/LayoutTests/compositing/visibility/layer-visible-content-expected.txt	2012-02-06 21:19:30 UTC (rev 106841)
@@ -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: branches/chromium/1025/LayoutTests/compositing/visibility/layer-visible-content.html (106840 => 106841)


--- branches/chromium/1025/LayoutTests/compositing/visibility/layer-visible-content.html	2012-02-06 21:17:49 UTC (rev 106840)
+++ branches/chromium/1025/LayoutTests/compositing/visibility/layer-visible-content.html	2012-02-06 21:19:30 UTC (rev 106841)
@@ -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: branches/chromium/1025/LayoutTests/platform/chromium/test_expectations.txt (106840 => 106841)


--- branches/chromium/1025/LayoutTests/platform/chromium/test_expectations.txt	2012-02-06 21:17:49 UTC (rev 106840)
+++ branches/chromium/1025/LayoutTests/platform/chromium/test_expectations.txt	2012-02-06 21:19:30 UTC (rev 106841)
@@ -4012,8 +4012,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: branches/chromium/1025/Source/WebCore/rendering/RenderLayerBacking.cpp (106840 => 106841)


--- branches/chromium/1025/Source/WebCore/rendering/RenderLayerBacking.cpp	2012-02-06 21:17:49 UTC (rev 106840)
+++ branches/chromium/1025/Source/WebCore/rendering/RenderLayerBacking.cpp	2012-02-06 21:19:30 UTC (rev 106841)
@@ -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
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to