<!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>[164006] 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/164006">164006</a></dd>
<dt>Author</dt> <dd>bjonesbe@adobe.com</dd>
<dt>Date</dt> <dd>2014-02-12 19:02:53 -0800 (Wed, 12 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[CSS Shapes] Rename shapeSize and others to make ShapeInfo and friends easier to understand
https://bugs.webkit.org/show_bug.cgi?id=128685

Reviewed by Alexandru Chiculita.

The ShapeInfo hierarchy has grown organically as the spec has changed,
and the naming has become very stale and confusing. The spec is now in
Last Call, so it seems like a good time to take a stab towards better
naming that matches the spec terminology and is also more consistent
in general.

No new tests, no behavior change.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::imageChanged): Use new names.
(WebCore::RenderBlock::updateShapeInsideInfoAfterStyleChange): Ditto.
(WebCore::shapeInfoRequiresRelayout): Ditto.
(WebCore::RenderBlock::computeShapeSize): Ditto.
(WebCore::RenderBlock::updateShapesAfterBlockLayout): Ditto.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::logicalSizeForChild): This method makes it much
    cleaner to set the reference box size.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::positionNewFloats): Use new names.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange): Ditto.
(WebCore::RenderBox::imageChanged): Ditto.
* rendering/shapes/ShapeInfo.cpp:
(WebCore::getShapeImageMarginRect): Rename variables.
(WebCore::ShapeInfo&lt;RenderType&gt;::computedShape): More renames.
* rendering/shapes/ShapeInfo.h:
(WebCore::ShapeInfo::setReferenceBoxLogicalSize): Renamed from
    setShapeSize.
(WebCore::ShapeInfo::logicalLineTop): Use new names.
(WebCore::ShapeInfo::logicalLineBottom): Ditto.
(WebCore::ShapeInfo::shapeContainingBlockLogicalHeight): Ditto.
(WebCore::ShapeInfo::markShapeAsDirty): Renamed from dirtyShapeSize.
(WebCore::ShapeInfo::isShapeDirty): Renamed from shapeSizeDirty.
(WebCore::ShapeInfo::referenceBoxLogicalSize): Renamed from shapeSize.
(WebCore::ShapeInfo::logicalTopOffset): Use new names.
(WebCore::ShapeInfo::logicalLeftOffset): Ditto.
* rendering/shapes/ShapeInsideInfo.cpp:
(WebCore::ShapeInsideInfo::updateSegmentsForLine): Ditto.
(WebCore::ShapeInsideInfo::adjustLogicalLineTop): Ditto.
(WebCore::ShapeInsideInfo::computeFirstFitPositionForFloat): Ditto.
* rendering/shapes/ShapeInsideInfo.h:
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine): Ditto.
* rendering/shapes/ShapeOutsideInfo.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockcpp">trunk/Source/WebCore/rendering/RenderBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockh">trunk/Source/WebCore/rendering/RenderBlock.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockFlowcpp">trunk/Source/WebCore/rendering/RenderBlockFlow.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesShapeInfocpp">trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesShapeInfoh">trunk/Source/WebCore/rendering/shapes/ShapeInfo.h</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesShapeInsideInfocpp">trunk/Source/WebCore/rendering/shapes/ShapeInsideInfo.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesShapeInsideInfoh">trunk/Source/WebCore/rendering/shapes/ShapeInsideInfo.h</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesShapeOutsideInfocpp">trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesShapeOutsideInfoh">trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (164005 => 164006)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-02-13 02:03:49 UTC (rev 164005)
+++ trunk/Source/WebCore/ChangeLog        2014-02-13 03:02:53 UTC (rev 164006)
</span><span class="lines">@@ -1,3 +1,55 @@
</span><ins>+2014-02-12  Bem Jones-Bey  &lt;bjonesbe@adobe.com&gt;
+
+        [CSS Shapes] Rename shapeSize and others to make ShapeInfo and friends easier to understand
+        https://bugs.webkit.org/show_bug.cgi?id=128685
+
+        Reviewed by Alexandru Chiculita.
+
+        The ShapeInfo hierarchy has grown organically as the spec has changed,
+        and the naming has become very stale and confusing. The spec is now in
+        Last Call, so it seems like a good time to take a stab towards better
+        naming that matches the spec terminology and is also more consistent
+        in general.
+
+        No new tests, no behavior change.
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::imageChanged): Use new names.
+        (WebCore::RenderBlock::updateShapeInsideInfoAfterStyleChange): Ditto.
+        (WebCore::shapeInfoRequiresRelayout): Ditto.
+        (WebCore::RenderBlock::computeShapeSize): Ditto.
+        (WebCore::RenderBlock::updateShapesAfterBlockLayout): Ditto.
+        * rendering/RenderBlock.h:
+        (WebCore::RenderBlock::logicalSizeForChild): This method makes it much
+            cleaner to set the reference box size.
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::positionNewFloats): Use new names.
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange): Ditto.
+        (WebCore::RenderBox::imageChanged): Ditto.
+        * rendering/shapes/ShapeInfo.cpp:
+        (WebCore::getShapeImageMarginRect): Rename variables.
+        (WebCore::ShapeInfo&lt;RenderType&gt;::computedShape): More renames.
+        * rendering/shapes/ShapeInfo.h:
+        (WebCore::ShapeInfo::setReferenceBoxLogicalSize): Renamed from
+            setShapeSize.
+        (WebCore::ShapeInfo::logicalLineTop): Use new names.
+        (WebCore::ShapeInfo::logicalLineBottom): Ditto.
+        (WebCore::ShapeInfo::shapeContainingBlockLogicalHeight): Ditto.
+        (WebCore::ShapeInfo::markShapeAsDirty): Renamed from dirtyShapeSize.
+        (WebCore::ShapeInfo::isShapeDirty): Renamed from shapeSizeDirty.
+        (WebCore::ShapeInfo::referenceBoxLogicalSize): Renamed from shapeSize.
+        (WebCore::ShapeInfo::logicalTopOffset): Use new names.
+        (WebCore::ShapeInfo::logicalLeftOffset): Ditto.
+        * rendering/shapes/ShapeInsideInfo.cpp:
+        (WebCore::ShapeInsideInfo::updateSegmentsForLine): Ditto.
+        (WebCore::ShapeInsideInfo::adjustLogicalLineTop): Ditto.
+        (WebCore::ShapeInsideInfo::computeFirstFitPositionForFloat): Ditto.
+        * rendering/shapes/ShapeInsideInfo.h:
+        * rendering/shapes/ShapeOutsideInfo.cpp:
+        (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine): Ditto.
+        * rendering/shapes/ShapeOutsideInfo.h:
+
</ins><span class="cx"> 2014-02-12  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION: Crashing/Broken Tests Due To Unexpected 8-bit Character Data
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (164005 => 164006)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.cpp        2014-02-13 02:03:49 UTC (rev 164005)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp        2014-02-13 03:02:53 UTC (rev 164006)
</span><span class="lines">@@ -1321,7 +1321,7 @@
</span><span class="cx">     ShapeValue* shapeValue = style().shapeInside();
</span><span class="cx">     if (shapeValue &amp;&amp; shapeValue-&gt;image() &amp;&amp; shapeValue-&gt;image()-&gt;data() == image) {
</span><span class="cx">         ShapeInsideInfo&amp; shapeInsideInfo = ensureShapeInsideInfo();
</span><del>-        shapeInsideInfo.dirtyShapeSize();
</del><ins>+        shapeInsideInfo.markShapeAsDirty();
</ins><span class="cx">         markShapeInsideDescendantsForLayout();
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="lines">@@ -1381,7 +1381,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (shapeInside) {
</span><span class="cx">         ShapeInsideInfo&amp; shapeInsideInfo = ensureShapeInsideInfo();
</span><del>-        shapeInsideInfo.dirtyShapeSize();
</del><ins>+        shapeInsideInfo.markShapeAsDirty();
</ins><span class="cx">     } else
</span><span class="cx">         setShapeInsideInfo(nullptr);
</span><span class="cx">     markShapeInsideDescendantsForLayout();
</span><span class="lines">@@ -1446,7 +1446,7 @@
</span><span class="cx"> {
</span><span class="cx">     ShapeInsideInfo* info = block-&gt;shapeInsideInfo();
</span><span class="cx">     if (info)
</span><del>-        info-&gt;setNeedsLayout(info-&gt;shapeSizeDirty());
</del><ins>+        info-&gt;setNeedsLayout(info-&gt;isShapeDirty());
</ins><span class="cx">     else
</span><span class="cx">         info = block-&gt;layoutShapeInsideInfo();
</span><span class="cx">     return info &amp;&amp; info-&gt;needsLayout();
</span><span class="lines">@@ -1461,10 +1461,10 @@
</span><span class="cx">     if (isRenderNamedFlowFragment()) {
</span><span class="cx">         ShapeInsideInfo* parentShapeInsideInfo = toRenderBlock(parent())-&gt;shapeInsideInfo();
</span><span class="cx">         ASSERT(parentShapeInsideInfo);
</span><del>-        shapeInsideInfo-&gt;setShapeSize(parentShapeInsideInfo-&gt;shapeSize().width(), parentShapeInsideInfo-&gt;shapeSize().height());
</del><ins>+        shapeInsideInfo-&gt;setReferenceBoxLogicalSize(parentShapeInsideInfo-&gt;referenceBoxLogicalSize());
</ins><span class="cx">     } else {
</span><span class="cx">         bool percentageLogicalHeightResolvable = percentageLogicalHeightIsResolvableFromBlock(this, false);
</span><del>-        shapeInsideInfo-&gt;setShapeSize(logicalWidth(), percentageLogicalHeightResolvable ? logicalHeight() : LayoutUnit());
</del><ins>+        shapeInsideInfo-&gt;setReferenceBoxLogicalSize(LayoutSize(logicalWidth(), percentageLogicalHeightResolvable ? logicalHeight() : LayoutUnit()));
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="lines">@@ -1500,7 +1500,7 @@
</span><span class="cx">     // A previous sibling has changed dimension, so we need to relayout the shape with the content
</span><span class="cx">     ShapeInsideInfo* shapeInsideInfo = layoutShapeInsideInfo();
</span><span class="cx">     if (heightChanged &amp;&amp; shapeInsideInfo)
</span><del>-        shapeInsideInfo-&gt;dirtyShapeSize();
</del><ins>+        shapeInsideInfo-&gt;markShapeAsDirty();
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(heightChanged);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.h (164005 => 164006)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.h        2014-02-13 02:03:49 UTC (rev 164005)
+++ trunk/Source/WebCore/rendering/RenderBlock.h        2014-02-13 03:02:53 UTC (rev 164006)
</span><span class="lines">@@ -278,6 +278,7 @@
</span><span class="cx">     enum ApplyLayoutDeltaMode { ApplyLayoutDelta, DoNotApplyLayoutDelta };
</span><span class="cx">     LayoutUnit logicalWidthForChild(const RenderBox&amp; child) const { return isHorizontalWritingMode() ? child.width() : child.height(); }
</span><span class="cx">     LayoutUnit logicalHeightForChild(const RenderBox&amp; child) const { return isHorizontalWritingMode() ? child.height() : child.width(); }
</span><ins>+    LayoutSize logicalSizeForChild(const RenderBox&amp; child) const { return isHorizontalWritingMode() ? child.size() : child.size().transposedSize(); }
</ins><span class="cx">     LayoutUnit logicalTopForChild(const RenderBox&amp; child) const { return isHorizontalWritingMode() ? child.y() : child.x(); }
</span><span class="cx">     void setLogicalLeftForChild(RenderBox&amp; child, LayoutUnit logicalLeft, ApplyLayoutDeltaMode = DoNotApplyLayoutDelta);
</span><span class="cx">     void setLogicalTopForChild(RenderBox&amp; child, LayoutUnit logicalTop, ApplyLayoutDeltaMode = DoNotApplyLayoutDelta);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockFlowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (164005 => 164006)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2014-02-13 02:03:49 UTC (rev 164005)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2014-02-13 03:02:53 UTC (rev 164006)
</span><span class="lines">@@ -2342,7 +2342,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><span class="cx">         if (ShapeOutsideInfo* shapeOutside = childBox.shapeOutsideInfo())
</span><del>-            shapeOutside-&gt;setShapeSize(logicalWidthForChild(childBox), logicalHeightForChild(childBox));
</del><ins>+            shapeOutside-&gt;setReferenceBoxLogicalSize(logicalSizeForChild(childBox));
</ins><span class="cx"> #endif
</span><span class="cx">         // If the child moved, we have to repaint it.
</span><span class="cx">         if (childBox.checkForRepaintDuringLayout())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (164005 => 164006)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp        2014-02-13 02:03:49 UTC (rev 164005)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2014-02-13 03:02:53 UTC (rev 164006)
</span><span class="lines">@@ -404,7 +404,7 @@
</span><span class="cx">     if (!shapeOutside)
</span><span class="cx">         ShapeOutsideInfo::removeInfo(*this);
</span><span class="cx">     else
</span><del>-        ShapeOutsideInfo::ensureInfo(*this).dirtyShapeSize();
</del><ins>+        ShapeOutsideInfo::ensureInfo(*this).markShapeAsDirty();
</ins><span class="cx"> 
</span><span class="cx">     if (shapeOutside || shapeOutside != oldShapeOutside)
</span><span class="cx">         markShapeOutsideDependentsForLayout();
</span><span class="lines">@@ -1542,7 +1542,7 @@
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><span class="cx">     ShapeValue* shapeOutsideValue = style().shapeOutside();
</span><span class="cx">     if (!view().frameView().isInLayout() &amp;&amp; isFloating() &amp;&amp; shapeOutsideValue &amp;&amp; shapeOutsideValue-&gt;image() &amp;&amp; shapeOutsideValue-&gt;image()-&gt;data() == image) {
</span><del>-        ShapeOutsideInfo::ensureInfo(*this).dirtyShapeSize();
</del><ins>+        ShapeOutsideInfo::ensureInfo(*this).markShapeAsDirty();
</ins><span class="cx">         markShapeOutsideDependentsForLayout();
</span><span class="cx">     }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesShapeInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp (164005 => 164006)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp        2014-02-13 02:03:49 UTC (rev 164005)
+++ trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp        2014-02-13 03:02:53 UTC (rev 164006)
</span><span class="lines">@@ -42,7 +42,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> bool checkShapeImageOrigin(Document&amp; document, CachedImage&amp; cachedImage)
</span><span class="cx"> {
</span><span class="cx">     if (cachedImage.isOriginClean(document.securityOrigin()))
</span><span class="lines">@@ -67,11 +66,11 @@
</span><span class="cx">     return LayoutRect(LayoutPoint(), styleImage.cachedImage()-&gt;image()-&gt;size());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static LayoutRect getShapeImageMarginRect(const RenderBox&amp; renderBox, const LayoutSize&amp; shapeSize)
</del><ins>+static LayoutRect getShapeImageMarginRect(const RenderBox&amp; renderBox, const LayoutSize&amp; referenceBoxLogicalSize)
</ins><span class="cx"> {
</span><span class="cx">     LayoutPoint marginBoxOrigin(-renderBox.marginLogicalLeft() - renderBox.borderAndPaddingLogicalLeft(), -renderBox.marginBefore() - renderBox.borderBefore() - renderBox.paddingBefore());
</span><span class="cx">     LayoutSize marginBoxSizeDelta(renderBox.marginLogicalWidth() + renderBox.borderAndPaddingLogicalWidth(), renderBox.marginLogicalHeight() + renderBox.borderAndPaddingLogicalHeight());
</span><del>-    return LayoutRect(marginBoxOrigin, shapeSize + marginBoxSizeDelta);
</del><ins>+    return LayoutRect(marginBoxOrigin, referenceBoxLogicalSize + marginBoxSizeDelta);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;class RenderType&gt;
</span><span class="lines">@@ -90,20 +89,20 @@
</span><span class="cx">     switch (shapeValue-&gt;type()) {
</span><span class="cx">     case ShapeValue::Shape:
</span><span class="cx">         ASSERT(shapeValue-&gt;shape());
</span><del>-        m_shape = Shape::createShape(shapeValue-&gt;shape(), m_shapeLogicalSize, writingMode, margin, padding);
</del><ins>+        m_shape = Shape::createShape(shapeValue-&gt;shape(), m_referenceBoxLogicalSize, writingMode, margin, padding);
</ins><span class="cx">         break;
</span><span class="cx">     case ShapeValue::Image: {
</span><span class="cx">         ASSERT(shapeValue-&gt;image());
</span><span class="cx">         const StyleImage&amp; styleImage = *(shapeValue-&gt;image());
</span><span class="cx">         const LayoutRect&amp; imageRect = getShapeImageReplacedRect(m_renderer, styleImage);
</span><del>-        const LayoutRect&amp; marginRect = getShapeImageMarginRect(m_renderer, m_shapeLogicalSize);
</del><ins>+        const LayoutRect&amp; marginRect = getShapeImageMarginRect(m_renderer, m_referenceBoxLogicalSize);
</ins><span class="cx">         m_shape = Shape::createRasterShape(styleImage, shapeImageThreshold, imageRect, marginRect, writingMode, margin, padding);
</span><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx">     case ShapeValue::Box: {
</span><span class="cx">         // FIXME This does not properly compute the rounded corners as specified in all conditions.
</span><span class="cx">         // https://bugs.webkit.org/show_bug.cgi?id=127982
</span><del>-        const RoundedRect&amp; shapeRect = m_renderer.style().getRoundedBorderFor(LayoutRect(LayoutPoint(), m_shapeLogicalSize), &amp;(m_renderer.view()));
</del><ins>+        const RoundedRect&amp; shapeRect = m_renderer.style().getRoundedBorderFor(LayoutRect(LayoutPoint(), m_referenceBoxLogicalSize), &amp;(m_renderer.view()));
</ins><span class="cx">         m_shape = Shape::createLayoutBoxShape(shapeRect, writingMode, margin, padding);
</span><span class="cx">         break;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesShapeInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/ShapeInfo.h (164005 => 164006)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/ShapeInfo.h        2014-02-13 02:03:49 UTC (rev 164005)
+++ trunk/Source/WebCore/rendering/shapes/ShapeInfo.h        2014-02-13 03:02:53 UTC (rev 164006)
</span><span class="lines">@@ -71,23 +71,20 @@
</span><span class="cx"> public:
</span><span class="cx">     virtual ~ShapeInfo() { }
</span><span class="cx"> 
</span><del>-    void setShapeSize(LayoutUnit logicalWidth, LayoutUnit logicalHeight)
</del><ins>+    void setReferenceBoxLogicalSize(LayoutSize newReferenceBoxLogicalSize)
</ins><span class="cx">     {
</span><del>-        LayoutBox box = resolvedLayoutBox();
</del><ins>+        LayoutBox box = referenceBox();
</ins><span class="cx">         switch (box) {
</span><span class="cx">         case MarginBox:
</span><del>-            logicalHeight += m_renderer.marginLogicalHeight();
-            logicalWidth += m_renderer.marginLogicalWidth();
</del><ins>+            newReferenceBoxLogicalSize.expand(m_renderer.marginLogicalWidth(), m_renderer.marginLogicalHeight());
</ins><span class="cx">             break;
</span><span class="cx">         case BorderBox:
</span><span class="cx">             break;
</span><span class="cx">         case PaddingBox:
</span><del>-            logicalHeight -= m_renderer.borderLogicalHeight();
-            logicalWidth -= m_renderer.borderLogicalWidth();
</del><ins>+            newReferenceBoxLogicalSize.shrink(m_renderer.borderLogicalWidth(), m_renderer.borderLogicalHeight());
</ins><span class="cx">             break;
</span><span class="cx">         case ContentBox:
</span><del>-            logicalHeight -= m_renderer.borderAndPaddingLogicalHeight();
-            logicalWidth -= m_renderer.borderAndPaddingLogicalWidth();
</del><ins>+            newReferenceBoxLogicalSize.shrink(m_renderer.borderAndPaddingLogicalWidth(), m_renderer.borderAndPaddingLogicalHeight());
</ins><span class="cx">             break;
</span><span class="cx">         case Fill:
</span><span class="cx">         case Stroke:
</span><span class="lines">@@ -97,11 +94,10 @@
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        LayoutSize newLogicalSize(logicalWidth, logicalHeight);
-        if (m_shapeLogicalSize == newLogicalSize)
</del><ins>+        if (m_referenceBoxLogicalSize == newReferenceBoxLogicalSize)
</ins><span class="cx">             return;
</span><del>-        dirtyShapeSize();
-        m_shapeLogicalSize = newLogicalSize;
</del><ins>+        markShapeAsDirty();
+        m_referenceBoxLogicalSize = newReferenceBoxLogicalSize;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     SegmentList computeSegmentsForLine(LayoutUnit lineTop, LayoutUnit lineHeight) const;
</span><span class="lines">@@ -113,18 +109,18 @@
</span><span class="cx">     LayoutUnit shapeLogicalWidth() const { return computedShapeLogicalBoundingBox().width(); }
</span><span class="cx">     LayoutUnit shapeLogicalHeight() const { return computedShapeLogicalBoundingBox().height(); }
</span><span class="cx"> 
</span><del>-    LayoutUnit logicalLineTop() const { return m_shapeLineTop + logicalTopOffset(); }
-    LayoutUnit logicalLineBottom() const { return m_shapeLineTop + m_lineHeight + logicalTopOffset(); }
-    LayoutUnit logicalLineBottom(LayoutUnit lineHeight) const { return m_shapeLineTop + lineHeight + logicalTopOffset(); }
</del><ins>+    LayoutUnit logicalLineTop() const { return m_referenceBoxLineTop + logicalTopOffset(); }
+    LayoutUnit logicalLineBottom() const { return m_referenceBoxLineTop + m_lineHeight + logicalTopOffset(); }
+    LayoutUnit logicalLineBottom(LayoutUnit lineHeight) const { return m_referenceBoxLineTop + lineHeight + logicalTopOffset(); }
</ins><span class="cx"> 
</span><del>-    LayoutUnit shapeContainingBlockLogicalHeight() const { return (m_renderer.style().boxSizing() == CONTENT_BOX) ? (m_shapeLogicalSize.height() + m_renderer.borderAndPaddingLogicalHeight()) : m_shapeLogicalSize.height(); }
</del><ins>+    LayoutUnit shapeContainingBlockLogicalHeight() const { return (m_renderer.style().boxSizing() == CONTENT_BOX) ? (m_referenceBoxLogicalSize.height() + m_renderer.borderAndPaddingLogicalHeight()) : m_referenceBoxLogicalSize.height(); }
</ins><span class="cx"> 
</span><span class="cx">     virtual bool lineOverlapsShapeBounds() const = 0;
</span><span class="cx"> 
</span><del>-    void dirtyShapeSize() { m_shape.clear(); }
-    bool shapeSizeDirty() { return !m_shape.get(); }
</del><ins>+    void markShapeAsDirty() { m_shape.clear(); }
+    bool isShapeDirty() { return !m_shape.get(); }
</ins><span class="cx">     const RenderType&amp; owner() const { return m_renderer; }
</span><del>-    LayoutSize shapeSize() const { return m_shapeLogicalSize; }
</del><ins>+    LayoutSize referenceBoxLogicalSize() const { return m_referenceBoxLogicalSize; }
</ins><span class="cx"> 
</span><span class="cx">     LayoutRect computedShapePhysicalBoundingBox() const
</span><span class="cx">     {
</span><span class="lines">@@ -163,7 +159,7 @@
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    virtual LayoutBox resolvedLayoutBox() const = 0;
</del><ins>+    virtual LayoutBox referenceBox() const = 0;
</ins><span class="cx">     virtual LayoutRect computedShapeLogicalBoundingBox() const = 0;
</span><span class="cx">     virtual ShapeValue* shapeValue() const = 0;
</span><span class="cx">     virtual void getIntervals(LayoutUnit, LayoutUnit, SegmentList&amp;) const = 0;
</span><span class="lines">@@ -172,7 +168,7 @@
</span><span class="cx"> 
</span><span class="cx">     LayoutUnit logicalTopOffset() const
</span><span class="cx">     {
</span><del>-        LayoutBox box = resolvedLayoutBox();
</del><ins>+        LayoutBox box = referenceBox();
</ins><span class="cx">         switch (box) {
</span><span class="cx">         case MarginBox: return -m_renderer.marginBefore();
</span><span class="cx">         case BorderBox: return LayoutUnit();
</span><span class="lines">@@ -191,7 +187,7 @@
</span><span class="cx">     {
</span><span class="cx">         if (m_renderer.isRenderRegion())
</span><span class="cx">             return LayoutUnit();
</span><del>-        LayoutBox box = resolvedLayoutBox();
</del><ins>+        LayoutBox box = referenceBox();
</ins><span class="cx">         switch (box) {
</span><span class="cx">         case MarginBox: return -m_renderer.marginStart();
</span><span class="cx">         case BorderBox: return LayoutUnit();
</span><span class="lines">@@ -206,14 +202,14 @@
</span><span class="cx">         return LayoutUnit();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    LayoutUnit m_shapeLineTop;
</del><ins>+    LayoutUnit m_referenceBoxLineTop;
</ins><span class="cx">     LayoutUnit m_lineHeight;
</span><span class="cx"> 
</span><span class="cx">     const RenderType&amp; m_renderer;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     mutable OwnPtr&lt;Shape&gt; m_shape;
</span><del>-    LayoutSize m_shapeLogicalSize;
</del><ins>+    LayoutSize m_referenceBoxLogicalSize;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> bool checkShapeImageOrigin(Document&amp;, CachedImage&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesShapeInsideInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/ShapeInsideInfo.cpp (164005 => 164006)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/ShapeInsideInfo.cpp        2014-02-13 02:03:49 UTC (rev 164005)
+++ trunk/Source/WebCore/rendering/shapes/ShapeInsideInfo.cpp        2014-02-13 03:02:53 UTC (rev 164006)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx"> bool ShapeInsideInfo::updateSegmentsForLine(LayoutUnit lineTop, LayoutUnit lineHeight)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(lineHeight &gt;= 0);
</span><del>-    m_shapeLineTop = lineTop - logicalTopOffset();
</del><ins>+    m_referenceBoxLineTop = lineTop - logicalTopOffset();
</ins><span class="cx">     m_lineHeight = lineHeight;
</span><span class="cx">     m_segments.clear();
</span><span class="cx">     m_segmentRanges.clear();
</span><span class="lines">@@ -96,9 +96,9 @@
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     LayoutUnit newLineTop;
</span><del>-    if (shape.firstIncludedIntervalLogicalTop(m_shapeLineTop, FloatSize(minSegmentWidth, m_lineHeight), newLineTop)) {
-        if (newLineTop &gt; m_shapeLineTop) {
-            m_shapeLineTop = newLineTop;
</del><ins>+    if (shape.firstIncludedIntervalLogicalTop(m_referenceBoxLineTop, FloatSize(minSegmentWidth, m_lineHeight), newLineTop)) {
+        if (newLineTop &gt; m_referenceBoxLineTop) {
+            m_referenceBoxLineTop = newLineTop;
</ins><span class="cx">             return true;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -117,7 +117,7 @@
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="cx">     LayoutUnit firstFitPosition = 0;
</span><del>-    if (computedShape().firstIncludedIntervalLogicalTop(m_shapeLineTop, floatSize, firstFitPosition) &amp;&amp; (m_shapeLineTop &lt;= firstFitPosition))
</del><ins>+    if (computedShape().firstIncludedIntervalLogicalTop(m_referenceBoxLineTop, floatSize, firstFitPosition) &amp;&amp; (m_referenceBoxLineTop &lt;= firstFitPosition))
</ins><span class="cx">         return firstFitPosition;
</span><span class="cx"> 
</span><span class="cx">     return 0;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesShapeInsideInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/ShapeInsideInfo.h (164005 => 164006)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/ShapeInsideInfo.h        2014-02-13 02:03:49 UTC (rev 164005)
+++ trunk/Source/WebCore/rendering/shapes/ShapeInsideInfo.h        2014-02-13 03:02:53 UTC (rev 164006)
</span><span class="lines">@@ -103,11 +103,11 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool lineOverlapsShapeBounds() const override
</span><span class="cx">     {
</span><del>-        return computedShape().lineOverlapsShapePaddingBounds(m_shapeLineTop, m_lineHeight);
</del><ins>+        return computedShape().lineOverlapsShapePaddingBounds(m_referenceBoxLineTop, m_lineHeight);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    virtual LayoutBox resolvedLayoutBox() const override
</del><ins>+    virtual LayoutBox referenceBox() const override
</ins><span class="cx">     {
</span><span class="cx">         if (shapeValue()-&gt;layoutBox() == BoxMissing)
</span><span class="cx">             return ContentBox;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesShapeOutsideInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp (164005 => 164006)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp        2014-02-13 02:03:49 UTC (rev 164005)
+++ trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp        2014-02-13 03:02:53 UTC (rev 164006)
</span><span class="lines">@@ -61,18 +61,18 @@
</span><span class="cx"> 
</span><span class="cx"> void ShapeOutsideInfo::updateDeltasForContainingBlockLine(const RenderBlockFlow&amp; containingBlock, const FloatingObject&amp; floatingObject, LayoutUnit lineTop, LayoutUnit lineHeight)
</span><span class="cx"> {
</span><del>-    LayoutUnit shapeTop = containingBlock.logicalTopForFloat(&amp;floatingObject) + std::max(LayoutUnit(), containingBlock.marginBeforeForChild(m_renderer));
-    LayoutUnit floatRelativeLineTop = lineTop - shapeTop;
</del><ins>+    LayoutUnit borderBoxTop = containingBlock.logicalTopForFloat(&amp;floatingObject) + std::max(LayoutUnit(), containingBlock.marginBeforeForChild(m_renderer));
+    LayoutUnit borderBoxLineTop = lineTop - borderBoxTop;
</ins><span class="cx"> 
</span><del>-    if (shapeSizeDirty() || m_lineTop != floatRelativeLineTop || m_lineHeight != lineHeight) {
-        m_lineTop = floatRelativeLineTop;
-        m_shapeLineTop = floatRelativeLineTop - logicalTopOffset();
</del><ins>+    if (isShapeDirty() || m_borderBoxLineTop != borderBoxLineTop || m_lineHeight != lineHeight) {
+        m_borderBoxLineTop = borderBoxLineTop;
+        m_referenceBoxLineTop = borderBoxLineTop - logicalTopOffset();
</ins><span class="cx">         m_lineHeight = lineHeight;
</span><span class="cx"> 
</span><span class="cx">         LayoutUnit floatMarginBoxWidth = containingBlock.logicalWidthForFloat(&amp;floatingObject);
</span><span class="cx"> 
</span><span class="cx">         if (lineOverlapsShapeBounds()) {
</span><del>-            SegmentList segments = computeSegmentsForLine(floatRelativeLineTop, lineHeight);
</del><ins>+            SegmentList segments = computeSegmentsForLine(borderBoxLineTop, lineHeight);
</ins><span class="cx">             if (segments.size()) {
</span><span class="cx">                 LayoutUnit rawLeftMarginBoxDelta = segments.first().logicalLeft + containingBlock.marginStartForChild(m_renderer);
</span><span class="cx">                 m_leftMarginBoxDelta = clampTo&lt;LayoutUnit&gt;(rawLeftMarginBoxDelta, LayoutUnit(), floatMarginBoxWidth);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesShapeOutsideInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.h (164005 => 164006)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.h        2014-02-13 02:03:49 UTC (rev 164005)
+++ trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.h        2014-02-13 03:02:53 UTC (rev 164006)
</span><span class="lines">@@ -59,11 +59,11 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool lineOverlapsShapeBounds() const override
</span><span class="cx">     {
</span><del>-        return computedShape().lineOverlapsShapeMarginBounds(m_shapeLineTop, m_lineHeight);
</del><ins>+        return computedShape().lineOverlapsShapeMarginBounds(m_referenceBoxLineTop, m_lineHeight);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    virtual LayoutBox resolvedLayoutBox() const override
</del><ins>+    virtual LayoutBox referenceBox() const override
</ins><span class="cx">     {
</span><span class="cx">         if (shapeValue()-&gt;layoutBox() == BoxMissing) {
</span><span class="cx">             if (shapeValue()-&gt;type() == ShapeValue::Image)
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> 
</span><span class="cx">     LayoutUnit m_leftMarginBoxDelta;
</span><span class="cx">     LayoutUnit m_rightMarginBoxDelta;
</span><del>-    LayoutUnit m_lineTop;
</del><ins>+    LayoutUnit m_borderBoxLineTop;
</ins><span class="cx">     bool m_lineOverlapsShape;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>