Title: [170010] trunk
Revision
170010
Author
stav...@adobe.com
Date
2014-06-16 09:33:27 -0700 (Mon, 16 Jun 2014)

Log Message

REGRESSION (r168046): Incorrect layout for multicol spanners when moving from one thread to another
https://bugs.webkit.org/show_bug.cgi?id=133589

Reviewed by Antti Koivisto.

Source/WebCore:
When a spanner is moved from a multicol thread to another, its placeholder
must be properly repositioned.

Test: fast/multicol/newmulticol/spanner-crash.html

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):

LayoutTests:
* fast/multicol/newmulticol/spanner-crash-expected.txt: Added.
* fast/multicol/newmulticol/spanner-crash.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (170009 => 170010)


--- trunk/LayoutTests/ChangeLog	2014-06-16 16:20:01 UTC (rev 170009)
+++ trunk/LayoutTests/ChangeLog	2014-06-16 16:33:27 UTC (rev 170010)
@@ -1,3 +1,13 @@
+2014-06-16  Radu Stavila  <stav...@adobe.com>
+
+        REGRESSION (r168046): Incorrect layout for multicol spanners when moving from one thread to another
+        https://bugs.webkit.org/show_bug.cgi?id=133589
+
+        Reviewed by Antti Koivisto.
+
+        * fast/multicol/newmulticol/spanner-crash-expected.txt: Added.
+        * fast/multicol/newmulticol/spanner-crash.html: Added.
+
 2014-06-16  Mario Sanchez Prada  <mario.pr...@samsung.com>
 
         [ATK] Missing 'selection-changed' signal when navigating a combo box with keyboard

Added: trunk/LayoutTests/fast/multicol/newmulticol/spanner-crash-expected.txt (0 => 170010)


--- trunk/LayoutTests/fast/multicol/newmulticol/spanner-crash-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/newmulticol/spanner-crash-expected.txt	2014-06-16 16:33:27 UTC (rev 170010)
@@ -0,0 +1 @@
+

Added: trunk/LayoutTests/fast/multicol/newmulticol/spanner-crash.html (0 => 170010)


--- trunk/LayoutTests/fast/multicol/newmulticol/spanner-crash.html	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/newmulticol/spanner-crash.html	2014-06-16 16:33:27 UTC (rev 170010)
@@ -0,0 +1,35 @@
+<!-- This test passes if it doesn't crash - https://bugs.webkit.org/show_bug.cgi?id=133589 -->
+
+<style>
+	h2 { 
+		-webkit-column-span: all;
+	}
+
+	* {
+		visibility: hidden;
+	}
+</style>
+
+<div>
+	<h2 id="base">Y</h2>
+</div>
+<div id="four">
+	XX<span id="beforetwo"></p>
+
+<script>
+	if (window.testRunner)
+        testRunner.dumpAsText();
+
+	four.insertBefore(document.getElementById('base').cloneNode(true), document.getElementById('beforetwo'));
+	var head = document.getElementsByTagName("head")[0];
+	var style = document.createElement("style");
+	style.innerHTML="* { \n\
+		-webkit-animation-name: name9; \n\
+		-webkit-animation-duration: 3s; \n\
+		} \n\
+		@-webkit-keyframes name9 { \n\
+		  from { \n\
+		    -webkit-column-count: 18446744073709551615; \n\
+		";
+	head.appendChild(style);
+</script>

Modified: trunk/Source/WebCore/ChangeLog (170009 => 170010)


--- trunk/Source/WebCore/ChangeLog	2014-06-16 16:20:01 UTC (rev 170009)
+++ trunk/Source/WebCore/ChangeLog	2014-06-16 16:33:27 UTC (rev 170010)
@@ -1,3 +1,18 @@
+2014-06-16  Radu Stavila  <stav...@adobe.com>
+
+        REGRESSION (r168046): Incorrect layout for multicol spanners when moving from one thread to another
+        https://bugs.webkit.org/show_bug.cgi?id=133589
+
+        Reviewed by Antti Koivisto.
+
+        When a spanner is moved from a multicol thread to another, its placeholder
+        must be properly repositioned.
+
+        Test: fast/multicol/newmulticol/spanner-crash.html
+
+        * rendering/RenderMultiColumnFlowThread.cpp:
+        (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
+
 2014-06-16  Mario Sanchez Prada  <mario.pr...@samsung.com>
 
         [ATK] Missing 'selection-changed' signal when navigating a combo box with keyboard

Modified: trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp (170009 => 170010)


--- trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp	2014-06-16 16:20:01 UTC (rev 170009)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp	2014-06-16 16:33:27 UTC (rev 170010)
@@ -290,9 +290,6 @@
                 // becoming our spanner instead, but for it to do that we first have to nuke the original spanner,
                 // and get the spanner content back into this flow thread.
                 RenderBox* spanner = placeholder->spanner();
-
-                // Advance, since we're about to delete the descendant.
-                descendant = descendant->nextInPreOrder(subtreeRoot);
                 
                 // Get info for the move of the original content back into our flow thread.
                 RenderBoxModelObject* placeholderParent = toRenderBoxModelObject(placeholder->parent());
@@ -309,12 +306,12 @@
                 // on the new content only, and everything will get set up properly.
                 ancestorBlock->moveChildTo(placeholderParent, spanner, placeholderNextSibling, true);
                 
+                // Advance descendant.
+                descendant = placeholderNextSibling;
+                
                 // If the spanner was the subtree root, then we're done, since there is nothing else left to insert.
                 if (!descendant)
                     return;
-                
-                if (!placeholderNextSibling)
-                    descendant = nullptr;
 
                 // Now that we have done this, we can continue past the spanning content, since we advanced
                 // descendant already.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to