Title: [174716] trunk
Revision
174716
Author
[email protected]
Date
2014-10-14 17:42:57 -0700 (Tue, 14 Oct 2014)

Log Message

REGRESSION (Safari 7.1/8.0): Border-radius and overflow hidden renders incorrectly.
https://bugs.webkit.org/show_bug.cgi?id=137205

Reviewed by Simon Fraser.

Child layer should not reset radius clipping behaviour.

Source/WebCore:

Test: fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):

LayoutTests:

* fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping-expected.html: Added.
* fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (174715 => 174716)


--- trunk/LayoutTests/ChangeLog	2014-10-15 00:41:01 UTC (rev 174715)
+++ trunk/LayoutTests/ChangeLog	2014-10-15 00:42:57 UTC (rev 174716)
@@ -1,3 +1,15 @@
+2014-10-14  Zalan Bujtas  <[email protected]>
+
+        REGRESSION (Safari 7.1/8.0): Border-radius and overflow hidden renders incorrectly.
+        https://bugs.webkit.org/show_bug.cgi?id=137205
+
+        Reviewed by Simon Fraser.
+
+        Child layer should not reset radius clipping behaviour.
+
+        * fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping-expected.html: Added.
+        * fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping.html: Added.
+
 2014-10-14  Dan Bernstein  <[email protected]>
 
         URLs that start with http:/// and https:/// lose two slashes when parsed, causing assertion failure and inconsistent behavior

Added: trunk/LayoutTests/fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping-expected.html (0 => 174716)


--- trunk/LayoutTests/fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping-expected.html	2014-10-15 00:42:57 UTC (rev 174716)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that parent clipping is applied properly when border-radius is present.</title>
+<style>
+  div {
+    overflow: hidden;
+    border: 1px solid blue;
+    border-radius: 50px;
+    height: 50px;
+  }
+
+</style>
+</head>
+<body>
+  <div>Positioned text should be clipped.</div>            
+</body>
+</html>

Added: trunk/LayoutTests/fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping.html (0 => 174716)


--- trunk/LayoutTests/fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping.html	                        (rev 0)
+++ trunk/LayoutTests/fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping.html	2014-10-15 00:42:57 UTC (rev 174716)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that parent clipping is applied properly when border-radius is present.</title>
+<style>
+  .container {
+    overflow: hidden;
+    border: 1px solid blue;
+    border-radius: 50px;
+    height: 50px;
+  }
+
+  .box {
+    overflow:hidden;
+    position: relative;
+    top: 0px;
+    left: 0px;
+  }
+
+</style>
+</head>
+<body>
+  <div class=container>
+	<div class=box>Positioned text should be clipped.</div>            
+  </div>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (174715 => 174716)


--- trunk/Source/WebCore/ChangeLog	2014-10-15 00:41:01 UTC (rev 174715)
+++ trunk/Source/WebCore/ChangeLog	2014-10-15 00:42:57 UTC (rev 174716)
@@ -1,3 +1,17 @@
+2014-10-14  Zalan Bujtas  <[email protected]>
+
+        REGRESSION (Safari 7.1/8.0): Border-radius and overflow hidden renders incorrectly.
+        https://bugs.webkit.org/show_bug.cgi?id=137205
+
+        Reviewed by Simon Fraser.
+
+        Child layer should not reset radius clipping behaviour.
+
+        Test: fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping.html
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::calculateClipRects):
+
 2014-10-14  Chris Dumez  <[email protected]>
 
         Use is<>() / downcast<>() for PlatformCAAnimation subclasses

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (174715 => 174716)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2014-10-15 00:41:01 UTC (rev 174715)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2014-10-15 00:42:57 UTC (rev 174716)
@@ -5440,7 +5440,8 @@
         // This layer establishes a clip of some kind.
         if (renderer().hasOverflowClip() && (this != clipRectsContext.rootLayer || clipRectsContext.respectOverflowClip == RespectOverflowClip)) {
             foregroundRect.intersect(toRenderBox(renderer()).overflowClipRect(toLayoutPoint(offsetFromRootLocal), namedFlowFragment, clipRectsContext.overlayScrollbarSizeRelevancy));
-            foregroundRect.setHasRadius(renderer().style().hasBorderRadius());
+            if (renderer().style().hasBorderRadius())
+                foregroundRect.setHasRadius(true);
         }
 
         if (renderer().hasClip()) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to