Title: [204764] releases/WebKitGTK/webkit-2.12
Revision
204764
Author
carlo...@webkit.org
Date
2016-08-22 23:35:25 -0700 (Mon, 22 Aug 2016)

Log Message

Merge r201407 - Setting overflow:hidden does not always repaint clipped content.
https://bugs.webkit.org/show_bug.cgi?id=116994
rdar://problem/26476697

Issue repaint for both layout and visual overflow rects when the container starts
clipping overflow content.

Reviewed by David Hyatt.

Source/WebCore:

Test: fast/repaint/overflow-hidden-repaint.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::updateFromStyle):

LayoutTests:

* fast/repaint/overflow-hidden-repaint-expected.html: Added.
* fast/repaint/overflow-hidden-repaint.html: Added.

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog (204763 => 204764)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog	2016-08-23 06:34:03 UTC (rev 204763)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog	2016-08-23 06:35:25 UTC (rev 204764)
@@ -1,3 +1,17 @@
+2016-05-25  Zalan Bujtas  <za...@apple.com>
+
+        Setting overflow:hidden does not always repaint clipped content.
+        https://bugs.webkit.org/show_bug.cgi?id=116994
+        rdar://problem/26476697
+
+        Issue repaint for both layout and visual overflow rects when the container starts
+        clipping overflow content.
+
+        Reviewed by David Hyatt.
+
+        * fast/repaint/overflow-hidden-repaint-expected.html: Added.
+        * fast/repaint/overflow-hidden-repaint.html: Added.
+
 2016-05-24  Zalan Bujtas  <za...@apple.com>
 
         fast/table/neighboring-cells-when-collapsed-border-changes.html is flaky.

Added: releases/WebKitGTK/webkit-2.12/LayoutTests/fast/repaint/overflow-hidden-repaint-expected.html (0 => 204764)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/fast/repaint/overflow-hidden-repaint-expected.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/fast/repaint/overflow-hidden-repaint-expected.html	2016-08-23 06:35:25 UTC (rev 204764)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that repaint overflow part when overflow becomes clipped.</title>
+<style>
+div {
+    background: green;
+    overflow: visible;
+    height: 50px;
+    width: 50px;
+}
+</style>
+</head>
+<body>
+PASS if no red is visible.
+<div></div>
+</body>
+</html>
\ No newline at end of file

Added: releases/WebKitGTK/webkit-2.12/LayoutTests/fast/repaint/overflow-hidden-repaint.html (0 => 204764)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/fast/repaint/overflow-hidden-repaint.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/fast/repaint/overflow-hidden-repaint.html	2016-08-23 06:35:25 UTC (rev 204764)
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that repaint overflow part when overflow becomes clipped.</title>
+<style>
+#container {
+    background: green;
+    overflow: visible;
+    height: 50px;
+    width: 50px;
+}
+
+#inner {
+    background: red;
+	width: 50px;
+	height: 100px;
+	position: relative;
+	top: 100px;
+}
+</style>
+</head>
+<body>
+PASS if no red is visible.
+<div id=container><div id=inner></div></div>
+<script>
+if (window.testRunner)
+    testRunner.waitUntilDone();
+setTimeout(function() {
+    document.getElementById("inner").style.display = "none";
+    document.getElementById("container").style.overflow = "hidden";
+    document.body.offsetWidth;
+    if (window.testRunner)
+        testRunner.notifyDone();
+  }, 10);
+</script>
+</body>
+</html>
\ No newline at end of file

Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (204763 => 204764)


--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog	2016-08-23 06:34:03 UTC (rev 204763)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog	2016-08-23 06:35:25 UTC (rev 204764)
@@ -1,5 +1,21 @@
 2016-05-25  Zalan Bujtas  <za...@apple.com>
 
+        Setting overflow:hidden does not always repaint clipped content.
+        https://bugs.webkit.org/show_bug.cgi?id=116994
+        rdar://problem/26476697
+
+        Issue repaint for both layout and visual overflow rects when the container starts
+        clipping overflow content.
+
+        Reviewed by David Hyatt.
+
+        Test: fast/repaint/overflow-hidden-repaint.html
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::updateFromStyle):
+
+2016-05-25  Zalan Bujtas  <za...@apple.com>
+
         Addressing post-review comments on r200971.
 
         Reviewed by Darin Adler.

Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/rendering/RenderBox.cpp (204763 => 204764)


--- releases/WebKitGTK/webkit-2.12/Source/WebCore/rendering/RenderBox.cpp	2016-08-23 06:34:03 UTC (rev 204763)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/rendering/RenderBox.cpp	2016-08-23 06:35:25 UTC (rev 204764)
@@ -516,17 +516,19 @@
                 boxHasOverflowClip = false;
             }
         }
-        
         // Check for overflow clip.
         // It's sufficient to just check one direction, since it's illegal to have visible on only one overflow value.
         if (boxHasOverflowClip) {
-            if (!s_hadOverflowClip)
-                // Erase the overflow
-                repaint();
+            if (!s_hadOverflowClip && hasRenderOverflow()) {
+                // Erase the overflow.
+                // Overflow changes have to result in immediate repaints of the entire layout overflow area because
+                // repaints issued by removal of descendants get clipped using the updated style when they shouldn't.
+                repaintRectangle(visualOverflowRect());
+                repaintRectangle(layoutOverflowRect());
+            }
             setHasOverflowClip();
         }
     }
-
     setHasTransformRelatedProperty(styleToUse.hasTransformRelatedProperty());
     setHasReflection(styleToUse.boxReflect());
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to