Title: [178267] releases/WebKitGTK/webkit-2.6
- Revision
- 178267
- Author
- carlo...@webkit.org
- Date
- 2015-01-12 08:47:11 -0800 (Mon, 12 Jan 2015)
Log Message
Merge r176432 - 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: releases/WebKitGTK/webkit-2.6/LayoutTests/ChangeLog (178266 => 178267)
--- releases/WebKitGTK/webkit-2.6/LayoutTests/ChangeLog 2015-01-12 16:29:22 UTC (rev 178266)
+++ releases/WebKitGTK/webkit-2.6/LayoutTests/ChangeLog 2015-01-12 16:47:11 UTC (rev 178267)
@@ -1,3 +1,18 @@
+2014-11-20 Zalan Bujtas <za...@apple.com>
+
+ 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 Mark Lam <mark....@apple.com>
WTFCrashWithSecurityImplication under SpeculativeJIT::compile() when loading a page from theblaze.com.
Added: releases/WebKitGTK/webkit-2.6/LayoutTests/fast/clip/css-clip-does-not-work-when-border-radius-is-present-expected.html (0 => 178267)
--- releases/WebKitGTK/webkit-2.6/LayoutTests/fast/clip/css-clip-does-not-work-when-border-radius-is-present-expected.html (rev 0)
+++ releases/WebKitGTK/webkit-2.6/LayoutTests/fast/clip/css-clip-does-not-work-when-border-radius-is-present-expected.html 2015-01-12 16:47:11 UTC (rev 178267)
@@ -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: releases/WebKitGTK/webkit-2.6/LayoutTests/fast/clip/css-clip-does-not-work-when-border-radius-is-present.html (0 => 178267)
--- releases/WebKitGTK/webkit-2.6/LayoutTests/fast/clip/css-clip-does-not-work-when-border-radius-is-present.html (rev 0)
+++ releases/WebKitGTK/webkit-2.6/LayoutTests/fast/clip/css-clip-does-not-work-when-border-radius-is-present.html 2015-01-12 16:47:11 UTC (rev 178267)
@@ -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: releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog (178266 => 178267)
--- releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog 2015-01-12 16:29:22 UTC (rev 178266)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog 2015-01-12 16:47:11 UTC (rev 178267)
@@ -1,3 +1,20 @@
+2014-11-20 Zalan Bujtas <za...@apple.com>
+
+ 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 Antti Koivisto <an...@apple.com>
REGRESSION (r172854): Web Viewer in FileMaker does not render a Base64 encoded animated-GIF
Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/rendering/RenderLayer.cpp (178266 => 178267)
--- releases/WebKitGTK/webkit-2.6/Source/WebCore/rendering/RenderLayer.cpp 2015-01-12 16:29:22 UTC (rev 178266)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/rendering/RenderLayer.cpp 2015-01-12 16:47:11 UTC (rev 178267)
@@ -3674,13 +3674,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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes