Diff
Modified: branches/safari-600.3-branch/LayoutTests/ChangeLog (175498 => 175499)
--- branches/safari-600.3-branch/LayoutTests/ChangeLog 2014-11-04 01:05:51 UTC (rev 175498)
+++ branches/safari-600.3-branch/LayoutTests/ChangeLog 2014-11-04 01:15:44 UTC (rev 175499)
@@ -1,3 +1,24 @@
+2014-11-03 Dana Burkart <dburk...@apple.com>
+
+ Merge r171849. <rdar://problem/18856127>
+
+ 2014-07-31 Andrei Bucur <abu...@adobe.com>
+
+ [CSS Multicolumn] Clear the lines when switching to multi-column layout
+ https://bugs.webkit.org/show_bug.cgi?id=135127
+
+ Reviewed by Alexandru Chiculita.
+
+ Tests that verifies lines are correctly cleared when an element is switched to
+ multi-column layout.
+
+ * fast/multicol/inline-container-to-multicol-expected.txt: Added.
+ * fast/multicol/inline-container-to-multicol.html: Added.
+ * fast/multicol/inline-container-to-multicol-float-expected.txt: Added.
+ * fast/multicol/inline-container-to-multicol-float.html: Added.
+ * fast/multicol/inline-container-to-multicol-positioned-expected.txt: Added.
+ * fast/multicol/inline-container-to-multicol-positioned.html: Added.
+
2014-10-28 Dana Burkart <dburk...@apple.com>
Merge r174190. <rdar://problem/18640846>
Copied: branches/safari-600.3-branch/LayoutTests/fast/multicol/inline-container-to-multicol-expected.txt (from rev 171849, trunk/LayoutTests/fast/multicol/inline-container-to-multicol-expected.txt) (0 => 175499)
--- branches/safari-600.3-branch/LayoutTests/fast/multicol/inline-container-to-multicol-expected.txt (rev 0)
+++ branches/safari-600.3-branch/LayoutTests/fast/multicol/inline-container-to-multicol-expected.txt 2014-11-04 01:15:44 UTC (rev 175499)
@@ -0,0 +1 @@
+b135127: The test passes if it doesn't hang or crash
Copied: branches/safari-600.3-branch/LayoutTests/fast/multicol/inline-container-to-multicol-float-expected.txt (from rev 171849, trunk/LayoutTests/fast/multicol/inline-container-to-multicol-float-expected.txt) (0 => 175499)
--- branches/safari-600.3-branch/LayoutTests/fast/multicol/inline-container-to-multicol-float-expected.txt (rev 0)
+++ branches/safari-600.3-branch/LayoutTests/fast/multicol/inline-container-to-multicol-float-expected.txt 2014-11-04 01:15:44 UTC (rev 175499)
@@ -0,0 +1 @@
+b135127: The test passes if it doesn't hang or crash
Copied: branches/safari-600.3-branch/LayoutTests/fast/multicol/inline-container-to-multicol-float.html (from rev 171849, trunk/LayoutTests/fast/multicol/inline-container-to-multicol-float.html) (0 => 175499)
--- branches/safari-600.3-branch/LayoutTests/fast/multicol/inline-container-to-multicol-float.html (rev 0)
+++ branches/safari-600.3-branch/LayoutTests/fast/multicol/inline-container-to-multicol-float.html 2014-11-04 01:15:44 UTC (rev 175499)
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style type="text/css">
+ #multicol {
+ border: thin solid green;
+ height: 300px;
+ width: 200px;
+ text-align: justify;
+ }
+
+ #multicol.has-first-letter::first-letter {
+ color: red;
+ font-size: 10px;
+ }
+
+ #float {
+ float: left;
+ width: 20px;
+ height: 10px;
+ background: blue;
+ }
+ </style>
+</head>
+<body>
+ <p><a href="" The test passes if it doesn't hang or crash</p>
+ <div id="multicol" class="has-first-letter">
+ Text text text text text text text text <div id="float">A</div>Text text text text Text text text text Text text text text text text text text
+ </div>
+ <script type="text/_javascript_">
+ if (window.testRunner)
+ window.testRunner.dumpAsText();
+
+ var multicolElement = document.getElementById("multicol");
+ var floatElement = document.getElementById("float");
+
+ document.body.offsetTop;
+
+ multicolElement.style.webkitColumnCount = "2";
+ document.body.offsetTop;
+
+ multicolElement.style.webkitColumnCount = "auto";
+ document.body.offsetLeft;
+
+ multicolElement.className = "";
+ document.body.offsetLeft;
+
+ multicolElement.remove();
+ </script>
+</body>
+</html>
Copied: branches/safari-600.3-branch/LayoutTests/fast/multicol/inline-container-to-multicol-positioned-expected.txt (from rev 171849, trunk/LayoutTests/fast/multicol/inline-container-to-multicol-positioned-expected.txt) (0 => 175499)
--- branches/safari-600.3-branch/LayoutTests/fast/multicol/inline-container-to-multicol-positioned-expected.txt (rev 0)
+++ branches/safari-600.3-branch/LayoutTests/fast/multicol/inline-container-to-multicol-positioned-expected.txt 2014-11-04 01:15:44 UTC (rev 175499)
@@ -0,0 +1 @@
+b135127: The test passes if it doesn't hang or crash
Copied: branches/safari-600.3-branch/LayoutTests/fast/multicol/inline-container-to-multicol-positioned.html (from rev 171849, trunk/LayoutTests/fast/multicol/inline-container-to-multicol-positioned.html) (0 => 175499)
--- branches/safari-600.3-branch/LayoutTests/fast/multicol/inline-container-to-multicol-positioned.html (rev 0)
+++ branches/safari-600.3-branch/LayoutTests/fast/multicol/inline-container-to-multicol-positioned.html 2014-11-04 01:15:44 UTC (rev 175499)
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style type="text/css">
+ #multicol {
+ border: thin solid green;
+ height: 300px;
+ width: 200px;
+ text-align: justify;
+ position: relative;
+ }
+
+ #positioned {
+ position: absolute;
+ }
+ </style>
+</head>
+<body>
+ <p><a href="" The test passes if it doesn't hang or crash</p>
+ <div id="multicol">
+ Text text text text text text text text <span id="positioned">Text text text text Text text text text</span>Text text text text Text text text text Text text text text text text text text
+ </div>
+ <script type="text/_javascript_">
+ if (window.testRunner)
+ window.testRunner.dumpAsText();
+
+ var multicolElement = document.getElementById("multicol");
+
+ document.body.offsetTop;
+
+ multicolElement.style.webkitColumnCount = "2";
+ document.body.offsetTop;
+
+ multicolElement.style.webkitColumnCount = "auto";
+ document.body.offsetLeft;
+
+ multicolElement.remove();
+ </script>
+</body>
+</html>
Copied: branches/safari-600.3-branch/LayoutTests/fast/multicol/inline-container-to-multicol.html (from rev 171849, trunk/LayoutTests/fast/multicol/inline-container-to-multicol.html) (0 => 175499)
--- branches/safari-600.3-branch/LayoutTests/fast/multicol/inline-container-to-multicol.html (rev 0)
+++ branches/safari-600.3-branch/LayoutTests/fast/multicol/inline-container-to-multicol.html 2014-11-04 01:15:44 UTC (rev 175499)
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style type="text/css">
+ #multicol {
+ border: thin solid green;
+ height: 300px;
+ width: 200px;
+ text-align: justify;
+ }
+ </style>
+</head>
+<body>
+ <p><a href="" The test passes if it doesn't hang or crash</p>
+ <div id="multicol">
+ <div id="remove">A</div>Text text text text text text text text <div id="remove2">A</div>Text text text text Text text text text Text text text text text text text text
+ </div>
+ <script type="text/_javascript_">
+ if (window.testRunner)
+ window.testRunner.dumpAsText();
+
+ var multicolElement = document.getElementById("multicol");
+ var removeElement = document.getElementById("remove");
+ var removeElement2 = document.getElementById("remove2");
+
+ removeElement.remove();
+ removeElement2.remove();
+ document.body.offsetTop;
+
+ multicolElement.style.webkitColumnCount = "2";
+ document.body.offsetTop;
+
+ multicolElement.appendChild(removeElement);
+ multicolElement.appendChild(removeElement2);
+ document.body.offsetLeft;
+ multicolElement.style.webkitColumnCount = "auto";
+ document.body.offsetLeft;
+
+ multicolElement.remove();
+ </script>
+</body>
+</html>
Modified: branches/safari-600.3-branch/Source/WebCore/ChangeLog (175498 => 175499)
--- branches/safari-600.3-branch/Source/WebCore/ChangeLog 2014-11-04 01:05:51 UTC (rev 175498)
+++ branches/safari-600.3-branch/Source/WebCore/ChangeLog 2014-11-04 01:15:44 UTC (rev 175499)
@@ -1,3 +1,25 @@
+2014-11-03 Dana Burkart <dburk...@apple.com>
+
+ Merge r171849. <rdar://problem/18856127>
+
+ 2014-07-31 Andrei Bucur <abu...@adobe.com>
+
+ [CSS Multicolumn] Clear the lines when switching to multi-column layout
+ https://bugs.webkit.org/show_bug.cgi?id=135127
+
+ Reviewed by Alexandru Chiculita.
+
+ When switching an element to multi-column layout it becomes a container of block
+ children. When this happens the existing line boxes must be deleted in addition
+ to clearing the hasInlineChildren flag.
+
+ Tests: fast/multicol/inline-container-to-multicol.html
+ fast/multicol/inline-container-to-multicol-float.html
+ fast/multicol/inline-container-to-multicol-positioned.html
+
+ * rendering/RenderBlockFlow.cpp:
+ (WebCore::RenderBlockFlow::createMultiColumnFlowThread):
+
2014-10-29 Matthew Hanson <matthew_han...@apple.com>
Add a missing symbol to fix the build after the merge of r175335. rdar://problem/18709436
Modified: branches/safari-600.3-branch/Source/WebCore/rendering/RenderBlockFlow.cpp (175498 => 175499)
--- branches/safari-600.3-branch/Source/WebCore/rendering/RenderBlockFlow.cpp 2014-11-04 01:05:51 UTC (rev 175498)
+++ branches/safari-600.3-branch/Source/WebCore/rendering/RenderBlockFlow.cpp 2014-11-04 01:15:44 UTC (rev 175499)
@@ -121,6 +121,7 @@
RenderMultiColumnFlowThread* flowThread = new RenderMultiColumnFlowThread(document(), RenderStyle::createAnonymousStyleWithDisplay(&style(), BLOCK));
flowThread->initializeStyle();
setChildrenInline(false); // Do this to avoid wrapping inline children that are just going to move into the flow thread.
+ deleteLines();
RenderBlock::addChild(flowThread);
flowThread->populate(); // Called after the flow thread is inserted so that we are reachable by the flow thread.
setMultiColumnFlowThread(flowThread);