<!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>[198568] trunk/Source/WebCore</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/198568">198568</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2016-03-22 17:58:34 -0700 (Tue, 22 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use references instead of pointers for absolute positioning code
https://bugs.webkit.org/show_bug.cgi?id=155775

Reviewed by Simon Fraser.

There are many pointers which will never be null in this code. This patch
migrates them to use references.

No new tests because there is no behavior change.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
(WebCore::RenderBlockFlow::insertFloatingObject):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax):
(WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::computeLogicalWidthInRegionUsing):
(WebCore::RenderBox::computeInlineDirectionMargins):
(WebCore::RenderBox::renderBoxRegionInfo):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalWidthUsing):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeightUsing):
(WebCore::RenderBox::computeBlockDirectionMargins):
(WebCore::RenderBox::computeAndSetBlockDirectionMargins):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
(WebCore::computeInlineStaticDistance):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::computeLogicalLeftPositionedOffset):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
(WebCore::computeBlockStaticDistance):
(WebCore::RenderBox::computePositionedLogicalHeight):
(WebCore::computeLogicalTopPositionedOffset):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
(WebCore::RenderBox::computePositionedLogicalWidthReplaced):
(WebCore::RenderBox::computePositionedLogicalHeightReplaced):
(WebCore::percentageLogicalHeightIsResolvable):
(WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
(WebCore::RenderBox::hasDefiniteLogicalHeight):
(WebCore::RenderBox::hasUnsplittableScrollingOverflow):
* rendering/RenderBox.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
(WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::minSizeForChild):
(WebCore::RenderGrid::computeMarginLogicalHeightForChild):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::updateLogicalWidth):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockFlowcpp">trunk/Source/WebCore/rendering/RenderBlockFlow.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxh">trunk/Source/WebCore/rendering/RenderBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderDeprecatedFlexibleBoxcpp">trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderFlexibleBoxcpp">trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderGridcpp">trunk/Source/WebCore/rendering/RenderGrid.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTablecpp">trunk/Source/WebCore/rendering/RenderTable.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTableRowcpp">trunk/Source/WebCore/rendering/RenderTableRow.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (198567 => 198568)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-03-23 00:49:30 UTC (rev 198567)
+++ trunk/Source/WebCore/ChangeLog        2016-03-23 00:58:34 UTC (rev 198568)
</span><span class="lines">@@ -1,3 +1,65 @@
</span><ins>+2016-03-22  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        Use references instead of pointers for absolute positioning code
+        https://bugs.webkit.org/show_bug.cgi?id=155775
+
+        Reviewed by Simon Fraser.
+
+        There are many pointers which will never be null in this code. This patch
+        migrates them to use references.
+
+        No new tests because there is no behavior change.
+
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::layoutBlockChild):
+        (WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
+        (WebCore::RenderBlockFlow::insertFloatingObject):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax):
+        (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
+        (WebCore::RenderBox::computeLogicalWidthInRegion):
+        (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
+        (WebCore::RenderBox::computeInlineDirectionMargins):
+        (WebCore::RenderBox::renderBoxRegionInfo):
+        (WebCore::RenderBox::computeLogicalHeight):
+        (WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation):
+        (WebCore::RenderBox::computePercentageLogicalHeight):
+        (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
+        (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
+        (WebCore::RenderBox::availableLogicalHeightUsing):
+        (WebCore::RenderBox::computeBlockDirectionMargins):
+        (WebCore::RenderBox::computeAndSetBlockDirectionMargins):
+        (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
+        (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
+        (WebCore::computeInlineStaticDistance):
+        (WebCore::RenderBox::computePositionedLogicalWidth):
+        (WebCore::computeLogicalLeftPositionedOffset):
+        (WebCore::RenderBox::computePositionedLogicalWidthUsing):
+        (WebCore::computeBlockStaticDistance):
+        (WebCore::RenderBox::computePositionedLogicalHeight):
+        (WebCore::computeLogicalTopPositionedOffset):
+        (WebCore::RenderBox::computePositionedLogicalHeightUsing):
+        (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
+        (WebCore::RenderBox::computePositionedLogicalHeightReplaced):
+        (WebCore::percentageLogicalHeightIsResolvable):
+        (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
+        (WebCore::RenderBox::hasDefiniteLogicalHeight):
+        (WebCore::RenderBox::hasUnsplittableScrollingOverflow):
+        * rendering/RenderBox.h:
+        * rendering/RenderDeprecatedFlexibleBox.cpp:
+        (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
+        (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
+        * rendering/RenderFlexibleBox.cpp:
+        (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
+        (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
+        * rendering/RenderGrid.cpp:
+        (WebCore::RenderGrid::minSizeForChild):
+        (WebCore::RenderGrid::computeMarginLogicalHeightForChild):
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::updateLogicalWidth):
+        * rendering/RenderTableRow.cpp:
+        (WebCore::RenderTableRow::layout):
+
</ins><span class="cx"> 2016-03-22  Jon Davis  &lt;jond@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add Download Attribute to the Feature Status page
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockFlowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (198567 => 198568)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2016-03-23 00:49:30 UTC (rev 198567)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2016-03-23 00:58:34 UTC (rev 198568)
</span><span class="lines">@@ -655,7 +655,7 @@
</span><span class="cx">     LayoutUnit oldNegMarginBefore = maxNegativeMarginBefore();
</span><span class="cx"> 
</span><span class="cx">     // The child is a normal flow object. Compute the margins we will use for collapsing now.
</span><del>-    child.computeAndSetBlockDirectionMargins(this);
</del><ins>+    child.computeAndSetBlockDirectionMargins(*this);
</ins><span class="cx"> 
</span><span class="cx">     // Try to guess our correct logical top position. In most cases this guess will
</span><span class="cx">     // be correct. Only if we're wrong (when we compute the real logical top position)
</span><span class="lines">@@ -1235,7 +1235,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Make sure to update the block margins now for the grandchild box so that we're looking at current values.
</span><span class="cx">     if (grandchildBox-&gt;needsLayout()) {
</span><del>-        grandchildBox-&gt;computeAndSetBlockDirectionMargins(this);
</del><ins>+        grandchildBox-&gt;computeAndSetBlockDirectionMargins(*this);
</ins><span class="cx">         if (is&lt;RenderBlock&gt;(*grandchildBox)) {
</span><span class="cx">             RenderBlock&amp; grandchildBlock = downcast&lt;RenderBlock&gt;(*grandchildBox);
</span><span class="cx">             grandchildBlock.setHasMarginBeforeQuirk(grandchildBox-&gt;style().hasMarginBeforeQuirk());
</span><span class="lines">@@ -2277,7 +2277,7 @@
</span><span class="cx">     }
</span><span class="cx">     else {
</span><span class="cx">         floatBox.updateLogicalWidth();
</span><del>-        floatBox.computeAndSetBlockDirectionMargins(this);
</del><ins>+        floatBox.computeAndSetBlockDirectionMargins(*this);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     setLogicalWidthForFloat(*floatingObject, logicalWidthForChild(floatBox) + marginStartForChild(floatBox) + marginEndForChild(floatBox));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (198567 => 198568)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp        2016-03-23 00:49:30 UTC (rev 198567)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2016-03-23 00:58:34 UTC (rev 198568)
</span><span class="lines">@@ -650,7 +650,7 @@
</span><span class="cx">         layer()-&gt;updateTransform();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutUnit RenderBox::constrainLogicalWidthInRegionByMinMax(LayoutUnit logicalWidth, LayoutUnit availableWidth, RenderBlock* cb, RenderRegion* region) const
</del><ins>+LayoutUnit RenderBox::constrainLogicalWidthInRegionByMinMax(LayoutUnit logicalWidth, LayoutUnit availableWidth, RenderBlock&amp; cb, RenderRegion* region) const
</ins><span class="cx"> {
</span><span class="cx">     const RenderStyle&amp; styleToUse = style();
</span><span class="cx">     if (!styleToUse.logicalMaxWidth().isUndefined())
</span><span class="lines">@@ -1859,18 +1859,18 @@
</span><span class="cx">     return clipRect;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutUnit RenderBox::shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, LayoutUnit childMarginEnd, const RenderBlock* cb, RenderRegion* region) const
</del><ins>+LayoutUnit RenderBox::shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, LayoutUnit childMarginEnd, const RenderBlock&amp; cb, RenderRegion* region) const
</ins><span class="cx"> {    
</span><span class="cx">     RenderRegion* containingBlockRegion = nullptr;
</span><span class="cx">     LayoutUnit logicalTopPosition = logicalTop();
</span><span class="cx">     if (region) {
</span><span class="cx">         LayoutUnit offsetFromLogicalTopOfRegion = region ? region-&gt;logicalTopForFlowThreadContent() - offsetFromLogicalTopOfFirstPage() : LayoutUnit();
</span><span class="cx">         logicalTopPosition = std::max(logicalTopPosition, logicalTopPosition + offsetFromLogicalTopOfRegion);
</span><del>-        containingBlockRegion = cb-&gt;clampToStartAndEndRegions(region);
</del><ins>+        containingBlockRegion = cb.clampToStartAndEndRegions(region);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    LayoutUnit logicalHeight = cb-&gt;logicalHeightForChild(*this);
-    LayoutUnit result = cb-&gt;availableLogicalWidthForLineInRegion(logicalTopPosition, DoNotIndentText, containingBlockRegion, logicalHeight) - childMarginStart - childMarginEnd;
</del><ins>+    LayoutUnit logicalHeight = cb.logicalHeightForChild(*this);
+    LayoutUnit result = cb.availableLogicalWidthForLineInRegion(logicalTopPosition, DoNotIndentText, containingBlockRegion, logicalHeight) - childMarginStart - childMarginEnd;
</ins><span class="cx"> 
</span><span class="cx">     // We need to see if margins on either the start side or the end side can contain the floats in question. If they can,
</span><span class="cx">     // then just using the line width is inaccurate. In the case where a float completely fits, we don't need to use the line
</span><span class="lines">@@ -1878,9 +1878,9 @@
</span><span class="cx">     // doesn't fit, we can use the line offset, but we need to grow it by the margin to reflect the fact that the margin was
</span><span class="cx">     // &quot;consumed&quot; by the float. Negative margins aren't consumed by the float, and so we ignore them.
</span><span class="cx">     if (childMarginStart &gt; 0) {
</span><del>-        LayoutUnit startContentSide = cb-&gt;startOffsetForContent(containingBlockRegion);
</del><ins>+        LayoutUnit startContentSide = cb.startOffsetForContent(containingBlockRegion);
</ins><span class="cx">         LayoutUnit startContentSideWithMargin = startContentSide + childMarginStart;
</span><del>-        LayoutUnit startOffset = cb-&gt;startOffsetForLineInRegion(logicalTopPosition, DoNotIndentText, containingBlockRegion, logicalHeight);
</del><ins>+        LayoutUnit startOffset = cb.startOffsetForLineInRegion(logicalTopPosition, DoNotIndentText, containingBlockRegion, logicalHeight);
</ins><span class="cx">         if (startOffset &gt; startContentSideWithMargin)
</span><span class="cx">             result += childMarginStart;
</span><span class="cx">         else
</span><span class="lines">@@ -1888,9 +1888,9 @@
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     if (childMarginEnd &gt; 0) {
</span><del>-        LayoutUnit endContentSide = cb-&gt;endOffsetForContent(containingBlockRegion);
</del><ins>+        LayoutUnit endContentSide = cb.endOffsetForContent(containingBlockRegion);
</ins><span class="cx">         LayoutUnit endContentSideWithMargin = endContentSide + childMarginEnd;
</span><del>-        LayoutUnit endOffset = cb-&gt;endOffsetForLineInRegion(logicalTopPosition, DoNotIndentText, containingBlockRegion, logicalHeight);
</del><ins>+        LayoutUnit endOffset = cb.endOffsetForLineInRegion(logicalTopPosition, DoNotIndentText, containingBlockRegion, logicalHeight);
</ins><span class="cx">         if (endOffset &gt; endContentSideWithMargin)
</span><span class="cx">             result += childMarginEnd;
</span><span class="cx">         else
</span><span class="lines">@@ -2385,9 +2385,9 @@
</span><span class="cx">     const RenderStyle&amp; styleToUse = style();
</span><span class="cx">     Length logicalWidthLength = treatAsReplaced ? Length(computeReplacedLogicalWidth(), Fixed) : styleToUse.logicalWidth();
</span><span class="cx"> 
</span><del>-    RenderBlock* cb = containingBlock();
</del><ins>+    RenderBlock&amp; cb = *containingBlock();
</ins><span class="cx">     LayoutUnit containerLogicalWidth = std::max&lt;LayoutUnit&gt;(0, containingBlockLogicalWidthForContentInRegion(region));
</span><del>-    bool hasPerpendicularContainingBlock = cb-&gt;isHorizontalWritingMode() != isHorizontalWritingMode();
</del><ins>+    bool hasPerpendicularContainingBlock = cb.isHorizontalWritingMode() != isHorizontalWritingMode();
</ins><span class="cx"> 
</span><span class="cx">     if (isInline() &amp;&amp; !isInlineBlockOrInlineTable()) {
</span><span class="cx">         // just calculate margins
</span><span class="lines">@@ -2421,22 +2421,22 @@
</span><span class="cx">         computedValues.m_margins.m_end = minimumValueForLength(styleToUse.marginEnd(), containerLogicalWidth);
</span><span class="cx">     } else {
</span><span class="cx">         LayoutUnit containerLogicalWidthForAutoMargins = containerLogicalWidth;
</span><del>-        if (avoidsFloats() &amp;&amp; cb-&gt;containsFloats())
</del><ins>+        if (avoidsFloats() &amp;&amp; cb.containsFloats())
</ins><span class="cx">             containerLogicalWidthForAutoMargins = containingBlockAvailableLineWidthInRegion(region);
</span><del>-        bool hasInvertedDirection = cb-&gt;style().isLeftToRightDirection() != style().isLeftToRightDirection();
</del><ins>+        bool hasInvertedDirection = cb.style().isLeftToRightDirection() != style().isLeftToRightDirection();
</ins><span class="cx">         computeInlineDirectionMargins(cb, containerLogicalWidthForAutoMargins, computedValues.m_extent,
</span><span class="cx">             hasInvertedDirection ? computedValues.m_margins.m_end : computedValues.m_margins.m_start,
</span><span class="cx">             hasInvertedDirection ? computedValues.m_margins.m_start : computedValues.m_margins.m_end);
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     if (!hasPerpendicularContainingBlock &amp;&amp; containerLogicalWidth &amp;&amp; containerLogicalWidth != (computedValues.m_extent + computedValues.m_margins.m_start + computedValues.m_margins.m_end)
</span><del>-        &amp;&amp; !isFloating() &amp;&amp; !isInline() &amp;&amp; !cb-&gt;isFlexibleBoxIncludingDeprecated()
</del><ins>+        &amp;&amp; !isFloating() &amp;&amp; !isInline() &amp;&amp; !cb.isFlexibleBoxIncludingDeprecated()
</ins><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><del>-        &amp;&amp; !cb-&gt;isRenderGrid()
</del><ins>+        &amp;&amp; !cb.isRenderGrid()
</ins><span class="cx"> #endif
</span><span class="cx">         ) {
</span><del>-        LayoutUnit newMargin = containerLogicalWidth - computedValues.m_extent - cb-&gt;marginStartForChild(*this);
-        bool hasInvertedDirection = cb-&gt;style().isLeftToRightDirection() != style().isLeftToRightDirection();
</del><ins>+        LayoutUnit newMargin = containerLogicalWidth - computedValues.m_extent - cb.marginStartForChild(*this);
+        bool hasInvertedDirection = cb.style().isLeftToRightDirection() != style().isLeftToRightDirection();
</ins><span class="cx">         if (hasInvertedDirection)
</span><span class="cx">             computedValues.m_margins.m_start = newMargin;
</span><span class="cx">         else
</span><span class="lines">@@ -2484,7 +2484,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> LayoutUnit RenderBox::computeLogicalWidthInRegionUsing(SizeType widthType, Length logicalWidth, LayoutUnit availableLogicalWidth,
</span><del>-    const RenderBlock* cb, RenderRegion* region) const
</del><ins>+    const RenderBlock&amp; cb, RenderRegion* region) const
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(widthType == MinSize || widthType == MainOrPreferredSize || !logicalWidth.isAuto());
</span><span class="cx">     if (widthType == MinSize &amp;&amp; logicalWidth.isAuto())
</span><span class="lines">@@ -2502,7 +2502,7 @@
</span><span class="cx">     LayoutUnit marginEnd = 0;
</span><span class="cx">     LayoutUnit logicalWidthResult = fillAvailableMeasure(availableLogicalWidth, marginStart, marginEnd);
</span><span class="cx"> 
</span><del>-    if (shrinkToAvoidFloats() &amp;&amp; cb-&gt;containsFloats())
</del><ins>+    if (shrinkToAvoidFloats() &amp;&amp; cb.containsFloats())
</ins><span class="cx">         logicalWidthResult = std::min(logicalWidthResult, shrinkLogicalWidthToAvoidFloats(marginStart, marginEnd, cb, region));
</span><span class="cx"> 
</span><span class="cx">     if (widthType == MainOrPreferredSize &amp;&amp; sizesLogicalWidthToFitContent(widthType))
</span><span class="lines">@@ -2609,9 +2609,9 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderBox::computeInlineDirectionMargins(RenderBlock* containingBlock, LayoutUnit containerWidth, LayoutUnit childWidth, LayoutUnit&amp; marginStart, LayoutUnit&amp; marginEnd) const
</del><ins>+void RenderBox::computeInlineDirectionMargins(RenderBlock&amp; containingBlock, LayoutUnit containerWidth, LayoutUnit childWidth, LayoutUnit&amp; marginStart, LayoutUnit&amp; marginEnd) const
</ins><span class="cx"> {
</span><del>-    const RenderStyle&amp; containingBlockStyle = containingBlock-&gt;style();
</del><ins>+    const RenderStyle&amp; containingBlockStyle = containingBlock.style();
</ins><span class="cx">     Length marginStartLength = style().marginStartUsing(&amp;containingBlockStyle);
</span><span class="cx">     Length marginEndLength = style().marginEndUsing(&amp;containingBlockStyle);
</span><span class="cx"> 
</span><span class="lines">@@ -2624,7 +2624,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Case One: The object is being centered in the containing block's available logical width.
</span><span class="cx">     if ((marginStartLength.isAuto() &amp;&amp; marginEndLength.isAuto() &amp;&amp; childWidth &lt; containerWidth)
</span><del>-        || (!marginStartLength.isAuto() &amp;&amp; !marginEndLength.isAuto() &amp;&amp; containingBlock-&gt;style().textAlign() == WEBKIT_CENTER)) {
</del><ins>+        || (!marginStartLength.isAuto() &amp;&amp; !marginEndLength.isAuto() &amp;&amp; containingBlock.style().textAlign() == WEBKIT_CENTER)) {
</ins><span class="cx">         // Other browsers center the margin box for align=center elements so we match them here.
</span><span class="cx">         LayoutUnit marginStartWidth = minimumValueForLength(marginStartLength, containerWidth);
</span><span class="cx">         LayoutUnit marginEndWidth = minimumValueForLength(marginEndLength, containerWidth);
</span><span class="lines">@@ -2679,10 +2679,10 @@
</span><span class="cx">     computeLogicalWidthInRegion(computedValues, region);
</span><span class="cx"> 
</span><span class="cx">     // Now determine the insets based off where this object is supposed to be positioned.
</span><del>-    RenderBlock* cb = containingBlock();
-    RenderRegion* clampedContainingBlockRegion = cb-&gt;clampToStartAndEndRegions(region);
-    RenderBoxRegionInfo* containingBlockInfo = cb-&gt;renderBoxRegionInfo(clampedContainingBlockRegion);
-    LayoutUnit containingBlockLogicalWidth = cb-&gt;logicalWidth();
</del><ins>+    RenderBlock&amp; cb = *containingBlock();
+    RenderRegion* clampedContainingBlockRegion = cb.clampToStartAndEndRegions(region);
+    RenderBoxRegionInfo* containingBlockInfo = cb.renderBoxRegionInfo(clampedContainingBlockRegion);
+    LayoutUnit containingBlockLogicalWidth = cb.logicalWidth();
</ins><span class="cx">     LayoutUnit containingBlockLogicalWidthInRegion = containingBlockInfo ? containingBlockInfo-&gt;logicalWidth() : containingBlockLogicalWidth;
</span><span class="cx">     
</span><span class="cx">     LayoutUnit marginStartInRegion = computedValues.m_margins.m_start;
</span><span class="lines">@@ -2697,15 +2697,15 @@
</span><span class="cx"> 
</span><span class="cx">     LayoutUnit logicalLeftOffset = 0;
</span><span class="cx">     
</span><del>-    if (!isOutOfFlowPositioned() &amp;&amp; avoidsFloats() &amp;&amp; cb-&gt;containsFloats()) {
-        LayoutUnit startPositionDelta = cb-&gt;computeStartPositionDeltaForChildAvoidingFloats(*this, marginStartInRegion, region);
-        if (cb-&gt;style().isLeftToRightDirection())
</del><ins>+    if (!isOutOfFlowPositioned() &amp;&amp; avoidsFloats() &amp;&amp; cb.containsFloats()) {
+        LayoutUnit startPositionDelta = cb.computeStartPositionDeltaForChildAvoidingFloats(*this, marginStartInRegion, region);
+        if (cb.style().isLeftToRightDirection())
</ins><span class="cx">             logicalLeftDelta += startPositionDelta;
</span><span class="cx">         else
</span><span class="cx">             logicalRightDelta += startPositionDelta;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (cb-&gt;style().isLeftToRightDirection())
</del><ins>+    if (cb.style().isLeftToRightDirection())
</ins><span class="cx">         logicalLeftOffset += logicalLeftDelta;
</span><span class="cx">     else
</span><span class="cx">         logicalLeftOffset -= (widthDelta + logicalRightDelta);
</span><span class="lines">@@ -2771,11 +2771,11 @@
</span><span class="cx">     if (isOutOfFlowPositioned())
</span><span class="cx">         computePositionedLogicalHeight(computedValues);
</span><span class="cx">     else {
</span><del>-        RenderBlock* cb = containingBlock();
-        bool hasPerpendicularContainingBlock = cb-&gt;isHorizontalWritingMode() != isHorizontalWritingMode();
</del><ins>+        RenderBlock&amp; cb = *containingBlock();
+        bool hasPerpendicularContainingBlock = cb.isHorizontalWritingMode() != isHorizontalWritingMode();
</ins><span class="cx">     
</span><span class="cx">         if (!hasPerpendicularContainingBlock) {
</span><del>-            bool shouldFlipBeforeAfter = cb-&gt;style().writingMode() != style().writingMode();
</del><ins>+            bool shouldFlipBeforeAfter = cb.style().writingMode() != style().writingMode();
</ins><span class="cx">             computeBlockDirectionMargins(cb,
</span><span class="cx">                 shouldFlipBeforeAfter ? computedValues.m_margins.m_after : computedValues.m_margins.m_before,
</span><span class="cx">                 shouldFlipBeforeAfter ? computedValues.m_margins.m_before : computedValues.m_margins.m_after);
</span><span class="lines">@@ -2784,7 +2784,7 @@
</span><span class="cx">         // For tables, calculate margins only.
</span><span class="cx">         if (isTable()) {
</span><span class="cx">             if (hasPerpendicularContainingBlock) {
</span><del>-                bool shouldFlipBeforeAfter = shouldFlipBeforeAfterMargins(cb-&gt;style(), &amp;style());
</del><ins>+                bool shouldFlipBeforeAfter = shouldFlipBeforeAfterMargins(cb.style(), &amp;style());
</ins><span class="cx">                 computeInlineDirectionMargins(cb, containingBlockLogicalWidthForContent(), computedValues.m_extent,
</span><span class="cx">                     shouldFlipBeforeAfter ? computedValues.m_margins.m_after : computedValues.m_margins.m_before,
</span><span class="cx">                     shouldFlipBeforeAfter ? computedValues.m_margins.m_before : computedValues.m_margins.m_after);
</span><span class="lines">@@ -2849,7 +2849,7 @@
</span><span class="cx">         computedValues.m_extent = heightResult;
</span><span class="cx"> 
</span><span class="cx">         if (hasPerpendicularContainingBlock) {
</span><del>-            bool shouldFlipBeforeAfter = shouldFlipBeforeAfterMargins(cb-&gt;style(), &amp;style());
</del><ins>+            bool shouldFlipBeforeAfter = shouldFlipBeforeAfterMargins(cb.style(), &amp;style());
</ins><span class="cx">             computeInlineDirectionMargins(cb, containingBlockLogicalWidthForContent(), heightResult,
</span><span class="cx">                     shouldFlipBeforeAfter ? computedValues.m_margins.m_after : computedValues.m_margins.m_before,
</span><span class="cx">                     shouldFlipBeforeAfter ? computedValues.m_margins.m_before : computedValues.m_margins.m_after);
</span><span class="lines">@@ -2916,18 +2916,18 @@
</span><span class="cx">     return Nullopt;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool RenderBox::skipContainingBlockForPercentHeightCalculation(const RenderBox* containingBlock, bool isPerpendicularWritingMode) const
</del><ins>+bool RenderBox::skipContainingBlockForPercentHeightCalculation(const RenderBox&amp; containingBlock, bool isPerpendicularWritingMode) const
</ins><span class="cx"> {
</span><span class="cx">     // Flow threads for multicol or paged overflow should be skipped. They are invisible to the DOM,
</span><span class="cx">     // and percent heights of children should be resolved against the multicol or paged container.
</span><del>-    if (containingBlock-&gt;isInFlowRenderFlowThread() &amp;&amp; !isPerpendicularWritingMode)
</del><ins>+    if (containingBlock.isInFlowRenderFlowThread() &amp;&amp; !isPerpendicularWritingMode)
</ins><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="cx">     // For quirks mode and anonymous blocks, we skip auto-height containingBlocks when computing percentages.
</span><span class="cx">     // For standards mode, we treat the percentage as auto if it has an auto-height containing block.
</span><del>-    if (!document().inQuirksMode() &amp;&amp; !containingBlock-&gt;isAnonymousBlock())
</del><ins>+    if (!document().inQuirksMode() &amp;&amp; !containingBlock.isAnonymousBlock())
</ins><span class="cx">         return false;
</span><del>-    return !containingBlock-&gt;isTableCell() &amp;&amp; !containingBlock-&gt;isOutOfFlowPositioned() &amp;&amp; containingBlock-&gt;style().logicalHeight().isAuto() &amp;&amp; isHorizontalWritingMode() == containingBlock-&gt;isHorizontalWritingMode();
</del><ins>+    return !containingBlock.isTableCell() &amp;&amp; !containingBlock.isOutOfFlowPositioned() &amp;&amp; containingBlock.style().logicalHeight().isAuto() &amp;&amp; isHorizontalWritingMode() == containingBlock.isHorizontalWritingMode();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static bool tableCellShouldHaveZeroInitialSize(const RenderBlock&amp; block, bool scrollsOverflowY)
</span><span class="lines">@@ -2952,7 +2952,7 @@
</span><span class="cx">     const RenderBox* containingBlockChild = this;
</span><span class="cx">     LayoutUnit rootMarginBorderPaddingHeight = 0;
</span><span class="cx">     bool isHorizontal = isHorizontalWritingMode();
</span><del>-    while (cb &amp;&amp; !is&lt;RenderView&gt;(*cb) &amp;&amp; skipContainingBlockForPercentHeightCalculation(cb, isHorizontal != cb-&gt;isHorizontalWritingMode())) {
</del><ins>+    while (cb &amp;&amp; !is&lt;RenderView&gt;(*cb) &amp;&amp; skipContainingBlockForPercentHeightCalculation(*cb, isHorizontal != cb-&gt;isHorizontalWritingMode())) {
</ins><span class="cx">         if (cb-&gt;isBody() || cb-&gt;isDocumentElementRenderer())
</span><span class="cx">             rootMarginBorderPaddingHeight += cb-&gt;marginBefore() + cb-&gt;marginAfter() + cb-&gt;borderAndPaddingLogicalHeight();
</span><span class="cx">         skippedAutoHeightContainingBlock = true;
</span><span class="lines">@@ -3058,7 +3058,7 @@
</span><span class="cx">             // FIXME: containingBlockLogicalWidthForContent() is wrong if the replaced element's block-flow is perpendicular to the
</span><span class="cx">             // containing block's block-flow.
</span><span class="cx">             // https://bugs.webkit.org/show_bug.cgi?id=46496
</span><del>-            const LayoutUnit cw = isOutOfFlowPositioned() ? containingBlockLogicalWidthForPositioned(downcast&lt;RenderBoxModelObject&gt;(container())) : containingBlockLogicalWidthForContent();
</del><ins>+            const LayoutUnit cw = isOutOfFlowPositioned() ? containingBlockLogicalWidthForPositioned(downcast&lt;RenderBoxModelObject&gt;(*container())) : containingBlockLogicalWidthForContent();
</ins><span class="cx">             Length containerLogicalWidth = containingBlock()-&gt;style().logicalWidth();
</span><span class="cx">             // FIXME: Handle cases when containing block width is calculated or viewport percent.
</span><span class="cx">             // https://bugs.webkit.org/show_bug.cgi?id=91071
</span><span class="lines">@@ -3127,7 +3127,7 @@
</span><span class="cx">             // https://bugs.webkit.org/show_bug.cgi?id=46496
</span><span class="cx">             LayoutUnit availableHeight;
</span><span class="cx">             if (isOutOfFlowPositioned())
</span><del>-                availableHeight = containingBlockLogicalHeightForPositioned(downcast&lt;RenderBoxModelObject&gt;(cb));
</del><ins>+                availableHeight = containingBlockLogicalHeightForPositioned(downcast&lt;RenderBoxModelObject&gt;(*cb));
</ins><span class="cx">             else {
</span><span class="cx">                 availableHeight = containingBlockLogicalHeightForContent(IncludeMarginBorderPadding);
</span><span class="cx">                 // It is necessary to use the border-box to match WinIE's broken
</span><span class="lines">@@ -3176,7 +3176,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (h.isPercentOrCalculated() &amp;&amp; isOutOfFlowPositioned() &amp;&amp; !isRenderFlowThread()) {
</span><span class="cx">         // FIXME: This is wrong if the containingBlock has a perpendicular writing mode.
</span><del>-        LayoutUnit availableHeight = containingBlockLogicalHeightForPositioned(containingBlock());
</del><ins>+        LayoutUnit availableHeight = containingBlockLogicalHeightForPositioned(*containingBlock());
</ins><span class="cx">         return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(h, availableHeight));
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -3202,7 +3202,7 @@
</span><span class="cx">     return availableHeight;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderBox::computeBlockDirectionMargins(const RenderBlock* containingBlock, LayoutUnit&amp; marginBefore, LayoutUnit&amp; marginAfter) const
</del><ins>+void RenderBox::computeBlockDirectionMargins(const RenderBlock&amp; containingBlock, LayoutUnit&amp; marginBefore, LayoutUnit&amp; marginAfter) const
</ins><span class="cx"> {
</span><span class="cx">     if (isTableCell()) {
</span><span class="cx">         // FIXME: Not right if we allow cells to have different directionality than the table.  If we do allow this, though,
</span><span class="lines">@@ -3215,23 +3215,23 @@
</span><span class="cx">     // Margins are calculated with respect to the logical width of
</span><span class="cx">     // the containing block (8.3)
</span><span class="cx">     LayoutUnit cw = containingBlockLogicalWidthForContent();
</span><del>-    const RenderStyle&amp; containingBlockStyle = containingBlock-&gt;style();
</del><ins>+    const RenderStyle&amp; containingBlockStyle = containingBlock.style();
</ins><span class="cx">     marginBefore = minimumValueForLength(style().marginBeforeUsing(&amp;containingBlockStyle), cw);
</span><span class="cx">     marginAfter = minimumValueForLength(style().marginAfterUsing(&amp;containingBlockStyle), cw);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderBox::computeAndSetBlockDirectionMargins(const RenderBlock* containingBlock)
</del><ins>+void RenderBox::computeAndSetBlockDirectionMargins(const RenderBlock&amp; containingBlock)
</ins><span class="cx"> {
</span><span class="cx">     LayoutUnit marginBefore;
</span><span class="cx">     LayoutUnit marginAfter;
</span><span class="cx">     computeBlockDirectionMargins(containingBlock, marginBefore, marginAfter);
</span><del>-    containingBlock-&gt;setMarginBeforeForChild(*this, marginBefore);
-    containingBlock-&gt;setMarginAfterForChild(*this, marginAfter);
</del><ins>+    containingBlock.setMarginBeforeForChild(*this, marginBefore);
+    containingBlock.setMarginAfterForChild(*this, marginAfter);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutUnit RenderBox::containingBlockLogicalWidthForPositioned(const RenderBoxModelObject* containingBlock, RenderRegion* region, bool checkForPerpendicularWritingMode) const
</del><ins>+LayoutUnit RenderBox::containingBlockLogicalWidthForPositioned(const RenderBoxModelObject&amp; containingBlock, RenderRegion* region, bool checkForPerpendicularWritingMode) const
</ins><span class="cx"> {
</span><del>-    if (checkForPerpendicularWritingMode &amp;&amp; containingBlock-&gt;isHorizontalWritingMode() != isHorizontalWritingMode())
</del><ins>+    if (checkForPerpendicularWritingMode &amp;&amp; containingBlock.isHorizontalWritingMode() != isHorizontalWritingMode())
</ins><span class="cx">         return containingBlockLogicalHeightForPositioned(containingBlock, false);
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><span class="lines">@@ -3241,44 +3241,44 @@
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    if (is&lt;RenderBox&gt;(*containingBlock)) {
</del><ins>+    if (is&lt;RenderBox&gt;(containingBlock)) {
</ins><span class="cx">         bool isFixedPosition = style().position() == FixedPosition;
</span><span class="cx"> 
</span><span class="cx">         RenderFlowThread* flowThread = flowThreadContainingBlock();
</span><span class="cx">         if (!flowThread) {
</span><del>-            if (isFixedPosition &amp;&amp; is&lt;RenderView&gt;(*containingBlock))
-                return downcast&lt;RenderView&gt;(*containingBlock).clientLogicalWidthForFixedPosition();
</del><ins>+            if (isFixedPosition &amp;&amp; is&lt;RenderView&gt;(containingBlock))
+                return downcast&lt;RenderView&gt;(containingBlock).clientLogicalWidthForFixedPosition();
</ins><span class="cx"> 
</span><del>-            return downcast&lt;RenderBox&gt;(*containingBlock).clientLogicalWidth();
</del><ins>+            return downcast&lt;RenderBox&gt;(containingBlock).clientLogicalWidth();
</ins><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (isFixedPosition &amp;&amp; is&lt;RenderNamedFlowThread&gt;(*containingBlock))
-            return containingBlock-&gt;view().clientLogicalWidth();
</del><ins>+        if (isFixedPosition &amp;&amp; is&lt;RenderNamedFlowThread&gt;(containingBlock))
+            return containingBlock.view().clientLogicalWidth();
</ins><span class="cx"> 
</span><del>-        if (!is&lt;RenderBlock&gt;(*containingBlock))
-            return downcast&lt;RenderBox&gt;(*containingBlock).clientLogicalWidth();
</del><ins>+        if (!is&lt;RenderBlock&gt;(containingBlock))
+            return downcast&lt;RenderBox&gt;(containingBlock).clientLogicalWidth();
</ins><span class="cx"> 
</span><del>-        const RenderBlock&amp; cb = downcast&lt;RenderBlock&gt;(*containingBlock);
</del><ins>+        const RenderBlock&amp; cb = downcast&lt;RenderBlock&gt;(containingBlock);
</ins><span class="cx">         RenderBoxRegionInfo* boxInfo = nullptr;
</span><span class="cx">         if (!region) {
</span><del>-            if (is&lt;RenderFlowThread&gt;(*containingBlock) &amp;&amp; !checkForPerpendicularWritingMode)
-                return downcast&lt;RenderFlowThread&gt;(*containingBlock).contentLogicalWidthOfFirstRegion();
</del><ins>+            if (is&lt;RenderFlowThread&gt;(containingBlock) &amp;&amp; !checkForPerpendicularWritingMode)
+                return downcast&lt;RenderFlowThread&gt;(containingBlock).contentLogicalWidthOfFirstRegion();
</ins><span class="cx">             if (isWritingModeRoot()) {
</span><span class="cx">                 LayoutUnit cbPageOffset = cb.offsetFromLogicalTopOfFirstPage();
</span><span class="cx">                 RenderRegion* cbRegion = cb.regionAtBlockOffset(cbPageOffset);
</span><span class="cx">                 if (cbRegion)
</span><span class="cx">                     boxInfo = cb.renderBoxRegionInfo(cbRegion);
</span><span class="cx">             }
</span><del>-        } else if (flowThread-&gt;isHorizontalWritingMode() == containingBlock-&gt;isHorizontalWritingMode()) {
</del><ins>+        } else if (flowThread-&gt;isHorizontalWritingMode() == containingBlock.isHorizontalWritingMode()) {
</ins><span class="cx">             RenderRegion* containingBlockRegion = cb.clampToStartAndEndRegions(region);
</span><span class="cx">             boxInfo = cb.renderBoxRegionInfo(containingBlockRegion);
</span><span class="cx">         }
</span><span class="cx">         return (boxInfo) ? std::max&lt;LayoutUnit&gt;(0, cb.clientLogicalWidth() - (cb.logicalWidth() - boxInfo-&gt;logicalWidth())) : cb.clientLogicalWidth();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    ASSERT(containingBlock-&gt;isInFlowPositioned());
</del><ins>+    ASSERT(containingBlock.isInFlowPositioned());
</ins><span class="cx"> 
</span><del>-    const auto&amp; flow = downcast&lt;RenderInline&gt;(*containingBlock);
</del><ins>+    const auto&amp; flow = downcast&lt;RenderInline&gt;(containingBlock);
</ins><span class="cx">     InlineFlowBox* first = flow.firstLineBox();
</span><span class="cx">     InlineFlowBox* last = flow.lastLineBox();
</span><span class="cx"> 
</span><span class="lines">@@ -3288,7 +3288,7 @@
</span><span class="cx"> 
</span><span class="cx">     LayoutUnit fromLeft;
</span><span class="cx">     LayoutUnit fromRight;
</span><del>-    if (containingBlock-&gt;style().isLeftToRightDirection()) {
</del><ins>+    if (containingBlock.style().isLeftToRightDirection()) {
</ins><span class="cx">         fromLeft = first-&gt;logicalLeft() + first-&gt;borderLogicalLeft();
</span><span class="cx">         fromRight = last-&gt;logicalLeft() + last-&gt;logicalWidth() - last-&gt;borderLogicalRight();
</span><span class="cx">     } else {
</span><span class="lines">@@ -3299,9 +3299,9 @@
</span><span class="cx">     return std::max&lt;LayoutUnit&gt;(0, fromRight - fromLeft);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutUnit RenderBox::containingBlockLogicalHeightForPositioned(const RenderBoxModelObject* containingBlock, bool checkForPerpendicularWritingMode) const
</del><ins>+LayoutUnit RenderBox::containingBlockLogicalHeightForPositioned(const RenderBoxModelObject&amp; containingBlock, bool checkForPerpendicularWritingMode) const
</ins><span class="cx"> {
</span><del>-    if (checkForPerpendicularWritingMode &amp;&amp; containingBlock-&gt;isHorizontalWritingMode() != isHorizontalWritingMode())
</del><ins>+    if (checkForPerpendicularWritingMode &amp;&amp; containingBlock.isHorizontalWritingMode() != isHorizontalWritingMode())
</ins><span class="cx">         return containingBlockLogicalWidthForPositioned(containingBlock, nullptr, false);
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><span class="lines">@@ -3311,26 +3311,26 @@
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    if (containingBlock-&gt;isBox()) {
</del><ins>+    if (containingBlock.isBox()) {
</ins><span class="cx">         bool isFixedPosition = style().position() == FixedPosition;
</span><span class="cx"> 
</span><del>-        if (isFixedPosition &amp;&amp; is&lt;RenderView&gt;(*containingBlock))
-            return downcast&lt;RenderView&gt;(*containingBlock).clientLogicalHeightForFixedPosition();
</del><ins>+        if (isFixedPosition &amp;&amp; is&lt;RenderView&gt;(containingBlock))
+            return downcast&lt;RenderView&gt;(containingBlock).clientLogicalHeightForFixedPosition();
</ins><span class="cx"> 
</span><del>-        const RenderBlock* cb = is&lt;RenderBlock&gt;(*containingBlock) ? downcast&lt;RenderBlock&gt;(containingBlock) : containingBlock-&gt;containingBlock();
-        LayoutUnit result = cb-&gt;clientLogicalHeight();
</del><ins>+        const RenderBlock&amp; cb = is&lt;RenderBlock&gt;(containingBlock) ? downcast&lt;RenderBlock&gt;(containingBlock) : *containingBlock.containingBlock();
+        LayoutUnit result = cb.clientLogicalHeight();
</ins><span class="cx">         RenderFlowThread* flowThread = flowThreadContainingBlock();
</span><del>-        if (flowThread &amp;&amp; is&lt;RenderFlowThread&gt;(*containingBlock) &amp;&amp; flowThread-&gt;isHorizontalWritingMode() == containingBlock-&gt;isHorizontalWritingMode()) {
-            if (is&lt;RenderNamedFlowThread&gt;(*containingBlock) &amp;&amp; isFixedPosition)
-                return containingBlock-&gt;view().clientLogicalHeight();
-            return downcast&lt;RenderFlowThread&gt;(*containingBlock).contentLogicalHeightOfFirstRegion();
</del><ins>+        if (flowThread &amp;&amp; is&lt;RenderFlowThread&gt;(containingBlock) &amp;&amp; flowThread-&gt;isHorizontalWritingMode() == containingBlock.isHorizontalWritingMode()) {
+            if (is&lt;RenderNamedFlowThread&gt;(containingBlock) &amp;&amp; isFixedPosition)
+                return containingBlock.view().clientLogicalHeight();
+            return downcast&lt;RenderFlowThread&gt;(containingBlock).contentLogicalHeightOfFirstRegion();
</ins><span class="cx">         }
</span><span class="cx">         return result;
</span><span class="cx">     }
</span><span class="cx">         
</span><del>-    ASSERT(containingBlock-&gt;isInFlowPositioned());
</del><ins>+    ASSERT(containingBlock.isInFlowPositioned());
</ins><span class="cx"> 
</span><del>-    const auto&amp; flow = downcast&lt;RenderInline&gt;(*containingBlock);
</del><ins>+    const auto&amp; flow = downcast&lt;RenderInline&gt;(containingBlock);
</ins><span class="cx">     InlineFlowBox* first = flow.firstLineBox();
</span><span class="cx">     InlineFlowBox* last = flow.lastLineBox();
</span><span class="cx"> 
</span><span class="lines">@@ -3340,23 +3340,23 @@
</span><span class="cx"> 
</span><span class="cx">     LayoutUnit heightResult;
</span><span class="cx">     LayoutRect boundingBox = flow.linesBoundingBox();
</span><del>-    if (containingBlock-&gt;isHorizontalWritingMode())
</del><ins>+    if (containingBlock.isHorizontalWritingMode())
</ins><span class="cx">         heightResult = boundingBox.height();
</span><span class="cx">     else
</span><span class="cx">         heightResult = boundingBox.width();
</span><del>-    heightResult -= (containingBlock-&gt;borderBefore() + containingBlock-&gt;borderAfter());
</del><ins>+    heightResult -= (containingBlock.borderBefore() + containingBlock.borderAfter());
</ins><span class="cx">     return heightResult;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void computeInlineStaticDistance(Length&amp; logicalLeft, Length&amp; logicalRight, const RenderBox* child, const RenderBoxModelObject* containerBlock, LayoutUnit containerLogicalWidth, RenderRegion* region)
</del><ins>+static void computeInlineStaticDistance(Length&amp; logicalLeft, Length&amp; logicalRight, const RenderBox* child, const RenderBoxModelObject&amp; containerBlock, LayoutUnit containerLogicalWidth, RenderRegion* region)
</ins><span class="cx"> {
</span><span class="cx">     if (!logicalLeft.isAuto() || !logicalRight.isAuto())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // FIXME: The static distance computation has not been patched for mixed writing modes yet.
</span><span class="cx">     if (child-&gt;parent()-&gt;style().direction() == LTR) {
</span><del>-        LayoutUnit staticPosition = child-&gt;layer()-&gt;staticInlinePosition() - containerBlock-&gt;borderLogicalLeft();
-        for (auto* current = child-&gt;parent(); current &amp;&amp; current != containerBlock; current = current-&gt;container()) {
</del><ins>+        LayoutUnit staticPosition = child-&gt;layer()-&gt;staticInlinePosition() - containerBlock.borderLogicalLeft();
+        for (auto* current = child-&gt;parent(); current &amp;&amp; current != &amp;containerBlock; current = current-&gt;container()) {
</ins><span class="cx">             if (!is&lt;RenderBox&gt;(*current))
</span><span class="cx">                 continue;
</span><span class="cx">             const auto&amp; renderBox = downcast&lt;RenderBox&gt;(*current);
</span><span class="lines">@@ -3374,10 +3374,10 @@
</span><span class="cx">         logicalLeft.setValue(Fixed, staticPosition);
</span><span class="cx">     } else {
</span><span class="cx">         const RenderBox&amp; enclosingBox = child-&gt;parent()-&gt;enclosingBox();
</span><del>-        LayoutUnit staticPosition = child-&gt;layer()-&gt;staticInlinePosition() + containerLogicalWidth + containerBlock-&gt;borderLogicalLeft();
</del><ins>+        LayoutUnit staticPosition = child-&gt;layer()-&gt;staticInlinePosition() + containerLogicalWidth + containerBlock.borderLogicalLeft();
</ins><span class="cx">         for (const RenderElement* current = &amp;enclosingBox; current; current = current-&gt;container()) {
</span><span class="cx">             if (is&lt;RenderBox&gt;(*current)) {
</span><del>-                if (current != containerBlock) {
</del><ins>+                if (current != &amp;containerBlock) {
</ins><span class="cx">                     const auto&amp; renderBox = downcast&lt;RenderBox&gt;(*current);
</span><span class="cx">                     staticPosition -= renderBox.logicalLeft();
</span><span class="cx">                     if (renderBox.isInFlowPositioned())
</span><span class="lines">@@ -3390,14 +3390,14 @@
</span><span class="cx">                     region = currentBlock.clampToStartAndEndRegions(region);
</span><span class="cx">                     RenderBoxRegionInfo* boxInfo = currentBlock.renderBoxRegionInfo(region);
</span><span class="cx">                     if (boxInfo) {
</span><del>-                        if (current != containerBlock)
</del><ins>+                        if (current != &amp;containerBlock)
</ins><span class="cx">                             staticPosition -= currentBlock.logicalWidth() - (boxInfo-&gt;logicalLeft() + boxInfo-&gt;logicalWidth());
</span><span class="cx">                         if (current == &amp;enclosingBox)
</span><span class="cx">                             staticPosition += enclosingBox.logicalWidth() - boxInfo-&gt;logicalWidth();
</span><span class="cx">                     }
</span><span class="cx">                 }
</span><span class="cx">             }
</span><del>-            if (current == containerBlock)
</del><ins>+            if (current == &amp;containerBlock)
</ins><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="cx">         logicalRight.setValue(Fixed, staticPosition);
</span><span class="lines">@@ -3431,14 +3431,14 @@
</span><span class="cx"> 
</span><span class="cx">     // We don't use containingBlock(), since we may be positioned by an enclosing
</span><span class="cx">     // relative positioned inline.
</span><del>-    const RenderBoxModelObject* containerBlock = downcast&lt;RenderBoxModelObject&gt;(container());
</del><ins>+    const RenderBoxModelObject&amp; containerBlock = downcast&lt;RenderBoxModelObject&gt;(*container());
</ins><span class="cx">     
</span><span class="cx">     const LayoutUnit containerLogicalWidth = containingBlockLogicalWidthForPositioned(containerBlock, region);
</span><span class="cx"> 
</span><span class="cx">     // Use the container block's direction except when calculating the static distance
</span><span class="cx">     // This conforms with the reference results for abspos-replaced-width-margin-000.htm
</span><span class="cx">     // of the CSS 2.1 test suite
</span><del>-    TextDirection containerDirection = containerBlock-&gt;style().direction();
</del><ins>+    TextDirection containerDirection = containerBlock.style().direction();
</ins><span class="cx"> 
</span><span class="cx">     bool isHorizontal = isHorizontalWritingMode();
</span><span class="cx">     const LayoutUnit bordersPlusPadding = borderAndPaddingLogicalWidth();
</span><span class="lines">@@ -3522,8 +3522,8 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     computedValues.m_extent += bordersPlusPadding;
</span><del>-    if (is&lt;RenderBox&gt;(*containerBlock)) {
-        auto&amp; containingBox = downcast&lt;RenderBox&gt;(*containerBlock);
</del><ins>+    if (is&lt;RenderBox&gt;(containerBlock)) {
+        auto&amp; containingBox = downcast&lt;RenderBox&gt;(containerBlock);
</ins><span class="cx">         if (containingBox.layer() &amp;&amp; containingBox.layer()-&gt;verticalScrollbarIsOnLeft())
</span><span class="cx">             computedValues.m_position += containingBox.verticalScrollbarWidth();
</span><span class="cx">     }
</span><span class="lines">@@ -3531,10 +3531,10 @@
</span><span class="cx">     // Adjust logicalLeft if we need to for the flipped version of our writing mode in regions.
</span><span class="cx">     // FIXME: Add support for other types of objects as containerBlock, not only RenderBlock.
</span><span class="cx">     RenderFlowThread* flowThread = flowThreadContainingBlock();
</span><del>-    if (flowThread &amp;&amp; !region &amp;&amp; isWritingModeRoot() &amp;&amp; isHorizontalWritingMode() == containerBlock-&gt;isHorizontalWritingMode() &amp;&amp; is&lt;RenderBlock&gt;(*containerBlock)) {
-        ASSERT(containerBlock-&gt;canHaveBoxInfoInRegion());
</del><ins>+    if (flowThread &amp;&amp; !region &amp;&amp; isWritingModeRoot() &amp;&amp; isHorizontalWritingMode() == containerBlock.isHorizontalWritingMode() &amp;&amp; is&lt;RenderBlock&gt;(containerBlock)) {
+        ASSERT(containerBlock.canHaveBoxInfoInRegion());
</ins><span class="cx">         LayoutUnit logicalLeftPos = computedValues.m_position;
</span><del>-        const RenderBlock&amp; renderBlock = downcast&lt;RenderBlock&gt;(*containerBlock);
</del><ins>+        const RenderBlock&amp; renderBlock = downcast&lt;RenderBlock&gt;(containerBlock);
</ins><span class="cx">         LayoutUnit cbPageOffset = renderBlock.offsetFromLogicalTopOfFirstPage();
</span><span class="cx">         RenderRegion* cbRegion = renderBlock.regionAtBlockOffset(cbPageOffset);
</span><span class="cx">         if (cbRegion) {
</span><span class="lines">@@ -3547,18 +3547,18 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void computeLogicalLeftPositionedOffset(LayoutUnit&amp; logicalLeftPos, const RenderBox* child, LayoutUnit logicalWidthValue, const RenderBoxModelObject* containerBlock, LayoutUnit containerLogicalWidth)
</del><ins>+static void computeLogicalLeftPositionedOffset(LayoutUnit&amp; logicalLeftPos, const RenderBox* child, LayoutUnit logicalWidthValue, const RenderBoxModelObject&amp; containerBlock, LayoutUnit containerLogicalWidth)
</ins><span class="cx"> {
</span><span class="cx">     // Deal with differing writing modes here.  Our offset needs to be in the containing block's coordinate space. If the containing block is flipped
</span><span class="cx">     // along this axis, then we need to flip the coordinate.  This can only happen if the containing block is both a flipped mode and perpendicular to us.
</span><del>-    if (containerBlock-&gt;isHorizontalWritingMode() != child-&gt;isHorizontalWritingMode() &amp;&amp; containerBlock-&gt;style().isFlippedBlocksWritingMode()) {
</del><ins>+    if (containerBlock.isHorizontalWritingMode() != child-&gt;isHorizontalWritingMode() &amp;&amp; containerBlock.style().isFlippedBlocksWritingMode()) {
</ins><span class="cx">         logicalLeftPos = containerLogicalWidth - logicalWidthValue - logicalLeftPos;
</span><del>-        logicalLeftPos += (child-&gt;isHorizontalWritingMode() ? containerBlock-&gt;borderRight() : containerBlock-&gt;borderBottom());
</del><ins>+        logicalLeftPos += (child-&gt;isHorizontalWritingMode() ? containerBlock.borderRight() : containerBlock.borderBottom());
</ins><span class="cx">     } else
</span><del>-        logicalLeftPos += (child-&gt;isHorizontalWritingMode() ? containerBlock-&gt;borderLeft() : containerBlock-&gt;borderTop());
</del><ins>+        logicalLeftPos += (child-&gt;isHorizontalWritingMode() ? containerBlock.borderLeft() : containerBlock.borderTop());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderBox::computePositionedLogicalWidthUsing(SizeType widthType, Length logicalWidth, const RenderBoxModelObject* containerBlock, TextDirection containerDirection,
</del><ins>+void RenderBox::computePositionedLogicalWidthUsing(SizeType widthType, Length logicalWidth, const RenderBoxModelObject&amp; containerBlock, TextDirection containerDirection,
</ins><span class="cx">                                                    LayoutUnit containerLogicalWidth, LayoutUnit bordersPlusPadding,
</span><span class="cx">                                                    Length logicalLeft, Length logicalRight, Length marginLogicalLeft, Length marginLogicalRight,
</span><span class="cx">                                                    LogicalExtentComputedValues&amp; computedValues) const
</span><span class="lines">@@ -3729,8 +3729,8 @@
</span><span class="cx">     // positioned, inline because right now, it is using the logical left position
</span><span class="cx">     // of the first line box when really it should use the last line box.  When
</span><span class="cx">     // this is fixed elsewhere, this block should be removed.
</span><del>-    if (is&lt;RenderInline&gt;(*containerBlock) &amp;&amp; !containerBlock-&gt;style().isLeftToRightDirection()) {
-        const auto&amp; flow = downcast&lt;RenderInline&gt;(*containerBlock);
</del><ins>+    if (is&lt;RenderInline&gt;(containerBlock) &amp;&amp; !containerBlock.style().isLeftToRightDirection()) {
+        const auto&amp; flow = downcast&lt;RenderInline&gt;(containerBlock);
</ins><span class="cx">         InlineFlowBox* firstLine = flow.firstLineBox();
</span><span class="cx">         InlineFlowBox* lastLine = flow.lastLineBox();
</span><span class="cx">         if (firstLine &amp;&amp; lastLine &amp;&amp; firstLine != lastLine) {
</span><span class="lines">@@ -3743,14 +3743,14 @@
</span><span class="cx">     computeLogicalLeftPositionedOffset(computedValues.m_position, this, computedValues.m_extent, containerBlock, containerLogicalWidth);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void computeBlockStaticDistance(Length&amp; logicalTop, Length&amp; logicalBottom, const RenderBox* child, const RenderBoxModelObject* containerBlock)
</del><ins>+static void computeBlockStaticDistance(Length&amp; logicalTop, Length&amp; logicalBottom, const RenderBox* child, const RenderBoxModelObject&amp; containerBlock)
</ins><span class="cx"> {
</span><span class="cx">     if (!logicalTop.isAuto() || !logicalBottom.isAuto())
</span><span class="cx">         return;
</span><span class="cx">     
</span><span class="cx">     // FIXME: The static distance computation has not been patched for mixed writing modes.
</span><del>-    LayoutUnit staticLogicalTop = child-&gt;layer()-&gt;staticBlockPosition() - containerBlock-&gt;borderBefore();
-    for (RenderElement* container = child-&gt;parent(); container &amp;&amp; container != containerBlock; container = container-&gt;container()) {
</del><ins>+    LayoutUnit staticLogicalTop = child-&gt;layer()-&gt;staticBlockPosition() - containerBlock.borderBefore();
+    for (RenderElement* container = child-&gt;parent(); container &amp;&amp; container != &amp;containerBlock; container = container-&gt;container()) {
</ins><span class="cx">         if (!is&lt;RenderBox&gt;(*container))
</span><span class="cx">             continue;
</span><span class="cx">         const auto&amp; renderBox = downcast&lt;RenderBox&gt;(*container);
</span><span class="lines">@@ -3777,7 +3777,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     // We don't use containingBlock(), since we may be positioned by an enclosing relpositioned inline.
</span><del>-    const RenderBoxModelObject* containerBlock = downcast&lt;RenderBoxModelObject&gt;(container());
</del><ins>+    const RenderBoxModelObject&amp; containerBlock = downcast&lt;RenderBoxModelObject&gt;(*container());
</ins><span class="cx"> 
</span><span class="cx">     const LayoutUnit containerLogicalHeight = containingBlockLogicalHeightForPositioned(containerBlock);
</span><span class="cx"> 
</span><span class="lines">@@ -3861,10 +3861,10 @@
</span><span class="cx">     // Adjust logicalTop if we need to for perpendicular writing modes in regions.
</span><span class="cx">     // FIXME: Add support for other types of objects as containerBlock, not only RenderBlock.
</span><span class="cx">     RenderFlowThread* flowThread = flowThreadContainingBlock();
</span><del>-    if (flowThread &amp;&amp; isHorizontalWritingMode() != containerBlock-&gt;isHorizontalWritingMode() &amp;&amp; is&lt;RenderBlock&gt;(*containerBlock)) {
-        ASSERT(containerBlock-&gt;canHaveBoxInfoInRegion());
</del><ins>+    if (flowThread &amp;&amp; isHorizontalWritingMode() != containerBlock.isHorizontalWritingMode() &amp;&amp; is&lt;RenderBlock&gt;(containerBlock)) {
+        ASSERT(containerBlock.canHaveBoxInfoInRegion());
</ins><span class="cx">         LayoutUnit logicalTopPos = computedValues.m_position;
</span><del>-        const RenderBlock&amp; renderBox = downcast&lt;RenderBlock&gt;(*containerBlock);
</del><ins>+        const RenderBlock&amp; renderBox = downcast&lt;RenderBlock&gt;(containerBlock);
</ins><span class="cx">         LayoutUnit cbPageOffset = renderBox.offsetFromLogicalTopOfFirstPage() - logicalLeft();
</span><span class="cx">         RenderRegion* cbRegion = renderBox.regionAtBlockOffset(cbPageOffset);
</span><span class="cx">         if (cbRegion) {
</span><span class="lines">@@ -3877,29 +3877,29 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void computeLogicalTopPositionedOffset(LayoutUnit&amp; logicalTopPos, const RenderBox* child, LayoutUnit logicalHeightValue, const RenderBoxModelObject* containerBlock, LayoutUnit containerLogicalHeight)
</del><ins>+static void computeLogicalTopPositionedOffset(LayoutUnit&amp; logicalTopPos, const RenderBox* child, LayoutUnit logicalHeightValue, const RenderBoxModelObject&amp; containerBlock, LayoutUnit containerLogicalHeight)
</ins><span class="cx"> {
</span><span class="cx">     // Deal with differing writing modes here.  Our offset needs to be in the containing block's coordinate space. If the containing block is flipped
</span><span class="cx">     // along this axis, then we need to flip the coordinate.  This can only happen if the containing block is both a flipped mode and perpendicular to us.
</span><del>-    if ((child-&gt;style().isFlippedBlocksWritingMode() &amp;&amp; child-&gt;isHorizontalWritingMode() != containerBlock-&gt;isHorizontalWritingMode())
-        || (child-&gt;style().isFlippedBlocksWritingMode() != containerBlock-&gt;style().isFlippedBlocksWritingMode() &amp;&amp; child-&gt;isHorizontalWritingMode() == containerBlock-&gt;isHorizontalWritingMode()))
</del><ins>+    if ((child-&gt;style().isFlippedBlocksWritingMode() &amp;&amp; child-&gt;isHorizontalWritingMode() != containerBlock.isHorizontalWritingMode())
+        || (child-&gt;style().isFlippedBlocksWritingMode() != containerBlock.style().isFlippedBlocksWritingMode() &amp;&amp; child-&gt;isHorizontalWritingMode() == containerBlock.isHorizontalWritingMode()))
</ins><span class="cx">         logicalTopPos = containerLogicalHeight - logicalHeightValue - logicalTopPos;
</span><span class="cx"> 
</span><span class="cx">     // Our offset is from the logical bottom edge in a flipped environment, e.g., right for vertical-rl and bottom for horizontal-bt.
</span><del>-    if (containerBlock-&gt;style().isFlippedBlocksWritingMode() &amp;&amp; child-&gt;isHorizontalWritingMode() == containerBlock-&gt;isHorizontalWritingMode()) {
</del><ins>+    if (containerBlock.style().isFlippedBlocksWritingMode() &amp;&amp; child-&gt;isHorizontalWritingMode() == containerBlock.isHorizontalWritingMode()) {
</ins><span class="cx">         if (child-&gt;isHorizontalWritingMode())
</span><del>-            logicalTopPos += containerBlock-&gt;borderBottom();
</del><ins>+            logicalTopPos += containerBlock.borderBottom();
</ins><span class="cx">         else
</span><del>-            logicalTopPos += containerBlock-&gt;borderRight();
</del><ins>+            logicalTopPos += containerBlock.borderRight();
</ins><span class="cx">     } else {
</span><span class="cx">         if (child-&gt;isHorizontalWritingMode())
</span><del>-            logicalTopPos += containerBlock-&gt;borderTop();
</del><ins>+            logicalTopPos += containerBlock.borderTop();
</ins><span class="cx">         else
</span><del>-            logicalTopPos += containerBlock-&gt;borderLeft();
</del><ins>+            logicalTopPos += containerBlock.borderLeft();
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderBox::computePositionedLogicalHeightUsing(SizeType heightType, Length logicalHeightLength, const RenderBoxModelObject* containerBlock,
</del><ins>+void RenderBox::computePositionedLogicalHeightUsing(SizeType heightType, Length logicalHeightLength, const RenderBoxModelObject&amp; containerBlock,
</ins><span class="cx">                                                     LayoutUnit containerLogicalHeight, LayoutUnit bordersPlusPadding, LayoutUnit logicalHeight,
</span><span class="cx">                                                     Length logicalTop, Length logicalBottom, Length marginBefore, Length marginAfter,
</span><span class="cx">                                                     LogicalExtentComputedValues&amp; computedValues) const
</span><span class="lines">@@ -4043,14 +4043,14 @@
</span><span class="cx"> 
</span><span class="cx">     // We don't use containingBlock(), since we may be positioned by an enclosing
</span><span class="cx">     // relative positioned inline.
</span><del>-    const RenderBoxModelObject* containerBlock = downcast&lt;RenderBoxModelObject&gt;(container());
</del><ins>+    const RenderBoxModelObject&amp; containerBlock = downcast&lt;RenderBoxModelObject&gt;(*container());
</ins><span class="cx"> 
</span><span class="cx">     const LayoutUnit containerLogicalWidth = containingBlockLogicalWidthForPositioned(containerBlock);
</span><span class="cx">     const LayoutUnit containerRelativeLogicalWidth = containingBlockLogicalWidthForPositioned(containerBlock, nullptr, false);
</span><span class="cx"> 
</span><span class="cx">     // To match WinIE, in quirks mode use the parent's 'direction' property
</span><span class="cx">     // instead of the the container block's.
</span><del>-    TextDirection containerDirection = containerBlock-&gt;style().direction();
</del><ins>+    TextDirection containerDirection = containerBlock.style().direction();
</ins><span class="cx"> 
</span><span class="cx">     // Variables to solve.
</span><span class="cx">     bool isHorizontal = isHorizontalWritingMode();
</span><span class="lines">@@ -4187,8 +4187,8 @@
</span><span class="cx">     // positioned, inline containing block because right now, it is using the logical left position
</span><span class="cx">     // of the first line box when really it should use the last line box.  When
</span><span class="cx">     // this is fixed elsewhere, this block should be removed.
</span><del>-    if (is&lt;RenderInline&gt;(*containerBlock) &amp;&amp; !containerBlock-&gt;style().isLeftToRightDirection()) {
-        const auto&amp; flow = downcast&lt;RenderInline&gt;(*containerBlock);
</del><ins>+    if (is&lt;RenderInline&gt;(containerBlock) &amp;&amp; !containerBlock.style().isLeftToRightDirection()) {
+        const auto&amp; flow = downcast&lt;RenderInline&gt;(containerBlock);
</ins><span class="cx">         InlineFlowBox* firstLine = flow.firstLineBox();
</span><span class="cx">         InlineFlowBox* lastLine = flow.lastLineBox();
</span><span class="cx">         if (firstLine &amp;&amp; lastLine &amp;&amp; firstLine != lastLine) {
</span><span class="lines">@@ -4211,7 +4211,7 @@
</span><span class="cx">     // the numbers correspond to numbers in spec)
</span><span class="cx"> 
</span><span class="cx">     // We don't use containingBlock(), since we may be positioned by an enclosing relpositioned inline.
</span><del>-    const RenderBoxModelObject* containerBlock = downcast&lt;RenderBoxModelObject&gt;(container());
</del><ins>+    const RenderBoxModelObject&amp; containerBlock = downcast&lt;RenderBoxModelObject&gt;(*container());
</ins><span class="cx"> 
</span><span class="cx">     const LayoutUnit containerLogicalHeight = containingBlockLogicalHeightForPositioned(containerBlock);
</span><span class="cx">     const LayoutUnit containerRelativeLogicalWidth = containingBlockLogicalWidthForPositioned(containerBlock, nullptr, false);
</span><span class="lines">@@ -4674,19 +4674,19 @@
</span><span class="cx">     return logicalWidthIsResolvable(*this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline static bool percentageLogicalHeightIsResolvable(const RenderBox* box)
</del><ins>+inline static bool percentageLogicalHeightIsResolvable(const RenderBox&amp; box)
</ins><span class="cx"> {
</span><del>-    return RenderBox::percentageLogicalHeightIsResolvableFromBlock(box-&gt;containingBlock(), box-&gt;isOutOfFlowPositioned(), box-&gt;scrollsOverflowY());
</del><ins>+    return RenderBox::percentageLogicalHeightIsResolvableFromBlock(*box.containingBlock(), box.isOutOfFlowPositioned(), box.scrollsOverflowY());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool RenderBox::percentageLogicalHeightIsResolvableFromBlock(const RenderBlock* containingBlock, bool isOutOfFlowPositioned, bool scrollsOverflowY)
</del><ins>+bool RenderBox::percentageLogicalHeightIsResolvableFromBlock(const RenderBlock&amp; containingBlock, bool isOutOfFlowPositioned, bool scrollsOverflowY)
</ins><span class="cx"> {
</span><span class="cx">     // In quirks mode, blocks with auto height are skipped, and we keep looking for an enclosing
</span><span class="cx">     // block that may have a specified height and then use it. In strict mode, this violates the
</span><span class="cx">     // specification, which states that percentage heights just revert to auto if the containing
</span><span class="cx">     // block has an auto height. We still skip anonymous containing blocks in both modes, though, and look
</span><span class="cx">     // only at explicit containers.
</span><del>-    const RenderBlock* cb = containingBlock;
</del><ins>+    const RenderBlock* cb = &amp;containingBlock;
</ins><span class="cx">     bool inQuirksMode = cb-&gt;document().inQuirksMode();
</span><span class="cx">     bool skippedAutoHeightContainingBlock = false;
</span><span class="cx">     while (cb &amp;&amp; !is&lt;RenderView&gt;(*cb) &amp;&amp; !cb-&gt;isBody() &amp;&amp; !cb-&gt;isTableCell() &amp;&amp; !cb-&gt;isOutOfFlowPositioned() &amp;&amp; cb-&gt;style().logicalHeight().isAuto()) {
</span><span class="lines">@@ -4719,7 +4719,7 @@
</span><span class="cx">     if (cb-&gt;style().logicalHeight().isFixed())
</span><span class="cx">         return true;
</span><span class="cx">     if (cb-&gt;style().logicalHeight().isPercentOrCalculated() &amp;&amp; !isOutOfFlowPositionedWithSpecifiedHeight)
</span><del>-        return percentageLogicalHeightIsResolvableFromBlock(cb-&gt;containingBlock(), cb-&gt;isOutOfFlowPositioned(), cb-&gt;scrollsOverflowY());
</del><ins>+        return percentageLogicalHeightIsResolvableFromBlock(*cb-&gt;containingBlock(), cb-&gt;isOutOfFlowPositioned(), cb-&gt;scrollsOverflowY());
</ins><span class="cx">     if (cb-&gt;isRenderView() || inQuirksMode || isOutOfFlowPositionedWithSpecifiedHeight)
</span><span class="cx">         return true;
</span><span class="cx">     if (cb-&gt;isDocumentElementRenderer() &amp;&amp; isOutOfFlowPositioned) {
</span><span class="lines">@@ -4747,7 +4747,7 @@
</span><span class="cx">     if (logicalHeight.isIntrinsicOrAuto())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    return percentageLogicalHeightIsResolvable(this);
</del><ins>+    return percentageLogicalHeightIsResolvable(*this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool RenderBox::hasUnsplittableScrollingOverflow() const
</span><span class="lines">@@ -4763,8 +4763,8 @@
</span><span class="cx">     // conditions, but it should work out to be good enough for common cases. Paginating overflow
</span><span class="cx">     // with scrollbars present is not the end of the world and is what we used to do in the old model anyway.
</span><span class="cx">     return !style().logicalHeight().isIntrinsicOrAuto()
</span><del>-        || (!style().logicalMaxHeight().isIntrinsicOrAuto() &amp;&amp; !style().logicalMaxHeight().isUndefined() &amp;&amp; (!style().logicalMaxHeight().isPercentOrCalculated() || percentageLogicalHeightIsResolvable(this)))
-        || (!style().logicalMinHeight().isIntrinsicOrAuto() &amp;&amp; style().logicalMinHeight().isPositive() &amp;&amp; (!style().logicalMinHeight().isPercentOrCalculated() || percentageLogicalHeightIsResolvable(this)));
</del><ins>+        || (!style().logicalMaxHeight().isIntrinsicOrAuto() &amp;&amp; !style().logicalMaxHeight().isUndefined() &amp;&amp; (!style().logicalMaxHeight().isPercentOrCalculated() || percentageLogicalHeightIsResolvable(*this)))
+        || (!style().logicalMinHeight().isIntrinsicOrAuto() &amp;&amp; style().logicalMinHeight().isPositive() &amp;&amp; (!style().logicalMinHeight().isPercentOrCalculated() || percentageLogicalHeightIsResolvable(*this)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool RenderBox::isUnsplittableForPagination() const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.h (198567 => 198568)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.h        2016-03-23 00:49:30 UTC (rev 198567)
+++ trunk/Source/WebCore/rendering/RenderBox.h        2016-03-23 00:58:34 UTC (rev 198568)
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx">     LayoutUnit logicalWidth() const { return style().isHorizontalWritingMode() ? width() : height(); }
</span><span class="cx">     LayoutUnit logicalHeight() const { return style().isHorizontalWritingMode() ? height() : width(); }
</span><span class="cx"> 
</span><del>-    LayoutUnit constrainLogicalWidthInRegionByMinMax(LayoutUnit, LayoutUnit, RenderBlock*, RenderRegion* = nullptr) const;
</del><ins>+    LayoutUnit constrainLogicalWidthInRegionByMinMax(LayoutUnit, LayoutUnit, RenderBlock&amp;, RenderRegion* = nullptr) const;
</ins><span class="cx">     LayoutUnit constrainLogicalHeightByMinMax(LayoutUnit logicalHeight, Optional&lt;LayoutUnit&gt; intrinsicContentHeight) const;
</span><span class="cx">     LayoutUnit constrainContentBoxLogicalHeightByMinMax(LayoutUnit logicalHeight, Optional&lt;LayoutUnit&gt; intrinsicContentHeight) const;
</span><span class="cx"> 
</span><span class="lines">@@ -366,11 +366,11 @@
</span><span class="cx">     };
</span><span class="cx">     // Resolve auto margins in the inline direction of the containing block so that objects can be pushed to the start, middle or end
</span><span class="cx">     // of the containing block.
</span><del>-    void computeInlineDirectionMargins(RenderBlock* containingBlock, LayoutUnit containerWidth, LayoutUnit childWidth, LayoutUnit&amp; marginStart, LayoutUnit&amp; marginEnd) const;
</del><ins>+    void computeInlineDirectionMargins(RenderBlock&amp; containingBlock, LayoutUnit containerWidth, LayoutUnit childWidth, LayoutUnit&amp; marginStart, LayoutUnit&amp; marginEnd) const;
</ins><span class="cx"> 
</span><span class="cx">     // Used to resolve margins in the containing block's block-flow direction.
</span><del>-    void computeBlockDirectionMargins(const RenderBlock* containingBlock, LayoutUnit&amp; marginBefore, LayoutUnit&amp; marginAfter) const;
-    void computeAndSetBlockDirectionMargins(const RenderBlock* containingBlock);
</del><ins>+    void computeBlockDirectionMargins(const RenderBlock&amp; containingBlock, LayoutUnit&amp; marginBefore, LayoutUnit&amp; marginAfter) const;
+    void computeAndSetBlockDirectionMargins(const RenderBlock&amp; containingBlock);
</ins><span class="cx"> 
</span><span class="cx">     enum RenderBoxRegionInfoFlags { CacheRenderBoxRegionInfo, DoNotCacheRenderBoxRegionInfo };
</span><span class="cx">     LayoutRect borderBoxRectInRegion(RenderRegion*, RenderBoxRegionInfoFlags = CacheRenderBoxRegionInfo) const;
</span><span class="lines">@@ -425,9 +425,9 @@
</span><span class="cx"> 
</span><span class="cx">     bool hasStretchedLogicalWidth() const;
</span><span class="cx"> 
</span><del>-    LayoutUnit shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, LayoutUnit childMarginEnd, const RenderBlock* cb, RenderRegion*) const;
</del><ins>+    LayoutUnit shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, LayoutUnit childMarginEnd, const RenderBlock&amp; cb, RenderRegion*) const;
</ins><span class="cx"> 
</span><del>-    LayoutUnit computeLogicalWidthInRegionUsing(SizeType, Length logicalWidth, LayoutUnit availableLogicalWidth, const RenderBlock* containingBlock, RenderRegion*) const;
</del><ins>+    LayoutUnit computeLogicalWidthInRegionUsing(SizeType, Length logicalWidth, LayoutUnit availableLogicalWidth, const RenderBlock&amp; containingBlock, RenderRegion*) const;
</ins><span class="cx">     Optional&lt;LayoutUnit&gt; computeLogicalHeightUsing(SizeType, const Length&amp; height, Optional&lt;LayoutUnit&gt; intrinsicContentHeight) const;
</span><span class="cx">     Optional&lt;LayoutUnit&gt; computeContentLogicalHeight(SizeType, const Length&amp; height, Optional&lt;LayoutUnit&gt; intrinsicContentHeight) const;
</span><span class="cx">     Optional&lt;LayoutUnit&gt; computeContentAndScrollbarLogicalHeightUsing(SizeType, const Length&amp; height, Optional&lt;LayoutUnit&gt; intrinsicContentHeight) const;
</span><span class="lines">@@ -440,7 +440,7 @@
</span><span class="cx">     virtual LayoutUnit computeReplacedLogicalHeight() const;
</span><span class="cx"> 
</span><span class="cx">     bool hasDefiniteLogicalWidth() const;
</span><del>-    static bool percentageLogicalHeightIsResolvableFromBlock(const RenderBlock* containingBlock, bool outOfFlowPositioned, bool scrollsOverflowY);
</del><ins>+    static bool percentageLogicalHeightIsResolvableFromBlock(const RenderBlock&amp; containingBlock, bool outOfFlowPositioned, bool scrollsOverflowY);
</ins><span class="cx">     bool hasDefiniteLogicalHeight() const;
</span><span class="cx">     Optional&lt;LayoutUnit&gt; computePercentageLogicalHeight(const Length&amp; height) const;
</span><span class="cx"> 
</span><span class="lines">@@ -692,19 +692,19 @@
</span><span class="cx">     // Returns true if we did a full repaint
</span><span class="cx">     bool repaintLayerRectsForImage(WrappedImagePtr image, const FillLayer* layers, bool drawingBackground);
</span><span class="cx"> 
</span><del>-    bool skipContainingBlockForPercentHeightCalculation(const RenderBox* containingBlock, bool isPerpendicularWritingMode) const;
</del><ins>+    bool skipContainingBlockForPercentHeightCalculation(const RenderBox&amp; containingBlock, bool isPerpendicularWritingMode) const;
</ins><span class="cx">    
</span><del>-    LayoutUnit containingBlockLogicalWidthForPositioned(const RenderBoxModelObject* containingBlock, RenderRegion* = nullptr, bool checkForPerpendicularWritingMode = true) const;
-    LayoutUnit containingBlockLogicalHeightForPositioned(const RenderBoxModelObject* containingBlock, bool checkForPerpendicularWritingMode = true) const;
</del><ins>+    LayoutUnit containingBlockLogicalWidthForPositioned(const RenderBoxModelObject&amp; containingBlock, RenderRegion* = nullptr, bool checkForPerpendicularWritingMode = true) const;
+    LayoutUnit containingBlockLogicalHeightForPositioned(const RenderBoxModelObject&amp; containingBlock, bool checkForPerpendicularWritingMode = true) const;
</ins><span class="cx"> 
</span><span class="cx">     LayoutUnit viewLogicalHeightForPercentages() const;
</span><span class="cx"> 
</span><span class="cx">     void computePositionedLogicalHeight(LogicalExtentComputedValues&amp;) const;
</span><del>-    void computePositionedLogicalWidthUsing(SizeType, Length logicalWidth, const RenderBoxModelObject* containerBlock, TextDirection containerDirection,
</del><ins>+    void computePositionedLogicalWidthUsing(SizeType, Length logicalWidth, const RenderBoxModelObject&amp; containerBlock, TextDirection containerDirection,
</ins><span class="cx">                                             LayoutUnit containerLogicalWidth, LayoutUnit bordersPlusPadding,
</span><span class="cx">                                             Length logicalLeft, Length logicalRight, Length marginLogicalLeft, Length marginLogicalRight,
</span><span class="cx">                                             LogicalExtentComputedValues&amp;) const;
</span><del>-    void computePositionedLogicalHeightUsing(SizeType, Length logicalHeightLength, const RenderBoxModelObject* containerBlock,
</del><ins>+    void computePositionedLogicalHeightUsing(SizeType, Length logicalHeightLength, const RenderBoxModelObject&amp; containerBlock,
</ins><span class="cx">                                              LayoutUnit containerLogicalHeight, LayoutUnit bordersPlusPadding, LayoutUnit logicalHeight,
</span><span class="cx">                                              Length logicalTop, Length logicalBottom, Length marginLogicalTop, Length marginLogicalBottom,
</span><span class="cx">                                              LogicalExtentComputedValues&amp;) const;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderDeprecatedFlexibleBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (198567 => 198568)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp        2016-03-23 00:49:30 UTC (rev 198567)
+++ trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp        2016-03-23 00:58:34 UTC (rev 198568)
</span><span class="lines">@@ -421,7 +421,7 @@
</span><span class="cx">             LayoutSize&amp; childLayoutDelta = childLayoutDeltas[childIndex++];
</span><span class="cx">             
</span><span class="cx">             // Compute the child's vertical margins.
</span><del>-            child-&gt;computeAndSetBlockDirectionMargins(this);
</del><ins>+            child-&gt;computeAndSetBlockDirectionMargins(*this);
</ins><span class="cx"> 
</span><span class="cx">             child-&gt;markForPaginationRelayoutIfNeeded();
</span><span class="cx">             
</span><span class="lines">@@ -733,7 +733,7 @@
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             // Compute the child's vertical margins.
</span><del>-            child-&gt;computeAndSetBlockDirectionMargins(this);
</del><ins>+            child-&gt;computeAndSetBlockDirectionMargins(*this);
</ins><span class="cx"> 
</span><span class="cx">             // Add in the child's marginTop to our height.
</span><span class="cx">             setHeight(height() + child-&gt;marginTop());
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderFlexibleBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp (198567 => 198568)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp        2016-03-23 00:49:30 UTC (rev 198567)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp        2016-03-23 00:58:34 UTC (rev 198568)
</span><span class="lines">@@ -462,7 +462,7 @@
</span><span class="cx">     }
</span><span class="cx">     // FIXME: Figure out how this should work for regions and pass in the appropriate values.
</span><span class="cx">     RenderRegion* region = nullptr;
</span><del>-    return child.computeLogicalWidthInRegionUsing(sizeType, size, contentLogicalWidth(), this, region) - child.borderAndPaddingLogicalWidth();
</del><ins>+    return child.computeLogicalWidthInRegionUsing(sizeType, size, contentLogicalWidth(), *this, region) - child.borderAndPaddingLogicalWidth();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WritingMode RenderFlexibleBox::transformedWritingMode() const
</span><span class="lines">@@ -1397,7 +1397,7 @@
</span><span class="cx">         // FIXME: If the child doesn't have orthogonal flow, then it already has an override width set, so use it.
</span><span class="cx">         if (hasOrthogonalFlow(child)) {
</span><span class="cx">             LayoutUnit childWidth = std::max&lt;LayoutUnit&gt;(0, lineCrossAxisExtent - crossAxisMarginExtentForChild(child));
</span><del>-            childWidth = child.constrainLogicalWidthInRegionByMinMax(childWidth, childWidth, this);
</del><ins>+            childWidth = child.constrainLogicalWidthInRegionByMinMax(childWidth, childWidth, *this);
</ins><span class="cx"> 
</span><span class="cx">             if (childWidth != child.logicalWidth()) {
</span><span class="cx">                 child.setOverrideLogicalContentWidth(childWidth - child.borderAndPaddingLogicalWidth());
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderGridcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderGrid.cpp (198567 => 198568)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderGrid.cpp        2016-03-23 00:49:30 UTC (rev 198567)
+++ trunk/Source/WebCore/rendering/RenderGrid.cpp        2016-03-23 00:58:34 UTC (rev 198568)
</span><span class="lines">@@ -748,7 +748,7 @@
</span><span class="cx">         return minContentForChild(child, direction, columnTracks);
</span><span class="cx"> 
</span><span class="cx">     if (isRowAxis)
</span><del>-        return child.computeLogicalWidthInRegionUsing(MinSize, childMinSize, contentLogicalWidth(), this, nullptr);
</del><ins>+        return child.computeLogicalWidthInRegionUsing(MinSize, childMinSize, contentLogicalWidth(), *this, nullptr);
</ins><span class="cx"> 
</span><span class="cx">     return child.computeContentAndScrollbarLogicalHeightUsing(MinSize, childMinSize, child.logicalHeight()).valueOr(0);
</span><span class="cx"> }
</span><span class="lines">@@ -1661,7 +1661,7 @@
</span><span class="cx"> 
</span><span class="cx">     LayoutUnit marginBefore;
</span><span class="cx">     LayoutUnit marginAfter;
</span><del>-    child.computeBlockDirectionMargins(this, marginBefore, marginAfter);
</del><ins>+    child.computeBlockDirectionMargins(*this, marginBefore, marginAfter);
</ins><span class="cx"> 
</span><span class="cx">     return marginBefore + marginAfter;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (198567 => 198568)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTable.cpp        2016-03-23 00:49:30 UTC (rev 198567)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp        2016-03-23 00:58:34 UTC (rev 198568)
</span><span class="lines">@@ -272,10 +272,10 @@
</span><span class="cx">         setMarginEnd(computedValues.m_margins.m_end);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RenderBlock* cb = containingBlock();
</del><ins>+    RenderBlock&amp; cb = *containingBlock();
</ins><span class="cx"> 
</span><span class="cx">     LayoutUnit availableLogicalWidth = containingBlockLogicalWidthForContent();
</span><del>-    bool hasPerpendicularContainingBlock = cb-&gt;style().isHorizontalWritingMode() != style().isHorizontalWritingMode();
</del><ins>+    bool hasPerpendicularContainingBlock = cb.style().isHorizontalWritingMode() != style().isHorizontalWritingMode();
</ins><span class="cx">     LayoutUnit containerWidthInInlineDirection = hasPerpendicularContainingBlock ? perpendicularContainingBlockLogicalHeight() : availableLogicalWidth;
</span><span class="cx"> 
</span><span class="cx">     Length styleLogicalWidth = style().logicalWidth();
</span><span class="lines">@@ -289,7 +289,7 @@
</span><span class="cx"> 
</span><span class="cx">         // Subtract out our margins to get the available content width.
</span><span class="cx">         LayoutUnit availableContentLogicalWidth = std::max&lt;LayoutUnit&gt;(0, containerWidthInInlineDirection - marginTotal);
</span><del>-        if (shrinkToAvoidFloats() &amp;&amp; cb-&gt;containsFloats() &amp;&amp; !hasPerpendicularContainingBlock) {
</del><ins>+        if (shrinkToAvoidFloats() &amp;&amp; cb.containsFloats() &amp;&amp; !hasPerpendicularContainingBlock) {
</ins><span class="cx">             // FIXME: Work with regions someday.
</span><span class="cx">             availableContentLogicalWidth = shrinkLogicalWidthToAvoidFloats(marginStart, marginEnd, cb, 0);
</span><span class="cx">         }
</span><span class="lines">@@ -321,10 +321,10 @@
</span><span class="cx">     setMarginEnd(0);
</span><span class="cx">     if (!hasPerpendicularContainingBlock) {
</span><span class="cx">         LayoutUnit containerLogicalWidthForAutoMargins = availableLogicalWidth;
</span><del>-        if (avoidsFloats() &amp;&amp; cb-&gt;containsFloats())
</del><ins>+        if (avoidsFloats() &amp;&amp; cb.containsFloats())
</ins><span class="cx">             containerLogicalWidthForAutoMargins = containingBlockAvailableLineWidthInRegion(0); // FIXME: Work with regions someday.
</span><span class="cx">         ComputedMarginValues marginValues;
</span><del>-        bool hasInvertedDirection =  cb-&gt;style().isLeftToRightDirection() == style().isLeftToRightDirection();
</del><ins>+        bool hasInvertedDirection =  cb.style().isLeftToRightDirection() == style().isLeftToRightDirection();
</ins><span class="cx">         computeInlineDirectionMargins(cb, containerLogicalWidthForAutoMargins, logicalWidth(),
</span><span class="cx">             hasInvertedDirection ? marginValues.m_start : marginValues.m_end,
</span><span class="cx">             hasInvertedDirection ? marginValues.m_end : marginValues.m_start);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTableRowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTableRow.cpp (198567 => 198568)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTableRow.cpp        2016-03-23 00:49:30 UTC (rev 198567)
+++ trunk/Source/WebCore/rendering/RenderTableRow.cpp        2016-03-23 00:58:34 UTC (rev 198568)
</span><span class="lines">@@ -173,7 +173,7 @@
</span><span class="cx">             cell-&gt;setChildNeedsLayout(MarkOnlyThis);
</span><span class="cx"> 
</span><span class="cx">         if (cell-&gt;needsLayout()) {
</span><del>-            cell-&gt;computeAndSetBlockDirectionMargins(table());
</del><ins>+            cell-&gt;computeAndSetBlockDirectionMargins(*table());
</ins><span class="cx">             cell-&gt;layout();
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre>
</div>
</div>

</body>
</html>