Diff
Modified: branches/safari-537.73-branch/LayoutTests/ChangeLog (158062 => 158063)
--- branches/safari-537.73-branch/LayoutTests/ChangeLog 2013-10-25 22:24:49 UTC (rev 158062)
+++ branches/safari-537.73-branch/LayoutTests/ChangeLog 2013-10-25 22:45:25 UTC (rev 158063)
@@ -1,5 +1,23 @@
2013-10-25 Lucas Forschler <[email protected]>
+ Merge r155546
+
+ 2013-09-10 Simon Fraser <[email protected]>
+
+ REGRESSION (143483): overflow:hidden doesn't quash big repaints from text-indent: -9999px
+ https://bugs.webkit.org/show_bug.cgi?id=121137
+
+ Reviewed by Ryosuke Niwa.
+
+ Text-based repaint test, and test for compositing layer geometry.
+
+ * compositing/geometry/negative-text-indent-with-overflow-hidden-layer-expected.txt: Added.
+ * compositing/geometry/negative-text-indent-with-overflow-hidden-layer.html: Added.
+ * fast/repaint/negative-text-indent-with-overflow-hidden-expected.txt: Added.
+ * fast/repaint/negative-text-indent-with-overflow-hidden.html: Added.
+
+2013-10-25 Lucas Forschler <[email protected]>
+
Merge r155461
2013-09-10 Tim Horton <[email protected]>
Copied: branches/safari-537.73-branch/LayoutTests/compositing/geometry/negative-text-indent-with-overflow-hidden-layer-expected.txt (from rev 155546, trunk/LayoutTests/compositing/geometry/negative-text-indent-with-overflow-hidden-layer-expected.txt) (0 => 158063)
--- branches/safari-537.73-branch/LayoutTests/compositing/geometry/negative-text-indent-with-overflow-hidden-layer-expected.txt (rev 0)
+++ branches/safari-537.73-branch/LayoutTests/compositing/geometry/negative-text-indent-with-overflow-hidden-layer-expected.txt 2013-10-25 22:45:25 UTC (rev 158063)
@@ -0,0 +1,27 @@
+CONSOLE MESSAGE: line 38: ReferenceError: Can't find variable: runRepaintTest
+Hidden Text
+Hidden Text
+(GraphicsLayer
+ (bounds 800.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (contentsOpaque 1)
+ (children 2
+ (GraphicsLayer
+ (position 568.00 10.00)
+ (bounds 200.00 50.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ )
+ (GraphicsLayer
+ (position 568.00 220.00)
+ (bounds 200.00 200.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ )
+ )
+ )
+ )
+)
+
Copied: branches/safari-537.73-branch/LayoutTests/compositing/geometry/negative-text-indent-with-overflow-hidden-layer.html (from rev 155546, trunk/LayoutTests/compositing/geometry/negative-text-indent-with-overflow-hidden-layer.html) (0 => 158063)
--- branches/safari-537.73-branch/LayoutTests/compositing/geometry/negative-text-indent-with-overflow-hidden-layer.html (rev 0)
+++ branches/safari-537.73-branch/LayoutTests/compositing/geometry/negative-text-indent-with-overflow-hidden-layer.html 2013-10-25 22:45:25 UTC (rev 158063)
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ .container {
+ position: relative;
+ margin: 10px;
+ left: 550px;
+ height: 200px;
+ width: 200px;
+ background-color: silver;
+ }
+ #target {
+ text-indent: -300px;
+ width: 200px;
+ height: 50px;
+ overflow: hidden;
+ background-color: green;
+ }
+
+ .composited {
+ -webkit-transform: translateZ(0);
+ }
+ </style>
+ <script>
+ if (window.testRunner)
+ testRunner.dumpAsText(true);
+
+ function dumpLayers()
+ {
+ if (window.testRunner)
+ document.getElementById('layers').innerText = window.internals.layerTreeAsText(document);
+ }
+
+ window.addEventListener('load', dumpLayers, false);
+ </script>
+</head>
+<body _onload_="runRepaintTest();">
+ <div class="container">
+ <div class="composited" id="target">Hidden Text</div>
+ </div>
+
+ <div class="container composited">
+ <div id="target">Hidden Text</div>
+ </div>
+<pre id="layers"></pre>
+</body>
+</html>
Copied: branches/safari-537.73-branch/LayoutTests/fast/repaint/negative-text-indent-with-overflow-hidden-expected.txt (from rev 155546, trunk/LayoutTests/fast/repaint/negative-text-indent-with-overflow-hidden-expected.txt) (0 => 158063)
--- branches/safari-537.73-branch/LayoutTests/fast/repaint/negative-text-indent-with-overflow-hidden-expected.txt (rev 0)
+++ branches/safari-537.73-branch/LayoutTests/fast/repaint/negative-text-indent-with-overflow-hidden-expected.txt 2013-10-25 22:45:25 UTC (rev 158063)
@@ -0,0 +1,7 @@
+Hidden Text
+(repaint rects
+ (rect 550 8 200 50)
+ (rect 550 8 200 50)
+ (rect 550 8 200 50)
+)
+
Copied: branches/safari-537.73-branch/LayoutTests/fast/repaint/negative-text-indent-with-overflow-hidden.html (from rev 155546, trunk/LayoutTests/fast/repaint/negative-text-indent-with-overflow-hidden.html) (0 => 158063)
--- branches/safari-537.73-branch/LayoutTests/fast/repaint/negative-text-indent-with-overflow-hidden.html (rev 0)
+++ branches/safari-537.73-branch/LayoutTests/fast/repaint/negative-text-indent-with-overflow-hidden.html 2013-10-25 22:45:25 UTC (rev 158063)
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ .container {
+ position: absolute;
+ left: 550px;
+ height: 200px;
+ width: 200px;
+ background-color: silver;
+ }
+ #target {
+ text-indent: -300px;
+ width: 200px;
+ height: 50px;
+ overflow: hidden;
+ background-color: green;
+ }
+
+ #target.changed, #target:hover {
+ background-color: blue;
+ }
+ </style>
+ <script src=""
+ <script>
+ function repaintTest() {
+ document.getElementById('target').classList.add('changed');
+ }
+ </script>
+</head>
+<body _onload_="runRepaintTest();">
+ <div class="container">
+ <div id="target">Hidden Text</div>
+ </div>
+</body>
+</html>
Modified: branches/safari-537.73-branch/Source/WebCore/ChangeLog (158062 => 158063)
--- branches/safari-537.73-branch/Source/WebCore/ChangeLog 2013-10-25 22:24:49 UTC (rev 158062)
+++ branches/safari-537.73-branch/Source/WebCore/ChangeLog 2013-10-25 22:45:25 UTC (rev 158063)
@@ -1,5 +1,31 @@
2013-10-25 Lucas Forschler <[email protected]>
+ Merge r155546
+
+ 2013-09-10 Simon Fraser <[email protected]>
+
+ REGRESSION (143483): overflow:hidden doesn't quash big repaints from text-indent: -9999px
+ https://bugs.webkit.org/show_bug.cgi?id=121137
+
+ Reviewed by Ryosuke Niwa.
+
+ The change in r143483 made it so that negative text-indent gets added
+ to visual oveflow even when we have overflow:hidden, which is really bad
+ because it causes large repaints (and large layers) for a common-on-the-web
+ pattern.
+
+ Revert the change, and add a new test to make sure it doesn't regress.
+
+ I can't reproduce the bug it was trying to fix with the change reverted.
+
+ Tests: compositing/geometry/negative-text-indent-with-overflow-hidden-layer.html
+ fast/repaint/negative-text-indent-with-overflow-hidden.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::computeOverflow):
+
+2013-10-25 Lucas Forschler <[email protected]>
+
Merge r155468
2013-09-10 Tim Horton <[email protected]>
Modified: branches/safari-537.73-branch/Source/WebCore/rendering/RenderBlock.cpp (158062 => 158063)
--- branches/safari-537.73-branch/Source/WebCore/rendering/RenderBlock.cpp 2013-10-25 22:24:49 UTC (rev 158062)
+++ branches/safari-537.73-branch/Source/WebCore/rendering/RenderBlock.cpp 2013-10-25 22:45:25 UTC (rev 158063)
@@ -1802,14 +1802,6 @@
m_overflow->setLayoutClientAfterEdge(oldClientAfterEdge);
}
- // Allow our overflow to catch cases where the caret in an empty editable element with negative text indent needs to get painted.
- LayoutUnit textIndent = textIndentOffset();
- if (textIndent < 0) {
- LayoutRect clientRect(clientBoxRect());
- LayoutRect rectToApply = LayoutRect(clientRect.x() + min<LayoutUnit>(0, textIndent), clientRect.y(), clientRect.width() - min<LayoutUnit>(0, textIndent), clientRect.height());
- addVisualOverflow(rectToApply);
- }
-
// Add visual overflow from box-shadow and border-image-outset.
addVisualEffectOverflow();