[New Multicolumn] Column sets below spanners don't repaint properly.
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Apr 2014 17:53:40 +0000 (17:53 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Apr 2014 17:53:40 +0000 (17:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=131778

Reviewed by Beth Dakin.

Source/WebCore:
Added fast/repaint/spanner-with-margins.html.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):
Turn off some code that was running for in-flow RenderFlowThreads that made no sense.
I'm not convinced the code is right for other types of RenderFlowThreads either,
but will leave that to the named flow thread experts. :)

LayoutTests:
* fast/repaint/spanner-with-margin-expected.txt: Added.
* fast/repaint/spanner-with-margin.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167439 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/repaint/spanner-with-margin-expected.txt [new file with mode: 0644]
LayoutTests/fast/repaint/spanner-with-margin.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBox.cpp

index 967d2cf..c57bb25 100644 (file)
@@ -1,3 +1,13 @@
+2014-04-17  David Hyatt  <hyatt@apple.com>
+
+        [New Multicolumn] Column sets below spanners don't repaint properly.
+        https://bugs.webkit.org/show_bug.cgi?id=131778
+
+        Reviewed by Beth Dakin.
+
+        * fast/repaint/spanner-with-margin-expected.txt: Added.
+        * fast/repaint/spanner-with-margin.html: Added.
+
 2014-04-17  Eduardo Lima Mitev  <elima@igalia.com>
 
         [GTK] [Gardening] Updates GTK test expectations
diff --git a/LayoutTests/fast/repaint/spanner-with-margin-expected.txt b/LayoutTests/fast/repaint/spanner-with-margin-expected.txt
new file mode 100644 (file)
index 0000000..7eda2c5
--- /dev/null
@@ -0,0 +1,25 @@
+You should see the word 'PASS' five times below (letter spacing will differ), and no red:
+
+P
+P
+A
+A
+S
+S
+S
+S
+PASS
+P
+P
+A
+A
+S
+S
+S
+S
+(repaint rects
+  (rect 104 334 18 37)
+  (rect 104 334 18 37)
+)
+
diff --git a/LayoutTests/fast/repaint/spanner-with-margin.html b/LayoutTests/fast/repaint/spanner-with-margin.html
new file mode 100644 (file)
index 0000000..f427ecd
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>Spanner with margins</title>
+<script>
+if (window.internals)
+    internals.settings.setRegionBasedColumnsEnabled(true);
+</script>
+
+    </head>
+    <body>
+        <p>You should see the word 'PASS' five times below (letter spacing will differ), and no red:</p>
+        <div style="zoom:2; -webkit-columns:4; columns:4; -webkit-column-gap:0; column-gap:0; width:4em;">
+            P<br>P<br>A<br>A<br>S<br>S<br>S<br>S
+           <div style="background:red;">
+                <div id="grrr" style="width:200px; border:2px solid blue; -webkit-column-span:all; column-span:all; margin:2em;">PASS<br>&nbsp;</div>
+            </div>
+            P<br>P<br>A<br>A<br>S<br>S<br><a id="foo" style="color:red" href="#">S</a><br>S
+        </div>
+
+<script src="resources/text-based-repaint.js" type="text/javascript"></script>
+    <script>
+        repaintTest = function() {
+            document.getElementById('foo').style.color = 'green'
+        };
+        runRepaintTest();
+    </script>
+    </body>
+</html>
index 159d5fe..52c4d7b 100644 (file)
@@ -1,3 +1,18 @@
+2014-04-17  David Hyatt  <hyatt@apple.com>
+
+        [New Multicolumn] Column sets below spanners don't repaint properly.
+        https://bugs.webkit.org/show_bug.cgi?id=131778
+
+        Reviewed by Beth Dakin.
+
+        Added fast/repaint/spanner-with-margins.html.
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::computeRectForRepaint):
+        Turn off some code that was running for in-flow RenderFlowThreads that made no sense.
+        I'm not convinced the code is right for other types of RenderFlowThreads either,
+        but will leave that to the named flow thread experts. :)
+
 2014-04-17  Koji Ishii  <kojishi@gmail.com>
 
         Catch up ruby and its tag omission rule changes in HTML5 CR Feb 2014
index dfeb23b..8e34b72 100644 (file)
@@ -2107,8 +2107,9 @@ void RenderBox::computeRectForRepaint(const RenderLayerModelObject* repaintConta
     auto o = container(repaintContainer, &containerSkipped);
     if (!o)
         return;
-
-    if (o->isRenderFlowThread()) {
+    
+    // This code isn't necessary for in-flow RenderFlowThreads.
+    if (o->isOutOfFlowRenderFlowThread()) {
         RenderRegion* firstRegion = nullptr;
         RenderRegion* lastRegion = nullptr;
         if (toRenderFlowThread(o)->getRegionRangeForBox(this, firstRegion, lastRegion))