<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[202931] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/202931">202931</a></dd>
<dt>Author</dt> <dd>antti@apple.com</dd>
<dt>Date</dt> <dd>2016-07-07 14:24:45 -0700 (Thu, 07 Jul 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>REGRESSION (<a href="http://trac.webkit.org/projects/webkit/changeset/199054">r199054</a>): CrashTracer: [USER] parseWebKit at WebCore: WebCore::RenderBlockFlow::checkFloatsInCleanLine + 107
https://bugs.webkit.org/show_bug.cgi?id=159519
Reviewed by Zalan Bujtas.
Source/WebCore:
Test: fast/inline/trailing-floats-inline-crash.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::checkFloatsInCleanLine):
Use the existing deletionHasBegun bit in RenderStyle to assert against this reliably.
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
In some cases a special TrailingFloatsRootInlineBox may be added as the last root linebox of a flow.
If it is combined with br the existing invalidation that invalidates the next and previous line may
not be sufficient. Test for this case and invalidate the TrailingFloatsRootInlineBox too if it exists.
* rendering/RootInlineBox.h:
(WebCore::RootInlineBox::isTrailingFloatsRootInlineBox):
* rendering/TrailingFloatsRootInlineBox.h:
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::deletionHasBegun):
Expose the bit in debug.
LayoutTests:
* fast/inline/trailing-floats-inline-crash-expected.txt: Added.
* fast/inline/trailing-floats-inline-crash.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockLineLayoutcpp">trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLineBoxListcpp">trunk/Source/WebCore/rendering/RenderLineBoxList.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRootInlineBoxh">trunk/Source/WebCore/rendering/RootInlineBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingTrailingFloatsRootInlineBoxh">trunk/Source/WebCore/rendering/TrailingFloatsRootInlineBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleh">trunk/Source/WebCore/rendering/style/RenderStyle.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastinlinetrailingfloatsinlinecrashexpectedtxt">trunk/LayoutTests/fast/inline/trailing-floats-inline-crash-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastinlinetrailingfloatsinlinecrashhtml">trunk/LayoutTests/fast/inline/trailing-floats-inline-crash.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (202930 => 202931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-07-07 21:09:14 UTC (rev 202930)
+++ trunk/LayoutTests/ChangeLog        2016-07-07 21:24:45 UTC (rev 202931)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-07-07 Antti Koivisto <antti@apple.com>
+
+ REGRESSION (r199054): CrashTracer: [USER] parseWebKit at WebCore: WebCore::RenderBlockFlow::checkFloatsInCleanLine + 107
+ https://bugs.webkit.org/show_bug.cgi?id=159519
+
+ Reviewed by Zalan Bujtas.
+
+ * fast/inline/trailing-floats-inline-crash-expected.txt: Added.
+ * fast/inline/trailing-floats-inline-crash.html: Added.
+
</ins><span class="cx"> 2016-07-07 Commit Queue <commit-queue@webkit.org>
</span><span class="cx">
</span><span class="cx"> Unreviewed, rolling out r202905 and r202911.
</span></span></pre></div>
<a id="trunkLayoutTestsfastinlinetrailingfloatsinlinecrashexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/inline/trailing-floats-inline-crash-expected.txt (0 => 202931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/inline/trailing-floats-inline-crash-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/inline/trailing-floats-inline-crash-expected.txt        2016-07-07 21:24:45 UTC (rev 202931)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+This test passes if it doesn't crash.
+
+
+
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBAAAAAAAAAAAAAAAAAAAAAC
</ins></span></pre></div>
<a id="trunkLayoutTestsfastinlinetrailingfloatsinlinecrashhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/inline/trailing-floats-inline-crash.html (0 => 202931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/inline/trailing-floats-inline-crash.html         (rev 0)
+++ trunk/LayoutTests/fast/inline/trailing-floats-inline-crash.html        2016-07-07 21:24:45 UTC (rev 202931)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<style>
+ :last-child {float:left;}
+</style>
+</head>
+
+<body>
+This test passes if it doesn't crash.
+<nav></nav>
+<br>
+<article>
+<pre></pre>
+<br>
+<content>
+<br>
+<select></select>
+<script id="webtest14">
+document.body.contentEditable = "true";
+document.execCommand("SelectAll");
+document.execCommand("StrikeThrough");
+if (window.testRunner)
+        testRunner.dumpAsText();
+</script>
+BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBAAAAAAAAAAAAAAAAAAAAAC
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (202930 => 202931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-07-07 21:09:14 UTC (rev 202930)
+++ trunk/Source/WebCore/ChangeLog        2016-07-07 21:24:45 UTC (rev 202931)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2016-07-07 Antti Koivisto <antti@apple.com>
+
+ REGRESSION (r199054): CrashTracer: [USER] parseWebKit at WebCore: WebCore::RenderBlockFlow::checkFloatsInCleanLine + 107
+ https://bugs.webkit.org/show_bug.cgi?id=159519
+
+ Reviewed by Zalan Bujtas.
+
+ Test: fast/inline/trailing-floats-inline-crash.html
+
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlockFlow::checkFloatsInCleanLine):
+
+ Use the existing deletionHasBegun bit in RenderStyle to assert against this reliably.
+
+ * rendering/RenderLineBoxList.cpp:
+ (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
+
+ In some cases a special TrailingFloatsRootInlineBox may be added as the last root linebox of a flow.
+ If it is combined with br the existing invalidation that invalidates the next and previous line may
+ not be sufficient. Test for this case and invalidate the TrailingFloatsRootInlineBox too if it exists.
+
+ * rendering/RootInlineBox.h:
+ (WebCore::RootInlineBox::isTrailingFloatsRootInlineBox):
+ * rendering/TrailingFloatsRootInlineBox.h:
+ * rendering/style/RenderStyle.h:
+ (WebCore::RenderStyle::deletionHasBegun):
+
+ Expose the bit in debug.
+
</ins><span class="cx"> 2016-07-07 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Use SocketProvider to create WebSocketChannels
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockLineLayoutcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (202930 => 202931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2016-07-07 21:09:14 UTC (rev 202930)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2016-07-07 21:24:45 UTC (rev 202931)
</span><span class="lines">@@ -1788,6 +1788,7 @@
</span><span class="cx">
</span><span class="cx"> for (auto it = cleanLineFloats->begin(), end = cleanLineFloats->end(); it != end; ++it) {
</span><span class="cx"> RenderBox* floatingBox = *it;
</span><ins>+ ASSERT_WITH_SECURITY_IMPLICATION(!floatingBox->style().deletionHasBegun());
</ins><span class="cx"> floatingBox->layoutIfNeeded();
</span><span class="cx"> LayoutSize newSize(floatingBox->width() + floatingBox->horizontalMarginExtent(), floatingBox->height() + floatingBox->verticalMarginExtent());
</span><span class="cx"> ASSERT_WITH_SECURITY_IMPLICATION(floatIndex < floats.size());
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLineBoxListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLineBoxList.cpp (202930 => 202931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLineBoxList.cpp        2016-07-07 21:09:14 UTC (rev 202930)
+++ trunk/Source/WebCore/rendering/RenderLineBoxList.cpp        2016-07-07 21:24:45 UTC (rev 202931)
</span><span class="lines">@@ -382,8 +382,15 @@
</span><span class="cx">
</span><span class="cx"> // FIXME: We shouldn't need to always dirty the next line. This is only strictly
</span><span class="cx"> // necessary some of the time, in situations involving BRs.
</span><del>- if (RootInlineBox* nextBox = box->nextRootBox())
</del><ins>+ if (RootInlineBox* nextBox = box->nextRootBox()) {
</ins><span class="cx"> nextBox->markDirty();
</span><ins>+
+ // Special root box for floats may be added at the end of the list. If this occurs with BRs we need to invalidate it explicitly.
+ if (auto* nextNextBox = nextBox->nextRootBox()) {
+ if (nextNextBox->isTrailingFloatsRootInlineBox())
+ nextNextBox->markDirty();
+ }
+ }
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRootInlineBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RootInlineBox.h (202930 => 202931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RootInlineBox.h        2016-07-07 21:09:14 UTC (rev 202930)
+++ trunk/Source/WebCore/rendering/RootInlineBox.h        2016-07-07 21:24:45 UTC (rev 202931)
</span><span class="lines">@@ -190,6 +190,8 @@
</span><span class="cx"> Node* getLogicalStartBoxWithNode(InlineBox*&) const;
</span><span class="cx"> Node* getLogicalEndBoxWithNode(InlineBox*&) const;
</span><span class="cx">
</span><ins>+ virtual bool isTrailingFloatsRootInlineBox() const { return false; }
+
</ins><span class="cx"> #if ENABLE(TREE_DEBUGGING)
</span><span class="cx"> const char* boxName() const final;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingTrailingFloatsRootInlineBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/TrailingFloatsRootInlineBox.h (202930 => 202931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/TrailingFloatsRootInlineBox.h        2016-07-07 21:09:14 UTC (rev 202930)
+++ trunk/Source/WebCore/rendering/TrailingFloatsRootInlineBox.h        2016-07-07 21:24:45 UTC (rev 202931)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> float virtualLogicalHeight() const override { return 0; }
</span><ins>+ bool isTrailingFloatsRootInlineBox() const final { return true; }
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (202930 => 202931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h        2016-07-07 21:09:14 UTC (rev 202930)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h        2016-07-07 21:24:45 UTC (rev 202931)
</span><span class="lines">@@ -498,6 +498,10 @@
</span><span class="cx"> static RenderStyle createAnonymousStyleWithDisplay(const RenderStyle& parentStyle, EDisplay);
</span><span class="cx"> static RenderStyle createStyleInheritingFromPseudoStyle(const RenderStyle& pseudoStyle);
</span><span class="cx">
</span><ins>+#if !ASSERT_DISABLED
+ bool deletionHasBegun() const { return m_deletionHasBegun; }
+#endif
+
</ins><span class="cx"> ContentPosition resolvedJustifyContentPosition(const StyleContentAlignmentData& normalValueBehavior) const;
</span><span class="cx"> ContentDistributionType resolvedJustifyContentDistribution(const StyleContentAlignmentData& normalValueBehavior) const;
</span><span class="cx"> ContentPosition resolvedAlignContentPosition(const StyleContentAlignmentData& normalValueBehavior) const;
</span></span></pre>
</div>
</div>
</body>
</html>