Diff
Modified: branches/safari-603-branch/LayoutTests/ChangeLog (211517 => 211518)
--- branches/safari-603-branch/LayoutTests/ChangeLog 2017-02-01 21:26:34 UTC (rev 211517)
+++ branches/safari-603-branch/LayoutTests/ChangeLog 2017-02-01 21:26:37 UTC (rev 211518)
@@ -1,5 +1,20 @@
2017-01-31 Matthew Hanson <matthew_han...@apple.com>
+ Merge r211337. rdar://problem/30126535
+
+ 2017-01-28 Zalan Bujtas <za...@apple.com>
+
+ Resolve beforeChild's render tree position before calling addChildIgnoringContinuation.
+ https://bugs.webkit.org/show_bug.cgi?id=167540
+ <rdar://problem/30126535>
+
+ Reviewed by Simon Fraser.
+
+ * fast/multicol/assert-on-continuation-with-spanner-expected.txt: Added.
+ * fast/multicol/assert-on-continuation-with-spanner.html: Added.
+
+2017-01-31 Matthew Hanson <matthew_han...@apple.com>
+
Merge r211307. rdar://problem/29320059
2017-01-27 Simon Fraser <simon.fra...@apple.com>
Added: branches/safari-603-branch/LayoutTests/fast/multicol/assert-on-continuation-with-spanner-expected.txt (0 => 211518)
--- branches/safari-603-branch/LayoutTests/fast/multicol/assert-on-continuation-with-spanner-expected.txt (rev 0)
+++ branches/safari-603-branch/LayoutTests/fast/multicol/assert-on-continuation-with-spanner-expected.txt 2017-02-01 21:26:37 UTC (rev 211518)
@@ -0,0 +1 @@
+PASS if no crash or assert in debug.
Added: branches/safari-603-branch/LayoutTests/fast/multicol/assert-on-continuation-with-spanner.html (0 => 211518)
--- branches/safari-603-branch/LayoutTests/fast/multicol/assert-on-continuation-with-spanner.html (rev 0)
+++ branches/safari-603-branch/LayoutTests/fast/multicol/assert-on-continuation-with-spanner.html 2017-02-01 21:26:37 UTC (rev 211518)
@@ -0,0 +1,32 @@
+<!doctype html>
+<html>
+<head>
+<title>This tests that we can insert element when beforeChild has a spanner placeholder</title>
+<style>
+#spanner {
+ column-span: all;
+}
+
+.multicol {
+ display: inline-block;
+ -webkit-columns: 80px 5;
+}
+</style>
+</head>
+<body>
+PASS if no crash or assert in debug.
+<div class=multicol><span><span id=inner></span><div id=spanner></div>
+<script>
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+}
+setTimeout(function() {
+ inner.style.content = "close-quote";
+ spanner.style.float = "left";
+ if (window.testRunner)
+ testRunner.notifyDone();
+}, 0);
+</script>
+</body>
+</html>
Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (211517 => 211518)
--- branches/safari-603-branch/Source/WebCore/ChangeLog 2017-02-01 21:26:34 UTC (rev 211517)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog 2017-02-01 21:26:37 UTC (rev 211518)
@@ -1,5 +1,28 @@
2017-01-31 Matthew Hanson <matthew_han...@apple.com>
+ Merge r211337. rdar://problem/30126535
+
+ 2017-01-28 Zalan Bujtas <za...@apple.com>
+
+ Resolve beforeChild's render tree position before calling addChildIgnoringContinuation.
+ https://bugs.webkit.org/show_bug.cgi?id=167540
+ <rdar://problem/30126535>
+
+ Reviewed by Simon Fraser.
+
+ Use the actual render tree position for the beforeChild when inside a flow thread.
+
+ Test: fast/multicol/assert-on-continuation-with-spanner.html
+
+ * rendering/RenderBlockFlow.cpp:
+ (WebCore::RenderBlockFlow::addChild):
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::addChild):
+ * rendering/RenderMultiColumnFlowThread.cpp:
+ (WebCore::RenderMultiColumnFlowThread::resolveMovedChild):
+
+2017-01-31 Matthew Hanson <matthew_han...@apple.com>
+
Merge r211309. rdar://problem/30240378
2017-01-27 Michael Saboff <msab...@apple.com>
Modified: branches/safari-603-branch/Source/WebCore/rendering/RenderBlockFlow.cpp (211517 => 211518)
--- branches/safari-603-branch/Source/WebCore/rendering/RenderBlockFlow.cpp 2017-02-01 21:26:34 UTC (rev 211517)
+++ branches/safari-603-branch/Source/WebCore/rendering/RenderBlockFlow.cpp 2017-02-01 21:26:37 UTC (rev 211518)
@@ -3906,11 +3906,10 @@
{
if (multiColumnFlowThread())
return multiColumnFlowThread()->addChild(newChild, beforeChild);
- if (beforeChild) {
- if (RenderFlowThread* containingFlowThread = flowThreadContainingBlock())
- beforeChild = containingFlowThread->resolveMovedChild(beforeChild);
- }
- RenderBlock::addChild(newChild, beforeChild);
+ auto* beforeChildOrPlaceholder = beforeChild;
+ if (auto* containingFlowThread = flowThreadContainingBlock())
+ beforeChildOrPlaceholder = containingFlowThread->resolveMovedChild(beforeChild);
+ RenderBlock::addChild(newChild, beforeChildOrPlaceholder);
}
void RenderBlockFlow::removeChild(RenderObject& oldChild)
Modified: branches/safari-603-branch/Source/WebCore/rendering/RenderInline.cpp (211517 => 211518)
--- branches/safari-603-branch/Source/WebCore/rendering/RenderInline.cpp 2017-02-01 21:26:34 UTC (rev 211517)
+++ branches/safari-603-branch/Source/WebCore/rendering/RenderInline.cpp 2017-02-01 21:26:37 UTC (rev 211518)
@@ -275,9 +275,12 @@
void RenderInline::addChild(RenderObject* newChild, RenderObject* beforeChild)
{
+ auto* beforeChildOrPlaceholder = beforeChild;
+ if (auto* flowThread = flowThreadContainingBlock())
+ beforeChildOrPlaceholder = flowThread->resolveMovedChild(beforeChild);
if (continuation())
- return addChildToContinuation(newChild, beforeChild);
- return addChildIgnoringContinuation(newChild, beforeChild);
+ return addChildToContinuation(newChild, beforeChildOrPlaceholder);
+ return addChildIgnoringContinuation(newChild, beforeChildOrPlaceholder);
}
static RenderBoxModelObject* nextContinuation(RenderObject* renderer)
Modified: branches/safari-603-branch/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp (211517 => 211518)
--- branches/safari-603-branch/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp 2017-02-01 21:26:34 UTC (rev 211517)
+++ branches/safari-603-branch/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp 2017-02-01 21:26:37 UTC (rev 211518)
@@ -216,6 +216,9 @@
RenderObject* RenderMultiColumnFlowThread::resolveMovedChild(RenderObject* child) const
{
+ if (!child)
+ return nullptr;
+
if (child->style().columnSpan() != ColumnSpanAll || !is<RenderBox>(*child)) {
// We only need to resolve for column spanners.
return child;