<!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>[224600] trunk/Source</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/224600">224600</a></dd>
<dt>Author</dt> <dd>antti@apple.com</dd>
<dt>Date</dt> <dd>2017-11-08 15:13:42 -0800 (Wed, 08 Nov 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Move inlineElementContinuation function to RenderBoxModelObject and rename to inlineContinuation
https://bugs.webkit.org/show_bug.cgi?id=179437

Reviewed by Zalan Bujtas.

Unify RenderInline::inlineElementContinuation and RenderBlock::inlineElementContinuation.
It is simply a function to find the next RenderInline in the continuation chain.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::lastChildConsideringContinuation):
(WebCore::startOfContinuations):
(WebCore::endOfContinuations):
(WebCore::childBeforeConsideringContinuations):
(WebCore::AccessibilityRenderObject::nextSibling const):
(WebCore::nextContinuation):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintObject):
(WebCore::RenderBlock::absoluteRects const):
(WebCore::RenderBlock::addFocusRingRects):
(WebCore::RenderBlock::inlineElementContinuation const): Deleted.
* rendering/RenderBlock.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::accumulateInFlowPositionOffsets):
(WebCore::RenderBoxModelObject::inlineContinuation const):
* rendering/RenderBoxModelObject.h:
* rendering/RenderInline.cpp:
(WebCore::updateStyleOfAnonymousBlockContinuations):
(WebCore::RenderInline::styleDidChange):
(WebCore::nextContinuation):
(WebCore::RenderInline::positionForPoint):
(WebCore::RenderInline::inlineElementContinuation const): Deleted.
* rendering/RenderInline.h:
* rendering/line/LineInlineHeaders.h:
(WebCore::hasInlineDirectionBordersPaddingOrMargin):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockcpp">trunk/Source/WebCore/rendering/RenderBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockh">trunk/Source/WebCore/rendering/RenderBlock.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxModelObjectcpp">trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxModelObjecth">trunk/Source/WebCore/rendering/RenderBoxModelObject.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderInlinecpp">trunk/Source/WebCore/rendering/RenderInline.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderInlineh">trunk/Source/WebCore/rendering/RenderInline.h</a></li>
<li><a href="#trunkSourceWebCorerenderinglineLineInlineHeadersh">trunk/Source/WebCore/rendering/line/LineInlineHeaders.h</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebPageiosWebPageIOSmm">trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
<li><a href="#trunkSourceWebKitLegacymacDOMDOMUIKitExtensionsmm">trunk/Source/WebKitLegacy/mac/DOM/DOMUIKitExtensions.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (224599 => 224600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2017-11-08 23:11:56 UTC (rev 224599)
+++ trunk/Source/WebCore/ChangeLog      2017-11-08 23:13:42 UTC (rev 224600)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2017-11-08  Antti Koivisto  <antti@apple.com>
+
+        Move inlineElementContinuation function to RenderBoxModelObject and rename to inlineContinuation
+        https://bugs.webkit.org/show_bug.cgi?id=179437
+
+        Reviewed by Zalan Bujtas.
+
+        Unify RenderInline::inlineElementContinuation and RenderBlock::inlineElementContinuation.
+        It is simply a function to find the next RenderInline in the continuation chain.
+
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::lastChildConsideringContinuation):
+        (WebCore::startOfContinuations):
+        (WebCore::endOfContinuations):
+        (WebCore::childBeforeConsideringContinuations):
+        (WebCore::AccessibilityRenderObject::nextSibling const):
+        (WebCore::nextContinuation):
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::paintObject):
+        (WebCore::RenderBlock::absoluteRects const):
+        (WebCore::RenderBlock::addFocusRingRects):
+        (WebCore::RenderBlock::inlineElementContinuation const): Deleted.
+        * rendering/RenderBlock.h:
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::accumulateInFlowPositionOffsets):
+        (WebCore::RenderBoxModelObject::inlineContinuation const):
+        * rendering/RenderBoxModelObject.h:
+        * rendering/RenderInline.cpp:
+        (WebCore::updateStyleOfAnonymousBlockContinuations):
+        (WebCore::RenderInline::styleDidChange):
+        (WebCore::nextContinuation):
+        (WebCore::RenderInline::positionForPoint):
+        (WebCore::RenderInline::inlineElementContinuation const): Deleted.
+        * rendering/RenderInline.h:
+        * rendering/line/LineInlineHeaders.h:
+        (WebCore::hasInlineDirectionBordersPaddingOrMargin):
+
</ins><span class="cx"> 2017-11-08  Joseph Pecoraro  <pecoraro@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Eliminate unnecessary hash lookups with NetworkResourceData
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (224599 => 224600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2017-11-08 23:11:56 UTC (rev 224599)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp    2017-11-08 23:13:42 UTC (rev 224600)
</span><span class="lines">@@ -199,18 +199,11 @@
</span><span class="cx">         return &renderer;
</span><span class="cx"> 
</span><span class="cx">     RenderObject* lastChild = downcast<RenderBoxModelObject>(renderer).lastChild();
</span><del>-    RenderBoxModelObject* previous;
</del><span class="cx">     for (auto* current = &downcast<RenderBoxModelObject>(renderer); current; ) {
</span><del>-        previous = current;
-
</del><span class="cx">         if (RenderObject* newLastChild = current->lastChild())
</span><span class="cx">             lastChild = newLastChild;
</span><span class="cx"> 
</span><del>-        if (is<RenderInline>(*current)) {
-            current = downcast<RenderInline>(*current).inlineElementContinuation();
-            ASSERT_UNUSED(previous, current || !downcast<RenderInline>(*previous).continuation());
-        } else
-            current = downcast<RenderBlock>(*current).inlineElementContinuation();
</del><ins>+        current = current->inlineContinuation();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return lastChild;
</span><span class="lines">@@ -255,8 +248,8 @@
</span><span class="cx">         return downcast<RenderInline>(renderer.node()->renderer());
</span><span class="cx"> 
</span><span class="cx">     // Blocks with a previous continuation always have a next continuation
</span><del>-    if (is<RenderBlock>(renderElement) && downcast<RenderBlock>(renderElement).inlineElementContinuation())
-        return downcast<RenderInline>(downcast<RenderBlock>(renderElement).inlineElementContinuation()->element()->renderer());
</del><ins>+    if (is<RenderBlock>(renderElement) && downcast<RenderBlock>(renderElement).inlineContinuation())
+        return downcast<RenderInline>(downcast<RenderBlock>(renderElement).inlineContinuation()->element()->renderer());
</ins><span class="cx"> 
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="lines">@@ -269,11 +262,7 @@
</span><span class="cx">     auto* previous = &downcast<RenderBoxModelObject>(renderer);
</span><span class="cx">     for (auto* current = previous; current; ) {
</span><span class="cx">         previous = current;
</span><del>-        if (is<RenderInline>(*current)) {
-            current = downcast<RenderInline>(*current).inlineElementContinuation();
-            ASSERT(current || !downcast<RenderInline>(*previous).continuation());
-        } else 
-            current = downcast<RenderBlock>(*current).inlineElementContinuation();
</del><ins>+        current = current->inlineContinuation();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return previous;
</span><span class="lines">@@ -293,13 +282,13 @@
</span><span class="cx">                 current = current->nextSibling();
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            currentContainer = downcast<RenderInline>(*currentContainer).continuation();
</del><ins>+            currentContainer = currentContainer->continuation();
</ins><span class="cx">         } else if (is<RenderBlock>(*currentContainer)) {
</span><span class="cx">             if (currentContainer == child)
</span><span class="cx">                 return previous;
</span><span class="cx"> 
</span><span class="cx">             previous = currentContainer;
</span><del>-            currentContainer = downcast<RenderBlock>(*currentContainer).inlineElementContinuation();
</del><ins>+            currentContainer = currentContainer->inlineContinuation();
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -368,7 +357,7 @@
</span><span class="cx">     // Case 1: node is a block and has an inline continuation. Next sibling is the inline continuation's
</span><span class="cx">     // first child.
</span><span class="cx">     RenderInline* inlineContinuation;
</span><del>-    if (is<RenderBlock>(*m_renderer) && (inlineContinuation = downcast<RenderBlock>(*m_renderer).inlineElementContinuation()))
</del><ins>+    if (is<RenderBlock>(*m_renderer) && (inlineContinuation = downcast<RenderBlock>(*m_renderer).inlineContinuation()))
</ins><span class="cx">         nextSibling = firstChildConsideringContinuation(*inlineContinuation);
</span><span class="cx"> 
</span><span class="cx">     // Case 2: Anonymous block parent of the start of a continuation - skip all the way to
</span><span class="lines">@@ -426,7 +415,7 @@
</span><span class="cx">     if (is<RenderInline>(renderer) && !renderer.isReplaced())
</span><span class="cx">         return downcast<RenderInline>(renderer).continuation();
</span><span class="cx">     if (is<RenderBlock>(renderer))
</span><del>-        return downcast<RenderBlock>(renderer).inlineElementContinuation();
</del><ins>+        return downcast<RenderBlock>(renderer).inlineContinuation();
</ins><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (224599 => 224600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.cpp   2017-11-08 23:11:56 UTC (rev 224599)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp      2017-11-08 23:13:42 UTC (rev 224600)
</span><span class="lines">@@ -1697,7 +1697,7 @@
</span><span class="cx"> 
</span><span class="cx">     // 6. paint continuation outlines.
</span><span class="cx">     if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseChildOutlines)) {
</span><del>-        RenderInline* inlineCont = inlineElementContinuation();
</del><ins>+        RenderInline* inlineCont = inlineContinuation();
</ins><span class="cx">         if (inlineCont && inlineCont->hasOutline() && inlineCont->style().visibility() == VISIBLE) {
</span><span class="cx">             RenderInline* inlineRenderer = downcast<RenderInline>(inlineCont->element()->renderer());
</span><span class="cx">             RenderBlock* containingBlock = this->containingBlock();
</span><span class="lines">@@ -1730,12 +1730,6 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RenderInline* RenderBlock::inlineElementContinuation() const
-{ 
-    RenderBoxModelObject* continuation = this->continuation();
-    return is<RenderInline>(continuation) ? downcast<RenderInline>(continuation) : nullptr;
-}
-
</del><span class="cx"> static ContinuationOutlineTableMap* continuationOutlineTable()
</span><span class="cx"> {
</span><span class="cx">     static NeverDestroyed<ContinuationOutlineTableMap> table;
</span><span class="lines">@@ -3163,10 +3157,8 @@
</span><span class="cx">     if (auto* continuation = this->continuation()) {
</span><span class="cx">         // FIXME: This is wrong for block-flows that are horizontal.
</span><span class="cx">         // https://bugs.webkit.org/show_bug.cgi?id=46781
</span><del>-        rects.append(snappedIntRect(accumulatedOffset.x(), accumulatedOffset.y() - collapsedMarginBefore(),
-                                width(), height() + collapsedMarginBefore() + collapsedMarginAfter()));
-        continuation->absoluteRects(rects, accumulatedOffset - toLayoutSize(location() +
-                inlineElementContinuation()->containingBlock()->location()));
</del><ins>+        rects.append(snappedIntRect(accumulatedOffset.x(), accumulatedOffset.y() - collapsedMarginBefore(), width(), height() + collapsedMarginBefore() + collapsedMarginAfter()));
+        continuation->absoluteRects(rects, accumulatedOffset - toLayoutSize(location() + inlineContinuation()->containingBlock()->location()));
</ins><span class="cx">     } else
</span><span class="cx">         rects.append(snappedIntRect(accumulatedOffset, size()));
</span><span class="cx"> }
</span><span class="lines">@@ -3264,13 +3256,14 @@
</span><span class="cx"> {
</span><span class="cx">     // For blocks inside inlines, we include margins so that we run right up to the inline boxes
</span><span class="cx">     // above and below us (thus getting merged with them to form a single irregular shape).
</span><del>-    if (inlineElementContinuation()) {
</del><ins>+    auto* inlineContinuation = this->inlineContinuation();
+    if (inlineContinuation) {
</ins><span class="cx">         // FIXME: This check really isn't accurate. 
</span><del>-        bool nextInlineHasLineBox = inlineElementContinuation()->firstLineBox();
</del><ins>+        bool nextInlineHasLineBox = inlineContinuation->firstLineBox();
</ins><span class="cx">         // FIXME: This is wrong. The principal renderer may not be the continuation preceding this block.
</span><span class="cx">         // FIXME: This is wrong for block-flows that are horizontal.
</span><span class="cx">         // https://bugs.webkit.org/show_bug.cgi?id=46781
</span><del>-        bool prevInlineHasLineBox = downcast<RenderInline>(*inlineElementContinuation()->element()->renderer()).firstLineBox();
</del><ins>+        bool prevInlineHasLineBox = downcast<RenderInline>(*inlineContinuation->element()->renderer()).firstLineBox();
</ins><span class="cx">         float topMargin = prevInlineHasLineBox ? collapsedMarginBefore() : LayoutUnit();
</span><span class="cx">         float bottomMargin = nextInlineHasLineBox ? collapsedMarginAfter() : LayoutUnit();
</span><span class="cx">         LayoutRect rect(additionalOffset.x(), additionalOffset.y() - topMargin, width(), height() + topMargin + bottomMargin);
</span><span class="lines">@@ -3297,8 +3290,8 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (inlineElementContinuation())
-        inlineElementContinuation()->addFocusRingRects(rects, flooredLayoutPoint(LayoutPoint(additionalOffset + inlineElementContinuation()->containingBlock()->location() - location())), paintContainer);
</del><ins>+    if (inlineContinuation)
+        inlineContinuation->addFocusRingRects(rects, flooredLayoutPoint(LayoutPoint(additionalOffset + inlineContinuation->containingBlock()->location() - location())), paintContainer);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RenderPtr<RenderBlock> RenderBlock::createAnonymousBlockWithStyleAndDisplay(Document& document, const RenderStyle& style, EDisplay display)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.h (224599 => 224600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.h     2017-11-08 23:11:56 UTC (rev 224599)
+++ trunk/Source/WebCore/rendering/RenderBlock.h        2017-11-08 23:13:42 UTC (rev 224600)
</span><span class="lines">@@ -189,8 +189,6 @@
</span><span class="cx">     void addContinuationWithOutline(RenderInline*);
</span><span class="cx">     bool paintsContinuationOutline(RenderInline*);
</span><span class="cx"> 
</span><del>-    WEBCORE_EXPORT RenderInline* inlineElementContinuation() const;
-
</del><span class="cx">     static RenderPtr<RenderBlock> createAnonymousWithParentRendererAndDisplay(const RenderBox& parent, EDisplay = BLOCK);
</span><span class="cx">     RenderPtr<RenderBlock> createAnonymousBlock(EDisplay = BLOCK) const;
</span><span class="cx">     void dropAnonymousBoxChild(RenderBlock& child);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxModelObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (224599 => 224600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp  2017-11-08 23:11:56 UTC (rev 224599)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp     2017-11-08 23:13:42 UTC (rev 224600)
</span><span class="lines">@@ -279,7 +279,7 @@
</span><span class="cx">     if (!child->isAnonymousBlock() || !child->isInFlowPositioned())
</span><span class="cx">         return LayoutSize();
</span><span class="cx">     LayoutSize offset;
</span><del>-    for (RenderElement* parent = downcast<RenderBlock>(*child).inlineElementContinuation(); is<RenderInline>(parent); parent = parent->parent()) {
</del><ins>+    for (RenderElement* parent = downcast<RenderBlock>(*child).inlineContinuation(); is<RenderInline>(parent); parent = parent->parent()) {
</ins><span class="cx">         if (parent->isInFlowPositioned())
</span><span class="cx">             offset += downcast<RenderInline>(*parent).offsetForInFlowPosition();
</span><span class="cx">     }
</span><span class="lines">@@ -2507,6 +2507,19 @@
</span><span class="cx">     return continuationChainNode.next->renderer.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+RenderInline* RenderBoxModelObject::inlineContinuation() const
+{
+    if (!hasContinuationChainNode())
+        return nullptr;
+
+    for (auto* next = continuationChainNodeMap().get(this)->next; next; next = next->next) {
+        if (is<RenderInline>(*next->renderer))
+            return downcast<RenderInline>(next->renderer.get());
+    }
+    return nullptr;
+}
+
+
</ins><span class="cx"> void RenderBoxModelObject::insertIntoContinuationChainAfter(RenderBoxModelObject& afterRenderer)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(isContinuation());
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxModelObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.h (224599 => 224600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBoxModelObject.h    2017-11-08 23:11:56 UTC (rev 224599)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.h       2017-11-08 23:13:42 UTC (rev 224600)
</span><span class="lines">@@ -236,6 +236,7 @@
</span><span class="cx">     void suspendAnimations(double time = 0);
</span><span class="cx"> 
</span><span class="cx">     RenderBoxModelObject* continuation() const;
</span><ins>+    WEBCORE_EXPORT RenderInline* inlineContinuation() const;
</ins><span class="cx">     
</span><span class="cx">     void insertIntoContinuationChainAfter(RenderBoxModelObject&);
</span><span class="cx">     void removeFromContinuationChain();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderInlinecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (224599 => 224600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderInline.cpp  2017-11-08 23:11:56 UTC (rev 224599)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp     2017-11-08 23:13:42 UTC (rev 224600)
</span><span class="lines">@@ -113,18 +113,6 @@
</span><span class="cx">     RenderBoxModelObject::willBeDestroyed();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RenderInline* RenderInline::inlineElementContinuation() const
-{
-    RenderBoxModelObject* continuation = this->continuation();
-    if (!continuation)
-        return nullptr;
-
-    if (is<RenderInline>(*continuation))
-        return downcast<RenderInline>(continuation);
-
-    return is<RenderBlock>(*continuation) ? downcast<RenderBlock>(*continuation).inlineElementContinuation() : nullptr;
-}
-
</del><span class="cx"> void RenderInline::updateFromStyle()
</span><span class="cx"> {
</span><span class="cx">     RenderBoxModelObject::updateFromStyle();
</span><span class="lines">@@ -160,7 +148,7 @@
</span><span class="cx">         
</span><span class="cx">         // If we are no longer in-flow positioned but our descendant block(s) still have an in-flow positioned ancestor then
</span><span class="cx">         // their containing anonymous block should keep its in-flow positioning. 
</span><del>-        RenderInline* continuation = block.inlineElementContinuation();
</del><ins>+        RenderInline* continuation = block.inlineContinuation();
</ins><span class="cx">         if (oldStyle->hasInFlowPosition() && inFlowPositionedInlineAncestor(continuation))
</span><span class="cx">             continue;
</span><span class="cx">         auto blockStyle = RenderStyle::createAnonymousStyleWithDisplay(block.style(), BLOCK);
</span><span class="lines">@@ -192,9 +180,9 @@
</span><span class="cx">     // and after the block share the same style, but the block doesn't
</span><span class="cx">     // need to pass its style on to anyone else.
</span><span class="cx">     auto& newStyle = style();
</span><del>-    RenderInline* continuation = inlineElementContinuation();
</del><ins>+    RenderInline* continuation = inlineContinuation();
</ins><span class="cx">     if (continuation && !isContinuation()) {
</span><del>-        for (RenderInline* currCont = continuation; currCont; currCont = currCont->inlineElementContinuation())
</del><ins>+        for (RenderInline* currCont = continuation; currCont; currCont = currCont->inlineContinuation())
</ins><span class="cx">             currCont->setStyle(RenderStyle::clone(newStyle));
</span><span class="cx">         // If an inline's in-flow positioning has changed and it is part of an active continuation as a descendant of an anonymous containing block,
</span><span class="cx">         // then any descendant blocks will need to change their in-flow positioning accordingly.
</span><span class="lines">@@ -286,7 +274,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (is<RenderInline>(*renderer) && !renderer->isReplaced())
</span><span class="cx">         return downcast<RenderInline>(*renderer).continuation();
</span><del>-    return downcast<RenderBlock>(*renderer).inlineElementContinuation();
</del><ins>+    return downcast<RenderBlock>(*renderer).inlineContinuation();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RenderBoxModelObject* RenderInline::continuationBefore(RenderObject* beforeChild)
</span><span class="lines">@@ -929,7 +917,7 @@
</span><span class="cx">         RenderBlock* currentBlock = continuation->isInline() ? continuation->containingBlock() : downcast<RenderBlock>(continuation);
</span><span class="cx">         if (continuation->isInline() || continuation->firstChild())
</span><span class="cx">             return continuation->positionForPoint(parentBlockPoint - currentBlock->locationOffset(), fragment);
</span><del>-        continuation = downcast<RenderBlock>(*continuation).inlineElementContinuation();
</del><ins>+        continuation = continuation->inlineContinuation();
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     return RenderBoxModelObject::positionForPoint(point, fragment);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderInlineh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderInline.h (224599 => 224600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderInline.h    2017-11-08 23:11:56 UTC (rev 224599)
+++ trunk/Source/WebCore/rendering/RenderInline.h       2017-11-08 23:13:42 UTC (rev 224600)
</span><span class="lines">@@ -79,8 +79,6 @@
</span><span class="cx">     void absoluteQuadsForSelection(Vector<FloatQuad>& quads) const override;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    RenderInline* inlineElementContinuation() const;
-
</del><span class="cx">     void updateDragState(bool dragOn) final;
</span><span class="cx">     
</span><span class="cx">     LayoutSize offsetForInFlowPositionedInline(const RenderBox* child) const;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderinglineLineInlineHeadersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/line/LineInlineHeaders.h (224599 => 224600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/line/LineInlineHeaders.h  2017-11-08 23:11:56 UTC (rev 224599)
+++ trunk/Source/WebCore/rendering/line/LineInlineHeaders.h     2017-11-08 23:13:42 UTC (rev 224600)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx">     if (shouldApplyStartBorderPaddingOrMargin && (flow.borderStart() || flow.marginStart() || flow.paddingStart()))
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><del>-    bool shouldApplyEndBorderPaddingOrMargin = !flow.parent()->isAnonymousBlock() || flow.isContinuation() || !flow.inlineElementContinuation();
</del><ins>+    bool shouldApplyEndBorderPaddingOrMargin = !flow.parent()->isAnonymousBlock() || flow.isContinuation() || !flow.inlineContinuation();
</ins><span class="cx">     return shouldApplyEndBorderPaddingOrMargin && (flow.borderEnd() || flow.marginEnd() || flow.paddingEnd());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (224599 => 224600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2017-11-08 23:11:56 UTC (rev 224599)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm    2017-11-08 23:13:42 UTC (rev 224600)
</span><span class="lines">@@ -975,7 +975,7 @@
</span><span class="cx">         node = node->parentElement();
</span><span class="cx">     
</span><span class="cx">     auto* renderer = (node) ? node->renderer() : nullptr;
</span><del>-    return renderer && renderer->childrenInline() && (is<RenderBlock>(*renderer) && !downcast<RenderBlock>(*renderer).inlineElementContinuation()) && !renderer->isTable();
</del><ins>+    return renderer && renderer->childrenInline() && (is<RenderBlock>(*renderer) && !downcast<RenderBlock>(*renderer).inlineContinuation()) && !renderer->isTable();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static bool hasCustomLineHeight(Node& node)
</span><span class="lines">@@ -1037,7 +1037,7 @@
</span><span class="cx">     if (!renderer || renderer->style().userSelect() == SELECT_NONE)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    if (renderer->childrenInline() && (is<RenderBlock>(*renderer) && !downcast<RenderBlock>(*renderer).inlineElementContinuation()) && !renderer->isTable()) {
</del><ins>+    if (renderer->childrenInline() && (is<RenderBlock>(*renderer) && !downcast<RenderBlock>(*renderer).inlineContinuation()) && !renderer->isTable()) {
</ins><span class="cx">         range = enclosingTextUnitOfGranularity(position, WordGranularity, DirectionBackward);
</span><span class="cx">         if (range && !range->collapsed())
</span><span class="cx">             return range;
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacDOMDOMUIKitExtensionsmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/DOM/DOMUIKitExtensions.mm (224599 => 224600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/DOM/DOMUIKitExtensions.mm  2017-11-08 23:11:56 UTC (rev 224599)
+++ trunk/Source/WebKitLegacy/mac/DOM/DOMUIKitExtensions.mm     2017-11-08 23:13:42 UTC (rev 224600)
</span><span class="lines">@@ -199,7 +199,7 @@
</span><span class="cx">     RenderObject* renderer = core(self)->renderer();
</span><span class="cx">     return renderer
</span><span class="cx">         && renderer->childrenInline()
</span><del>-        && (is<RenderBlock>(*renderer) && !downcast<RenderBlock>(*renderer).inlineElementContinuation())
</del><ins>+        && (is<RenderBlock>(*renderer) && !downcast<RenderBlock>(*renderer).inlineContinuation())
</ins><span class="cx">         && !renderer->isTable();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -206,7 +206,7 @@
</span><span class="cx"> - (BOOL)isSelectableBlock
</span><span class="cx"> {
</span><span class="cx">     RenderObject* renderer = core(self)->renderer();
</span><del>-    return renderer && (is<RenderBlockFlow>(*renderer) || (is<RenderBlock>(*renderer) && downcast<RenderBlock>(*renderer).inlineElementContinuation() != nil));
</del><ins>+    return renderer && (is<RenderBlockFlow>(*renderer) || (is<RenderBlock>(*renderer) && downcast<RenderBlock>(*renderer).inlineContinuation() != nil));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (DOMRange *)rangeOfContainingParagraph
</span><span class="lines">@@ -271,7 +271,7 @@
</span><span class="cx">             result = INT_MAX;
</span><span class="cx">         } else if (!renderer->firstChildSlow()) {
</span><span class="cx">             result = 0;
</span><del>-        } else if (is<RenderBlockFlow>(*renderer) || (is<RenderBlock>(*renderer) && downcast<RenderBlock>(*renderer).inlineElementContinuation())) {
</del><ins>+        } else if (is<RenderBlockFlow>(*renderer) || (is<RenderBlock>(*renderer) && downcast<RenderBlock>(*renderer).inlineContinuation())) {
</ins><span class="cx">             BOOL noCost = NO;
</span><span class="cx">             if (is<RenderBox>(*renderer)) {
</span><span class="cx">                 RenderBox& asBox = renderer->enclosingBox();
</span></span></pre>
</div>
</div>

</body>
</html>