Title: [175272] branches/safari-600.3-branch

Diff

Modified: branches/safari-600.3-branch/LayoutTests/ChangeLog (175271 => 175272)


--- branches/safari-600.3-branch/LayoutTests/ChangeLog	2014-10-28 20:12:00 UTC (rev 175271)
+++ branches/safari-600.3-branch/LayoutTests/ChangeLog	2014-10-28 21:42:27 UTC (rev 175272)
@@ -1,3 +1,19 @@
+2014-10-28  Dana Burkart  <[email protected]>
+
+        Merge r173181
+
+    2014-09-02  Simon Fraser  <[email protected]>
+
+            Non-composited child RenderLayers cause allocation of unncessary backing store
+            https://bugs.webkit.org/show_bug.cgi?id=136375
+
+            Reviewed by David Hyatt.
+            
+            Test with a composited div with various configurations of non-composited child layers.
+
+            * compositing/backing/child-layer-no-backing-expected.txt: Added.
+            * compositing/backing/child-layer-no-backing.html: Added.
+
 2014-10-21  Dana Burkart  <[email protected]>
 
         Merge r173246

Copied: branches/safari-600.3-branch/LayoutTests/compositing/backing/child-layer-no-backing-expected.txt (from rev 173181, trunk/LayoutTests/compositing/backing/child-layer-no-backing-expected.txt) (0 => 175272)


--- branches/safari-600.3-branch/LayoutTests/compositing/backing/child-layer-no-backing-expected.txt	                        (rev 0)
+++ branches/safari-600.3-branch/LayoutTests/compositing/backing/child-layer-no-backing-expected.txt	2014-10-28 21:42:27 UTC (rev 175272)
@@ -0,0 +1,38 @@
+Grandchild content
+(GraphicsLayer
+  (anchor 0.00 0.00)
+  (bounds 785.00 1091.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 785.00 1091.00)
+      (contentsOpaque 1)
+      (children 5
+        (GraphicsLayer
+          (position 18.00 10.00)
+          (bounds 200.00 200.00)
+        )
+        (GraphicsLayer
+          (position 18.00 220.00)
+          (bounds 200.00 200.00)
+        )
+        (GraphicsLayer
+          (position 18.00 430.00)
+          (bounds 200.00 200.00)
+        )
+        (GraphicsLayer
+          (position 18.00 640.00)
+          (anchor 0.50 0.46)
+          (bounds 200.00 218.00)
+          (drawsContent 1)
+        )
+        (GraphicsLayer
+          (position 18.00 850.00)
+          (anchor 0.50 0.50)
+          (bounds 202.00 202.00)
+          (drawsContent 1)
+        )
+      )
+    )
+  )
+)
+

Copied: branches/safari-600.3-branch/LayoutTests/compositing/backing/child-layer-no-backing.html (from rev 173181, trunk/LayoutTests/compositing/backing/child-layer-no-backing.html) (0 => 175272)


--- branches/safari-600.3-branch/LayoutTests/compositing/backing/child-layer-no-backing.html	                        (rev 0)
+++ branches/safari-600.3-branch/LayoutTests/compositing/backing/child-layer-no-backing.html	2014-10-28 21:42:27 UTC (rev 175272)
@@ -0,0 +1,73 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+    <style>
+        .container {
+            height: 200px;
+            width: 200px;
+            margin: 10px;
+        }
+        
+        .composited {
+            -webkit-transform: translateZ(0);
+        }
+        
+        .child {
+            position: relative;
+            height: 100%;
+            width: 100%;
+        }
+    </style>
+    <script>
+        if (window.testRunner)
+            testRunner.dumpAsText();
+
+        function dumpLayers()
+        {
+            var layersResult = document.getElementById('layers');
+            if (window.testRunner)
+                layersResult.innerText = window.internals.layerTreeAsText(document);
+        }
+
+        window.addEventListener('load', dumpLayers, false)
+    </script>
+</head>
+<body>
+    <div class="composited container">
+        <div class="child">
+        </div>
+    </div>
+
+    <div class="composited container">
+        <div class="child">
+            <div class="child">
+            </div>
+        </div>
+    </div>
+
+    <div class="composited container">
+        <div class="child" style="visibility:hidden">
+            Child content
+        </div>
+    </div>
+
+    <div class="composited container">
+        <div class="child" style="visibility:hidden">
+            Child content
+            <div class="child" style="visibility:visible">
+                Grandchild content
+            </div>
+        </div>
+    </div>
+
+    <div class="composited container">
+        <div class="child" style="visibility:hidden">
+            <div class="child" style="visibility:visible; border: 1px solid black">
+            </div>
+        </div>
+    </div>
+
+<pre id="layers">Layer tree goes here in DRT</pre>
+</body>
+</html>

Modified: branches/safari-600.3-branch/Source/WebCore/ChangeLog (175271 => 175272)


--- branches/safari-600.3-branch/Source/WebCore/ChangeLog	2014-10-28 20:12:00 UTC (rev 175271)
+++ branches/safari-600.3-branch/Source/WebCore/ChangeLog	2014-10-28 21:42:27 UTC (rev 175272)
@@ -1,3 +1,28 @@
+2014-10-28  Dana Burkart  <[email protected]>
+
+        Merge r173181
+
+    2014-09-02  Simon Fraser  <[email protected]>
+
+            Non-composited child RenderLayers cause allocation of unncessary backing store
+            https://bugs.webkit.org/show_bug.cgi?id=136375
+
+            Reviewed by David Hyatt.
+            
+            A composited element that has non-composited descendant elements that fall into
+            RenderLayers was getting backing store when none was required. descendentLayerPaintsIntoAncestor()
+            was simply checking the "visibility:visible" bit on descendant non-composited layers,
+            instead of actually asking them if they have any visual content.
+            
+            Added a couple of FIXME comments.
+
+            Test: compositing/backing/child-layer-no-backing.html
+
+            * rendering/RenderLayer.cpp:
+            (WebCore::RenderLayer::calculateClipRects):
+            * rendering/RenderLayerBacking.cpp:
+            (WebCore::descendentLayerPaintsIntoAncestor):
+
 2014-10-23  Matthew Hanson  <[email protected]>
 
         Merge r174908. <rdar://problem/18694470>

Modified: branches/safari-600.3-branch/Source/WebCore/rendering/RenderLayer.cpp (175271 => 175272)


--- branches/safari-600.3-branch/Source/WebCore/rendering/RenderLayer.cpp	2014-10-28 20:12:00 UTC (rev 175271)
+++ branches/safari-600.3-branch/Source/WebCore/rendering/RenderLayer.cpp	2014-10-28 21:42:27 UTC (rev 175272)
@@ -6245,6 +6245,7 @@
     if (hasVisibleContent() && hasNonEmptyChildRenderers())
         return true;
 
+    // FIXME: a visibility:hidden replaced element should return false here.
     if (renderer().isReplaced() || renderer().hasMask())
         return true;
 

Modified: branches/safari-600.3-branch/Source/WebCore/rendering/RenderLayerBacking.cpp (175271 => 175272)


--- branches/safari-600.3-branch/Source/WebCore/rendering/RenderLayerBacking.cpp	2014-10-28 20:12:00 UTC (rev 175271)
+++ branches/safari-600.3-branch/Source/WebCore/rendering/RenderLayerBacking.cpp	2014-10-28 21:42:27 UTC (rev 175272)
@@ -1503,6 +1503,7 @@
     return finalOpacity;
 }
 
+// FIXME: Code is duplicated in RenderLayer. Also, we should probably not consider filters a box decoration here.
 static inline bool hasBoxDecorations(const RenderStyle& style)
 {
     return style.hasBorder() || style.hasBorderRadius() || style.hasOutline() || style.hasAppearance() || style.boxShadow() || style.hasFilter();
@@ -1754,7 +1755,7 @@
         for (size_t i = 0; i < listSize; ++i) {
             RenderLayer* curLayer = normalFlowList->at(i);
             if (!compositedWithOwnBackingStore(curLayer)
-                && (curLayer->hasVisibleContent() || descendentLayerPaintsIntoAncestor(*curLayer)))
+                && (curLayer->isVisuallyNonEmpty() || descendentLayerPaintsIntoAncestor(*curLayer)))
                 return true;
         }
     }
@@ -1769,7 +1770,7 @@
             for (size_t i = 0; i < listSize; ++i) {
                 RenderLayer* curLayer = negZOrderList->at(i);
                 if (!compositedWithOwnBackingStore(curLayer)
-                    && (curLayer->hasVisibleContent() || descendentLayerPaintsIntoAncestor(*curLayer)))
+                    && (curLayer->isVisuallyNonEmpty() || descendentLayerPaintsIntoAncestor(*curLayer)))
                     return true;
             }
         }
@@ -1779,7 +1780,7 @@
             for (size_t i = 0; i < listSize; ++i) {
                 RenderLayer* curLayer = posZOrderList->at(i);
                 if (!compositedWithOwnBackingStore(curLayer)
-                    && (curLayer->hasVisibleContent() || descendentLayerPaintsIntoAncestor(*curLayer)))
+                    && (curLayer->isVisuallyNonEmpty() || descendentLayerPaintsIntoAncestor(*curLayer)))
                     return true;
             }
         }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to