LayerFragment should be able to intersect with ClipRect.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Jan 2015 23:15:35 +0000 (23:15 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Jan 2015 23:15:35 +0000 (23:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=140498

Reviewed by Simon Fraser.

No change in functionality.

* rendering/LayerFragment.h:
(WebCore::LayerFragment::intersect):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::collectFragments):

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

Source/WebCore/ChangeLog
Source/WebCore/rendering/LayerFragment.h
Source/WebCore/rendering/RenderLayer.cpp

index 3a70f0f..6ad5965 100644 (file)
@@ -1,5 +1,19 @@
 2015-01-15  Zalan Bujtas  <zalan@apple.com>
 
+        LayerFragment should be able to intersect with ClipRect.
+        https://bugs.webkit.org/show_bug.cgi?id=140498
+
+        Reviewed by Simon Fraser.
+
+        No change in functionality.
+
+        * rendering/LayerFragment.h:
+        (WebCore::LayerFragment::intersect):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::collectFragments):
+
+2015-01-15  Zalan Bujtas  <zalan@apple.com>
+
         Move ClipRects and ClipRectsCache classes to RenderLayer.cpp.
         https://bugs.webkit.org/show_bug.cgi?id=140461
 
index 1bc862b..68ea5e1 100644 (file)
@@ -64,6 +64,13 @@ public:
         boundingBox.intersect(rect);
     }
     
+    void intersect(const ClipRect& clipRect)
+    {
+        backgroundRect.intersect(clipRect);
+        foregroundRect.intersect(clipRect);
+        outlineRect.intersect(clipRect);
+    }
+
     bool shouldPaintContent = false;
     bool hasBoundingBox = false;
     LayoutRect layerBounds;
index c5ebe21..372fbcc 100644 (file)
@@ -4531,14 +4531,7 @@ void RenderLayer::collectFragments(LayerFragments& fragments, const RenderLayer*
 
         // Intersect the fragment with our ancestor's background clip so that e.g., columns in an overflow:hidden block are
         // properly clipped by the overflow.
-        fragment.intersect(ancestorClipRect.rect());
-        
-        // If the ancestor clip rect has border-radius, make sure to apply it to the fragments.
-        if (ancestorClipRect.affectedByRadius()) {
-            fragment.foregroundRect.setAffectedByRadius(true);
-            fragment.backgroundRect.setAffectedByRadius(true);
-            fragment.outlineRect.setAffectedByRadius(true);
-        }
+        fragment.intersect(ancestorClipRect);
 
         // Now intersect with our pagination clip. This will typically mean we're just intersecting the dirty rect with the column
         // clip, so the column clip ends up being all we apply.