Title: [201407] trunk
- Revision
- 201407
- Author
- [email protected]
- Date
- 2016-05-25 16:01:51 -0700 (Wed, 25 May 2016)
Log Message
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: trunk/LayoutTests/ChangeLog (201406 => 201407)
--- trunk/LayoutTests/ChangeLog 2016-05-25 22:56:58 UTC (rev 201406)
+++ trunk/LayoutTests/ChangeLog 2016-05-25 23:01:51 UTC (rev 201407)
@@ -1,3 +1,17 @@
+2016-05-25 Zalan Bujtas <[email protected]>
+
+ 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-25 Daniel Bates <[email protected]> and Brent Fulgham <[email protected]>
[WebSockets] No infrastructure for testing secure web sockets (wss)
Added: trunk/LayoutTests/fast/repaint/overflow-hidden-repaint-expected.html (0 => 201407)
--- trunk/LayoutTests/fast/repaint/overflow-hidden-repaint-expected.html (rev 0)
+++ trunk/LayoutTests/fast/repaint/overflow-hidden-repaint-expected.html 2016-05-25 23:01:51 UTC (rev 201407)
@@ -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: trunk/LayoutTests/fast/repaint/overflow-hidden-repaint.html (0 => 201407)
--- trunk/LayoutTests/fast/repaint/overflow-hidden-repaint.html (rev 0)
+++ trunk/LayoutTests/fast/repaint/overflow-hidden-repaint.html 2016-05-25 23:01:51 UTC (rev 201407)
@@ -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: trunk/Source/WebCore/ChangeLog (201406 => 201407)
--- trunk/Source/WebCore/ChangeLog 2016-05-25 22:56:58 UTC (rev 201406)
+++ trunk/Source/WebCore/ChangeLog 2016-05-25 23:01:51 UTC (rev 201407)
@@ -1,3 +1,19 @@
+2016-05-25 Zalan Bujtas <[email protected]>
+
+ 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 Anders Carlsson <[email protected]>
Get rid of WTF/Functional.h
Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (201406 => 201407)
--- trunk/Source/WebCore/rendering/RenderBox.cpp 2016-05-25 22:56:58 UTC (rev 201406)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2016-05-25 23:01:51 UTC (rev 201407)
@@ -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
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes