Title: [199426] releases/WebKitGTK/webkit-2.12/Source/WebCore
- Revision
- 199426
- Author
- [email protected]
- Date
- 2016-04-13 01:32:23 -0700 (Wed, 13 Apr 2016)
Log Message
Merge r198498 - Very flashy scrolling on http://quellish.tumblr.com page
https://bugs.webkit.org/show_bug.cgi?id=155728
rdar://problem/22299375
Reviewed by Zalan Bujtas.
http://quellish.tumblr.com/post/126712999812/how-on-earth-the-facebook-ios-application-is-so
has many elements that are nested inside elements with non-equal corner radius clipping.
This requires building bezier paths for the rounded-rect clip which is expensive.
For many rows of the table, we can avoid the rounded-rect clipping because the intersection
of the paintDirtyRect and the clip is actually rectangular.
* platform/graphics/FloatRoundedRect.cpp:
(WebCore::FloatRoundedRect::intersectionIsRectangular):
* platform/graphics/FloatRoundedRect.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (199425 => 199426)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog 2016-04-13 08:24:40 UTC (rev 199425)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog 2016-04-13 08:32:23 UTC (rev 199426)
@@ -1,3 +1,24 @@
+2016-03-21 Simon Fraser <[email protected]>
+
+ Very flashy scrolling on http://quellish.tumblr.com page
+ https://bugs.webkit.org/show_bug.cgi?id=155728
+ rdar://problem/22299375
+
+ Reviewed by Zalan Bujtas.
+
+ http://quellish.tumblr.com/post/126712999812/how-on-earth-the-facebook-ios-application-is-so
+ has many elements that are nested inside elements with non-equal corner radius clipping.
+ This requires building bezier paths for the rounded-rect clip which is expensive.
+
+ For many rows of the table, we can avoid the rounded-rect clipping because the intersection
+ of the paintDirtyRect and the clip is actually rectangular.
+
+ * platform/graphics/FloatRoundedRect.cpp:
+ (WebCore::FloatRoundedRect::intersectionIsRectangular):
+ * platform/graphics/FloatRoundedRect.h:
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::clipToRect):
+
2016-03-20 Jinwoo Jeong <[email protected]>
The setter of binaryType attribute in WebSocket should raise the exception.
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/FloatRoundedRect.cpp (199425 => 199426)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/FloatRoundedRect.cpp 2016-04-13 08:24:40 UTC (rev 199425)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/FloatRoundedRect.cpp 2016-04-13 08:32:23 UTC (rev 199426)
@@ -197,6 +197,12 @@
m_radii.scale(widthRatio < heightRatio ? widthRatio : heightRatio);
}
+// This is conservative; it does not test intrusion into the corner rects.
+bool FloatRoundedRect::intersectionIsRectangular(const FloatRect& rect) const
+{
+ return !(rect.intersects(topLeftCorner()) || rect.intersects(topRightCorner()) || rect.intersects(bottomLeftCorner()) || rect.intersects(bottomRightCorner()));
+}
+
TextStream& operator<<(TextStream& ts, const FloatRoundedRect& roundedRect)
{
ts << roundedRect.rect().x() << " " << roundedRect.rect().y() << " " << roundedRect.rect().width() << " " << roundedRect.rect().height() << "\n";
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/FloatRoundedRect.h (199425 => 199426)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/FloatRoundedRect.h 2016-04-13 08:24:40 UTC (rev 199425)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/FloatRoundedRect.h 2016-04-13 08:32:23 UTC (rev 199426)
@@ -131,6 +131,8 @@
bool isRenderable() const;
bool xInterceptsAtY(float y, float& minXIntercept, float& maxXIntercept) const;
+ bool intersectionIsRectangular(const FloatRect&) const;
+
private:
FloatRect m_rect;
Radii m_radii;
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/rendering/RenderLayer.cpp (199425 => 199426)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/rendering/RenderLayer.cpp 2016-04-13 08:24:40 UTC (rev 199425)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/rendering/RenderLayer.cpp 2016-04-13 08:32:23 UTC (rev 199426)
@@ -3829,7 +3829,11 @@
if (layer->renderer().hasOverflowClip() && layer->renderer().style().hasBorderRadius() && inContainingBlockChain(this, layer)) {
LayoutRect adjustedClipRect = LayoutRect(toLayoutPoint(layer->offsetFromAncestor(paintingInfo.rootLayer, AdjustForColumns)), layer->size());
adjustedClipRect.move(paintingInfo.subpixelAccumulation);
- context.clipRoundedRect(layer->renderer().style().getRoundedInnerBorderFor(adjustedClipRect).pixelSnappedRoundedRectForPainting(deviceScaleFactor));
+ FloatRoundedRect roundedRect = layer->renderer().style().getRoundedInnerBorderFor(adjustedClipRect).pixelSnappedRoundedRectForPainting(deviceScaleFactor);
+ if (roundedRect.intersectionIsRectangular(paintingInfo.paintDirtyRect))
+ context.clip(snapRectToDevicePixels(intersection(paintingInfo.paintDirtyRect, adjustedClipRect), deviceScaleFactor));
+ else
+ context.clipRoundedRect(roundedRect);
}
if (layer == paintingInfo.rootLayer)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes