Title: [176432] trunk
- Revision
- 176432
- Author
- [email protected]
- Date
- 2014-11-20 19:17:44 -0800 (Thu, 20 Nov 2014)
Log Message
REGRESSION (174986): CSS clip property is ignored when border-radius is present.
https://bugs.webkit.org/show_bug.cgi?id=138935
rdar://problem/18965984
Reviewed by Simon Fraser.
Revert back to r163382 and fix bug 127729 properly. Save the graphics context when paint and clip rects are
the same, but the clip rect has radius.
Each iteration on ::clipRect() from r163382 onwards just introduced yet another regression.
Source/WebCore:
Test: fast/clip/css-clip-does-not-work-when-border-radius-is-present.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):
LayoutTests:
* fast/clip/css-clip-does-not-work-when-border-radius-is-present-expected.html: Added.
* fast/clip/css-clip-does-not-work-when-border-radius-is-present.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (176431 => 176432)
--- trunk/LayoutTests/ChangeLog 2014-11-21 02:27:20 UTC (rev 176431)
+++ trunk/LayoutTests/ChangeLog 2014-11-21 03:17:44 UTC (rev 176432)
@@ -1,3 +1,18 @@
+2014-11-20 Zalan Bujtas <[email protected]>
+
+ REGRESSION (174986): CSS clip property is ignored when border-radius is present.
+ https://bugs.webkit.org/show_bug.cgi?id=138935
+ rdar://problem/18965984
+
+ Reviewed by Simon Fraser.
+
+ Revert back to r163382 and fix bug 127729 properly. Save the graphics context when paint and clip rects are
+ the same, but the clip rect has radius.
+ Each iteration on ::clipRect() from r163382 onwards just introduced yet another regression.
+
+ * fast/clip/css-clip-does-not-work-when-border-radius-is-present-expected.html: Added.
+ * fast/clip/css-clip-does-not-work-when-border-radius-is-present.html: Added.
+
2014-11-20 Dean Jackson <[email protected]>
Support unprefixed animation event types
Added: trunk/LayoutTests/fast/clip/css-clip-does-not-work-when-border-radius-is-present-expected.html (0 => 176432)
--- trunk/LayoutTests/fast/clip/css-clip-does-not-work-when-border-radius-is-present-expected.html (rev 0)
+++ trunk/LayoutTests/fast/clip/css-clip-does-not-work-when-border-radius-is-present-expected.html 2014-11-21 03:17:44 UTC (rev 176432)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that both border-radius and clip get applied on the box.</title>
+<style>
+ .container {
+ position: absolute;
+ width: 10px;
+ height: 10px;
+ background: green;
+ }
+</style>
+</head>
+<body>
+ <div class="container"></div>
+</body>
+</html>
Added: trunk/LayoutTests/fast/clip/css-clip-does-not-work-when-border-radius-is-present.html (0 => 176432)
--- trunk/LayoutTests/fast/clip/css-clip-does-not-work-when-border-radius-is-present.html (rev 0)
+++ trunk/LayoutTests/fast/clip/css-clip-does-not-work-when-border-radius-is-present.html 2014-11-21 03:17:44 UTC (rev 176432)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that both border-radius and clip get applied on the box.</title>
+<style>
+ .container {
+ position: absolute;
+ width: 100px;
+ height: 100px;
+ background: green;
+ border-radius: 0px 0px 1px 0px;
+ clip: rect(0px, 10px, 10px, 0px);
+ }
+</style>
+</head>
+<body>
+ <div class="container"></div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (176431 => 176432)
--- trunk/Source/WebCore/ChangeLog 2014-11-21 02:27:20 UTC (rev 176431)
+++ trunk/Source/WebCore/ChangeLog 2014-11-21 03:17:44 UTC (rev 176432)
@@ -1,3 +1,20 @@
+2014-11-20 Zalan Bujtas <[email protected]>
+
+ REGRESSION (174986): CSS clip property is ignored when border-radius is present.
+ https://bugs.webkit.org/show_bug.cgi?id=138935
+ rdar://problem/18965984
+
+ Reviewed by Simon Fraser.
+
+ Revert back to r163382 and fix bug 127729 properly. Save the graphics context when paint and clip rects are
+ the same, but the clip rect has radius.
+ Each iteration on ::clipRect() from r163382 onwards just introduced yet another regression.
+
+ Test: fast/clip/css-clip-does-not-work-when-border-radius-is-present.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::clipToRect):
+
2014-11-20 Geoffrey Garen <[email protected]>
Removed the custom allocator for PODRedBlackTree
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (176431 => 176432)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2014-11-21 02:27:20 UTC (rev 176431)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2014-11-21 03:17:44 UTC (rev 176432)
@@ -3661,13 +3661,13 @@
void RenderLayer::clipToRect(const LayerPaintingInfo& paintingInfo, GraphicsContext* context, const ClipRect& clipRect, BorderRadiusClippingRule rule)
{
+ float deviceScaleFactor = renderer().document().deviceScaleFactor();
+
bool needsClipping = clipRect.rect() != paintingInfo.paintDirtyRect;
if (needsClipping || clipRect.affectedByRadius())
context->save();
- float deviceScaleFactor = renderer().document().deviceScaleFactor();
- bool layerHasBorderRadius = renderer().style().hasBorderRadius();
- if (needsClipping && !layerHasBorderRadius) {
+ if (needsClipping) {
LayoutRect adjustedClipRect = clipRect.rect();
adjustedClipRect.move(paintingInfo.subpixelAccumulation);
context->clip(snapRectToDevicePixels(adjustedClipRect, deviceScaleFactor));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes