<!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>[166920] 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/166920">166920</a></dd>
<dt>Author</dt> <dd>darin@apple.com</dd>
<dt>Date</dt> <dd>2014-04-08 01:58:43 -0700 (Tue, 08 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fix assertions triggered by CSS calc changes in <a href="http://trac.webkit.org/projects/webkit/changeset/166860">r166860</a>
https://bugs.webkit.org/show_bug.cgi?id=131346

Reviewed by Andrei Bucur.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::getBorderRadiusCornerValues): Use isPercentNotCalculated() instead of
type() == Percent; no behavior change.
(WebCore::getBorderRadiusCornerValue): Ditto.
(WebCore::lineHeightFromStyle): Use isPercentNotCalculated() before code
that calls percent(), which won't work for a calculated length.

* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyBorderRadius::applyValue): Use isNegative and isZero rather
than calling value() unconditionally. Should make calculated values work better.

* html/HTMLPlugInImageElement.cpp:
(WebCore::is100Percent): Use isPercentNotCalculated() before code
that calls percent(), which won't work for a calculated length.

* platform/Length.cpp:
(WebCore::CalculationValueMap::deref): Use adoptRef here instead of calling deref
immediately, so the deref will happen after calling remove. This makes the code
work properly even if it's reentered inside the calculation value's destructor.

* platform/Length.h:
(WebCore::Length::percent): Change assert to isPercentNotCalculated, since the
value function this calls only works for non-calculated values anyway.
(WebCore::Length::isPercentNotCalculated): Added.
(WebCore::Length::isPercent): Changed to call isPercentNotCalculated.
(WebCore::Length::isSpecified): Changed to call isPercent.

* platform/graphics/transforms/TranslateTransformOperation.h:
(WebCore::TranslateTransformOperation::apply): Use isPercentNotCalculated()
instead of type() == Percent; no behavior change.

* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn): Use isPercentNotCalculated()
before code that calls value() or percent(), which won't work for a calculated length.
(WebCore::AutoTableLayout::computeIntrinsicLogicalWidths): Ditto.
(WebCore::AutoTableLayout::calcEffectiveLogicalWidth): Ditto.
(WebCore::AutoTableLayout::layout): Ditto.
* rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::layout): Ditto.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions): Ditto.
* rendering/RenderTableSection.cpp:
(WebCore::updateLogicalHeightForCell): Ditto.
(WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows): Ditto.
(WebCore::RenderTableSection::distributeExtraLogicalHeightToRows): Ditto.

* rendering/style/RenderStyle.cpp:
(WebCore::requireTransformOrigin): Use modern for loop. Also marked function static,
since it's private to this file.
(WebCore::RenderStyle::applyTransform): Use isPercentNotCalculated() instead of
type() == Percent; no behavior change. Also use a modern for loop and auto&amp; to avoid
a really long type name.

* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeIntrinsicRatioInformation): Use isPercentNotCalculated()
before code that calls percent(), which won't work for a calculated length.

* platform/Length.h:
(WebCore::Length::percent):
(WebCore::Length::isPercentNotCalculated):
(WebCore::Length::isPercent):
(WebCore::Length::isSpecified):
* platform/graphics/transforms/TranslateTransformOperation.h:
(WebCore::TranslateTransformOperation::apply):
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
(WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
(WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
(WebCore::AutoTableLayout::layout):
* rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::layout):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
* rendering/RenderTableSection.cpp:
(WebCore::updateLogicalHeightForCell):
(WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
(WebCore::RenderTableSection::distributeExtraLogicalHeightToRows):
* rendering/style/RenderStyle.cpp:
(WebCore::requireTransformOrigin):
(WebCore::RenderStyle::applyTransform):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeIntrinsicRatioInformation):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssDeprecatedStyleBuildercpp">trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLPlugInImageElementcpp">trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformLengthcpp">trunk/Source/WebCore/platform/Length.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformLengthh">trunk/Source/WebCore/platform/Length.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstransformsTranslateTransformOperationh">trunk/Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.h</a></li>
<li><a href="#trunkSourceWebCorerenderingAutoTableLayoutcpp">trunk/Source/WebCore/rendering/AutoTableLayout.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingFixedTableLayoutcpp">trunk/Source/WebCore/rendering/FixedTableLayout.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxModelObjectcpp">trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTableSectioncpp">trunk/Source/WebCore/rendering/RenderTableSection.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStylecpp">trunk/Source/WebCore/rendering/style/RenderStyle.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGRootcpp">trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (166919 => 166920)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-04-08 08:15:39 UTC (rev 166919)
+++ trunk/Source/WebCore/ChangeLog        2014-04-08 08:58:43 UTC (rev 166920)
</span><span class="lines">@@ -1,3 +1,93 @@
</span><ins>+2014-04-08  Darin Adler  &lt;darin@apple.com&gt;
+
+        Fix assertions triggered by CSS calc changes in r166860
+        https://bugs.webkit.org/show_bug.cgi?id=131346
+
+        Reviewed by Andrei Bucur.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::getBorderRadiusCornerValues): Use isPercentNotCalculated() instead of
+        type() == Percent; no behavior change.
+        (WebCore::getBorderRadiusCornerValue): Ditto.
+        (WebCore::lineHeightFromStyle): Use isPercentNotCalculated() before code
+        that calls percent(), which won't work for a calculated length.
+
+        * css/DeprecatedStyleBuilder.cpp:
+        (WebCore::ApplyPropertyBorderRadius::applyValue): Use isNegative and isZero rather
+        than calling value() unconditionally. Should make calculated values work better.
+
+        * html/HTMLPlugInImageElement.cpp:
+        (WebCore::is100Percent): Use isPercentNotCalculated() before code
+        that calls percent(), which won't work for a calculated length.
+
+        * platform/Length.cpp:
+        (WebCore::CalculationValueMap::deref): Use adoptRef here instead of calling deref
+        immediately, so the deref will happen after calling remove. This makes the code
+        work properly even if it's reentered inside the calculation value's destructor.
+
+        * platform/Length.h:
+        (WebCore::Length::percent): Change assert to isPercentNotCalculated, since the
+        value function this calls only works for non-calculated values anyway.
+        (WebCore::Length::isPercentNotCalculated): Added.
+        (WebCore::Length::isPercent): Changed to call isPercentNotCalculated.
+        (WebCore::Length::isSpecified): Changed to call isPercent.
+
+        * platform/graphics/transforms/TranslateTransformOperation.h:
+        (WebCore::TranslateTransformOperation::apply): Use isPercentNotCalculated()
+        instead of type() == Percent; no behavior change.
+
+        * rendering/AutoTableLayout.cpp:
+        (WebCore::AutoTableLayout::recalcColumn): Use isPercentNotCalculated()
+        before code that calls value() or percent(), which won't work for a calculated length.
+        (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths): Ditto.
+        (WebCore::AutoTableLayout::calcEffectiveLogicalWidth): Ditto.
+        (WebCore::AutoTableLayout::layout): Ditto.
+        * rendering/FixedTableLayout.cpp:
+        (WebCore::FixedTableLayout::layout): Ditto.
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions): Ditto.
+        * rendering/RenderTableSection.cpp:
+        (WebCore::updateLogicalHeightForCell): Ditto.
+        (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows): Ditto.
+        (WebCore::RenderTableSection::distributeExtraLogicalHeightToRows): Ditto.
+
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::requireTransformOrigin): Use modern for loop. Also marked function static,
+        since it's private to this file.
+        (WebCore::RenderStyle::applyTransform): Use isPercentNotCalculated() instead of
+        type() == Percent; no behavior change. Also use a modern for loop and auto&amp; to avoid
+        a really long type name.
+
+        * rendering/svg/RenderSVGRoot.cpp:
+        (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation): Use isPercentNotCalculated()
+        before code that calls percent(), which won't work for a calculated length.
+
+        * platform/Length.h:
+        (WebCore::Length::percent):
+        (WebCore::Length::isPercentNotCalculated):
+        (WebCore::Length::isPercent):
+        (WebCore::Length::isSpecified):
+        * platform/graphics/transforms/TranslateTransformOperation.h:
+        (WebCore::TranslateTransformOperation::apply):
+        * rendering/AutoTableLayout.cpp:
+        (WebCore::AutoTableLayout::recalcColumn):
+        (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
+        (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
+        (WebCore::AutoTableLayout::layout):
+        * rendering/FixedTableLayout.cpp:
+        (WebCore::FixedTableLayout::layout):
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
+        * rendering/RenderTableSection.cpp:
+        (WebCore::updateLogicalHeightForCell):
+        (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
+        (WebCore::RenderTableSection::distributeExtraLogicalHeightToRows):
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::requireTransformOrigin):
+        (WebCore::RenderStyle::applyTransform):
+        * rendering/svg/RenderSVGRoot.cpp:
+        (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation):
+
</ins><span class="cx"> 2014-04-08  Xabier Rodriguez Calvar  &lt;calvaris@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Remove media controls dead code
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (166919 => 166920)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-04-08 08:15:39 UTC (rev 166919)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-04-08 08:58:43 UTC (rev 166920)
</span><span class="lines">@@ -705,11 +705,11 @@
</span><span class="cx"> static PassRef&lt;CSSValueList&gt; getBorderRadiusCornerValues(const LengthSize&amp; radius, const RenderStyle* style, RenderView* renderView)
</span><span class="cx"> {
</span><span class="cx">     auto list = CSSValueList::createSpaceSeparated();
</span><del>-    if (radius.width().type() == Percent)
</del><ins>+    if (radius.width().isPercentNotCalculated())
</ins><span class="cx">         list.get().append(cssValuePool().createValue(radius.width().percent(), CSSPrimitiveValue::CSS_PERCENTAGE));
</span><span class="cx">     else
</span><span class="cx">         list.get().append(zoomAdjustedPixelValue(valueForLength(radius.width(), 0, renderView), style));
</span><del>-    if (radius.height().type() == Percent)
</del><ins>+    if (radius.height().isPercentNotCalculated())
</ins><span class="cx">         list.get().append(cssValuePool().createValue(radius.height().percent(), CSSPrimitiveValue::CSS_PERCENTAGE));
</span><span class="cx">     else
</span><span class="cx">         list.get().append(zoomAdjustedPixelValue(valueForLength(radius.height(), 0, renderView), style));
</span><span class="lines">@@ -719,7 +719,7 @@
</span><span class="cx"> static PassRef&lt;CSSValue&gt; getBorderRadiusCornerValue(const LengthSize&amp; radius, const RenderStyle* style, RenderView* renderView)
</span><span class="cx"> {
</span><span class="cx">     if (radius.width() == radius.height()) {
</span><del>-        if (radius.width().type() == Percent)
</del><ins>+        if (radius.width().isPercentNotCalculated())
</ins><span class="cx">             return cssValuePool().createValue(radius.width().percent(), CSSPrimitiveValue::CSS_PERCENTAGE);
</span><span class="cx">         return zoomAdjustedPixelValue(valueForLength(radius.width(), 0, renderView), style);
</span><span class="cx">     }
</span><span class="lines">@@ -1452,12 +1452,13 @@
</span><span class="cx">     Length length = style-&gt;lineHeight();
</span><span class="cx">     if (length.isNegative())
</span><span class="cx">         return cssValuePool().createIdentifierValue(CSSValueNormal);
</span><del>-    if (length.isPercent())
</del><ins>+    if (length.isPercentNotCalculated()) {
</ins><span class="cx">         // This is imperfect, because it doesn't include the zoom factor and the real computation
</span><span class="cx">         // for how high to be in pixels does include things like minimum font size and the zoom factor.
</span><span class="cx">         // On the other hand, since font-size doesn't include the zoom factor, we really can't do
</span><span class="cx">         // that here either.
</span><span class="cx">         return zoomAdjustedPixelValue(static_cast&lt;int&gt;(length.percent() * style-&gt;fontDescription().specifiedSize()) / 100, style);
</span><ins>+    }
</ins><span class="cx">     return zoomAdjustedPixelValue(floatValueForLength(length, 0, renderView), style);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2164,12 +2165,12 @@
</span><span class="cx">             if (marginRight.isFixed() || !renderer || !renderer-&gt;isBox())
</span><span class="cx">                 return zoomAdjustedPixelValueForLength(marginRight, style.get());
</span><span class="cx">             float value;
</span><del>-            if (marginRight.isPercent() || marginRight.isViewportPercentage())
</del><ins>+            if (marginRight.isPercent() || marginRight.isViewportPercentage()) {
</ins><span class="cx">                 // RenderBox gives a marginRight() that is the distance between the right-edge of the child box
</span><span class="cx">                 // and the right-edge of the containing box, when display == BLOCK. Let's calculate the absolute
</span><span class="cx">                 // value of the specified margin-right % instead of relying on RenderBox's marginRight() value.
</span><span class="cx">                 value = minimumValueForLength(marginRight, toRenderBox(renderer)-&gt;containingBlockLogicalWidthForContent(), m_node-&gt;document().renderView());
</span><del>-            else
</del><ins>+            } else
</ins><span class="cx">                 value = toRenderBox(renderer)-&gt;marginRight();
</span><span class="cx">             return zoomAdjustedPixelValue(value, style.get());
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebCorecssDeprecatedStyleBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (166919 => 166920)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-04-08 08:15:39 UTC (rev 166919)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-04-08 08:58:43 UTC (rev 166920)
</span><span class="lines">@@ -443,7 +443,6 @@
</span><span class="cx">             return;
</span><span class="cx"> 
</span><span class="cx">         Length radiusWidth;
</span><del>-        Length radiusHeight;
</del><span class="cx">         if (pair-&gt;first()-&gt;isPercentage())
</span><span class="cx">             radiusWidth = Length(pair-&gt;first()-&gt;getDoubleValue(), Percent);
</span><span class="cx">         else if (pair-&gt;first()-&gt;isViewportPercentageLength())
</span><span class="lines">@@ -452,6 +451,8 @@
</span><span class="cx">             radiusWidth = Length(pair-&gt;first()-&gt;cssCalcValue()-&gt;createCalculationValue(styleResolver-&gt;style(), styleResolver-&gt;rootElementStyle(), styleResolver-&gt;style()-&gt;effectiveZoom()));
</span><span class="cx">         else
</span><span class="cx">             radiusWidth = pair-&gt;first()-&gt;computeLength&lt;Length&gt;(styleResolver-&gt;style(), styleResolver-&gt;rootElementStyle(), styleResolver-&gt;style()-&gt;effectiveZoom());
</span><ins>+
+        Length radiusHeight;
</ins><span class="cx">         if (pair-&gt;second()-&gt;isPercentage())
</span><span class="cx">             radiusHeight = Length(pair-&gt;second()-&gt;getDoubleValue(), Percent);
</span><span class="cx">         else if (pair-&gt;second()-&gt;isViewportPercentageLength())
</span><span class="lines">@@ -460,17 +461,16 @@
</span><span class="cx">             radiusHeight = Length(pair-&gt;second()-&gt;cssCalcValue()-&gt;createCalculationValue(styleResolver-&gt;style(), styleResolver-&gt;rootElementStyle(), styleResolver-&gt;style()-&gt;effectiveZoom()));
</span><span class="cx">         else
</span><span class="cx">             radiusHeight = pair-&gt;second()-&gt;computeLength&lt;Length&gt;(styleResolver-&gt;style(), styleResolver-&gt;rootElementStyle(), styleResolver-&gt;style()-&gt;effectiveZoom());
</span><del>-        int width = radiusWidth.value();
-        int height = radiusHeight.value();
-        if (width &lt; 0 || height &lt; 0)
</del><ins>+
+        if (radiusWidth.isNegative() || radiusHeight.isNegative())
</ins><span class="cx">             return;
</span><del>-        if (!width)
-            radiusHeight = radiusWidth; // Null out the other value.
-        else if (!height)
-            radiusWidth = radiusHeight; // Null out the other value.
</del><span class="cx"> 
</span><del>-        LengthSize size(radiusWidth, radiusHeight);
-        setValue(styleResolver-&gt;style(), size);
</del><ins>+        if (radiusWidth.isZero() || radiusHeight.isZero()) {
+            radiusWidth.setValue(Fixed, 0);
+            radiusHeight.setValue(Fixed, 0);
+        }
+
+        setValue(styleResolver-&gt;style(), LengthSize(radiusWidth, radiusHeight));
</ins><span class="cx">     }
</span><span class="cx">     static PropertyHandler createHandler()
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLPlugInImageElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp (166919 => 166920)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp        2014-04-08 08:15:39 UTC (rev 166919)
+++ trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp        2014-04-08 08:58:43 UTC (rev 166920)
</span><span class="lines">@@ -610,7 +610,7 @@
</span><span class="cx"> 
</span><span class="cx"> static inline bool is100Percent(Length length)
</span><span class="cx"> {
</span><del>-    return length.isPercent() &amp;&amp; length.percent() == 100;
</del><ins>+    return length.isPercentNotCalculated() &amp;&amp; length.percent() == 100;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn(const URL&amp; url)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLengthcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/Length.cpp (166919 => 166920)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/Length.cpp        2014-04-08 08:15:39 UTC (rev 166919)
+++ trunk/Source/WebCore/platform/Length.cpp        2014-04-08 08:58:43 UTC (rev 166920)
</span><span class="lines">@@ -196,7 +196,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_nextAvailableHandle);
</span><span class="cx"> 
</span><del>-    // The leakRef below is balanced by the deref in the deref member function.
</del><ins>+    // The leakRef below is balanced by the adoptRef in the deref member function.
</ins><span class="cx">     Entry leakedValue = value.leakRef();
</span><span class="cx"> 
</span><span class="cx">     // FIXME: This monotonically increasing handle generation scheme is potentially wasteful
</span><span class="lines">@@ -231,8 +231,9 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    // The deref below is balanced by the leakRef in the insert member function.
-    it-&gt;value.value-&gt;deref();
</del><ins>+    // The adoptRef here is balanced by the leakRef in the insert member function.
+    Ref&lt;CalculationValue&gt; value { adoptRef(*it-&gt;value.value) };
+
</ins><span class="cx">     m_map.remove(it);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLengthh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/Length.h (166919 => 166920)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/Length.h        2014-04-08 08:15:39 UTC (rev 166919)
+++ trunk/Source/WebCore/platform/Length.h        2014-04-08 08:58:43 UTC (rev 166920)
</span><span class="lines">@@ -84,6 +84,7 @@
</span><span class="cx">     bool isFixed() const;
</span><span class="cx">     bool isMaxContent() const;
</span><span class="cx">     bool isMinContent() const;
</span><ins>+    bool isPercentNotCalculated() const; // FIXME: Rename to isPercent.
</ins><span class="cx">     bool isRelative() const;
</span><span class="cx">     bool isUndefined() const;
</span><span class="cx"> 
</span><span class="lines">@@ -97,11 +98,7 @@
</span><span class="cx">     bool isPositive() const;
</span><span class="cx">     bool isNegative() const;
</span><span class="cx"> 
</span><del>-    // Returns true for both Percent and Calculated.
-    // FIXME: Doesn't really seem OK to return true for Calculated given this function's name,
-    // even though all calculated values are treated as percentages. Callers can tell Percent
-    // from a Calculated already by looking at type, so this function only half-hides the distinction.
-    bool isPercent() const;
</del><ins>+    bool isPercent() const; // Returns true for both Percent and Calculated. FIXME: Find a better name for this.
</ins><span class="cx"> 
</span><span class="cx">     bool isIntrinsic() const;
</span><span class="cx">     bool isIntrinsicOrAuto() const;
</span><span class="lines">@@ -262,7 +259,7 @@
</span><span class="cx"> 
</span><span class="cx"> inline float Length::percent() const
</span><span class="cx"> {
</span><del>-    ASSERT(isPercent());
</del><ins>+    ASSERT(isPercentNotCalculated());
</ins><span class="cx">     return value();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -341,6 +338,11 @@
</span><span class="cx">     return m_isFloat ? (m_floatValue &lt; 0) : (m_intValue &lt; 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline bool Length::isPercentNotCalculated() const
+{
+    return type() == Percent;
+}
+
</ins><span class="cx"> inline bool Length::isRelative() const
</span><span class="cx"> {
</span><span class="cx">     return type() == Relative;
</span><span class="lines">@@ -353,7 +355,7 @@
</span><span class="cx"> 
</span><span class="cx"> inline bool Length::isPercent() const
</span><span class="cx"> {
</span><del>-    return type() == Percent || isCalculated();
</del><ins>+    return isPercentNotCalculated() || isCalculated();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline bool Length::isPositive() const
</span><span class="lines">@@ -395,7 +397,7 @@
</span><span class="cx"> 
</span><span class="cx"> inline bool Length::isSpecified() const
</span><span class="cx"> {
</span><del>-    return isFixed() || type() == Percent || isCalculated() || isViewportPercentage();
</del><ins>+    return isFixed() || isPercent() || isViewportPercentage();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline bool Length::isSpecifiedOrIntrinsic() const
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstransformsTranslateTransformOperationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.h (166919 => 166920)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.h        2014-04-08 08:15:39 UTC (rev 166919)
+++ trunk/Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.h        2014-04-08 08:58:43 UTC (rev 166920)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx">     virtual bool apply(TransformationMatrix&amp; transform, const FloatSize&amp; borderBoxSize) const
</span><span class="cx">     {
</span><span class="cx">         transform.translate3d(x(borderBoxSize), y(borderBoxSize), z(borderBoxSize));
</span><del>-        return m_x.type() == Percent || m_y.type() == Percent;
</del><ins>+        return m_x.isPercentNotCalculated() || m_y.isPercentNotCalculated();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     virtual PassRefPtr&lt;TransformOperation&gt; blend(const TransformOperation* from, double progress, bool blendToIdentity = false);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingAutoTableLayoutcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/AutoTableLayout.cpp (166919 => 166920)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/AutoTableLayout.cpp        2014-04-08 08:15:39 UTC (rev 166919)
+++ trunk/Source/WebCore/rendering/AutoTableLayout.cpp        2014-04-08 08:58:43 UTC (rev 166920)
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx">                         break;
</span><span class="cx">                     case Percent:
</span><span class="cx">                         m_hasPercent = true;
</span><del>-                        if (cellLogicalWidth.isPositive() &amp;&amp; (!columnLayout.logicalWidth.isPercent() || cellLogicalWidth.value() &gt; columnLayout.logicalWidth.value()))
</del><ins>+                        if (cellLogicalWidth.isPositive() &amp;&amp; (!columnLayout.logicalWidth.isPercentNotCalculated() || cellLogicalWidth.percent() &gt; columnLayout.logicalWidth.percent()))
</ins><span class="cx">                             columnLayout.logicalWidth = cellLogicalWidth;
</span><span class="cx">                         break;
</span><span class="cx">                     case Relative:
</span><span class="lines">@@ -229,8 +229,8 @@
</span><span class="cx">         minWidth += m_layoutStruct[i].effectiveMinLogicalWidth;
</span><span class="cx">         maxWidth += m_layoutStruct[i].effectiveMaxLogicalWidth;
</span><span class="cx">         if (scaleColumns) {
</span><del>-            if (m_layoutStruct[i].effectiveLogicalWidth.isPercent()) {
-                float percent = std::min(static_cast&lt;float&gt;(m_layoutStruct[i].effectiveLogicalWidth.percent()), remainingPercent);
</del><ins>+            if (m_layoutStruct[i].effectiveLogicalWidth.isPercentNotCalculated()) {
+                float percent = std::min(m_layoutStruct[i].effectiveLogicalWidth.percent(), remainingPercent);
</ins><span class="cx">                 float logicalWidth = static_cast&lt;float&gt;(m_layoutStruct[i].effectiveMaxLogicalWidth) * 100 / std::max(percent, epsilon);
</span><span class="cx">                 maxPercent = std::max(logicalWidth,  maxPercent);
</span><span class="cx">                 remainingPercent -= percent;
</span><span class="lines">@@ -322,7 +322,7 @@
</span><span class="cx">                 //   &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td colspan=2&gt;2-3&lt;/tr&gt;
</span><span class="cx">                 //   &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td colspan=2 width=100%&gt;2-3&lt;/td&gt;&lt;/tr&gt;
</span><span class="cx">                 // &lt;/table&gt;
</span><del>-                if (!columnLayout.effectiveLogicalWidth.isPercent()) {
</del><ins>+                if (!columnLayout.effectiveLogicalWidth.isPercentNotCalculated()) {
</ins><span class="cx">                     columnLayout.effectiveLogicalWidth = Length();
</span><span class="cx">                     allColsArePercent = false;
</span><span class="cx">                 } else
</span><span class="lines">@@ -340,7 +340,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // adjust table max width if needed
</span><del>-        if (cellLogicalWidth.isPercent()) {
</del><ins>+        if (cellLogicalWidth.isPercentNotCalculated()) {
</ins><span class="cx">             if (totalPercent &gt; cellLogicalWidth.percent() || allColsArePercent) {
</span><span class="cx">                 // can't satify this condition, treat as variable
</span><span class="cx">                 cellLogicalWidth = Length();
</span><span class="lines">@@ -383,9 +383,9 @@
</span><span class="cx">                 int allocatedMinLogicalWidth = 0;
</span><span class="cx">                 int allocatedMaxLogicalWidth = 0;
</span><span class="cx">                 for (unsigned pos = effCol; pos &lt; lastCol; ++pos) {
</span><del>-                    ASSERT(m_layoutStruct[pos].logicalWidth.isPercent() || m_layoutStruct[pos].effectiveLogicalWidth.isPercent());
</del><ins>+                    ASSERT(m_layoutStruct[pos].logicalWidth.isPercentNotCalculated() || m_layoutStruct[pos].effectiveLogicalWidth.isPercentNotCalculated());
</ins><span class="cx">                     // |allColsArePercent| means that either the logicalWidth *or* the effectiveLogicalWidth are percents, handle both of them here.
</span><del>-                    float percent = m_layoutStruct[pos].logicalWidth.isPercent() ? m_layoutStruct[pos].logicalWidth.percent() : m_layoutStruct[pos].effectiveLogicalWidth.percent();
</del><ins>+                    float percent = m_layoutStruct[pos].logicalWidth.isPercentNotCalculated() ? m_layoutStruct[pos].logicalWidth.percent() : m_layoutStruct[pos].effectiveLogicalWidth.percent();
</ins><span class="cx">                     int columnMinLogicalWidth = static_cast&lt;int&gt;(percent * cellMinLogicalWidth / totalPercent);
</span><span class="cx">                     int columnMaxLogicalWidth = static_cast&lt;int&gt;(percent * cellMaxLogicalWidth / totalPercent);
</span><span class="cx">                     m_layoutStruct[pos].effectiveMinLogicalWidth = std::max(m_layoutStruct[pos].effectiveMinLogicalWidth, columnMinLogicalWidth);
</span><span class="lines">@@ -619,7 +619,7 @@
</span><span class="cx">     if (available &gt; 0 &amp;&amp; m_hasPercent &amp;&amp; totalPercent &lt; 100) {
</span><span class="cx">         for (size_t i = 0; i &lt; nEffCols; ++i) {
</span><span class="cx">             Length&amp; logicalWidth = m_layoutStruct[i].effectiveLogicalWidth;
</span><del>-            if (logicalWidth.isPercent()) {
</del><ins>+            if (logicalWidth.isPercentNotCalculated()) {
</ins><span class="cx">                 int cellLogicalWidth = available * logicalWidth.percent() / totalPercent;
</span><span class="cx">                 available -= cellLogicalWidth;
</span><span class="cx">                 totalPercent -= logicalWidth.percent();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingFixedTableLayoutcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/FixedTableLayout.cpp (166919 => 166920)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/FixedTableLayout.cpp        2014-04-08 08:15:39 UTC (rev 166919)
+++ trunk/Source/WebCore/rendering/FixedTableLayout.cpp        2014-04-08 08:58:43 UTC (rev 166920)
</span><span class="lines">@@ -225,7 +225,7 @@
</span><span class="cx">         if (m_width[i].isFixed()) {
</span><span class="cx">             calcWidth[i] = m_width[i].value();
</span><span class="cx">             totalFixedWidth += calcWidth[i];
</span><del>-        } else if (m_width[i].isPercent()) {
</del><ins>+        } else if (m_width[i].isPercentNotCalculated()) {
</ins><span class="cx">             calcWidth[i] = valueForLength(m_width[i], tableLogicalWidth);
</span><span class="cx">             totalPercentWidth += calcWidth[i];
</span><span class="cx">             totalPercent += m_width[i].percent();
</span><span class="lines">@@ -254,7 +254,7 @@
</span><span class="cx">             if (totalPercent) {
</span><span class="cx">                 totalPercentWidth = 0;
</span><span class="cx">                 for (unsigned i = 0; i &lt; nEffCols; i++) {
</span><del>-                    if (m_width[i].isPercent()) {
</del><ins>+                    if (m_width[i].isPercentNotCalculated()) {
</ins><span class="cx">                         calcWidth[i] = m_width[i].percent() * (tableLogicalWidth - totalFixedWidth) / totalPercent;
</span><span class="cx">                         totalPercentWidth += calcWidth[i];
</span><span class="cx">                     }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxModelObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (166919 => 166920)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp        2014-04-08 08:15:39 UTC (rev 166919)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp        2014-04-08 08:58:43 UTC (rev 166920)
</span><span class="lines">@@ -892,7 +892,7 @@
</span><span class="cx">     // that establishes the coordinate system for the 'background-position' property. 
</span><span class="cx">     
</span><span class="cx">     // FIXME: Remove unnecessary rounding when layout is off ints: webkit.org/b/63656
</span><del>-    if (intrinsicWidth.isPercent() &amp;&amp; intrinsicHeight.isPercent() &amp;&amp; intrinsicRatio.isEmpty()) {
</del><ins>+    if (intrinsicWidth.isPercentNotCalculated() &amp;&amp; intrinsicHeight.isPercentNotCalculated() &amp;&amp; intrinsicRatio.isEmpty()) {
</ins><span class="cx">         // Resolve width/height percentages against positioningAreaSize, only if no intrinsic ratio is provided.
</span><span class="cx">         float resolvedWidth = positioningAreaSize.width() * intrinsicWidth.percent() / 100;
</span><span class="cx">         float resolvedHeight = positioningAreaSize.height() * intrinsicHeight.percent() / 100;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTableSectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTableSection.cpp (166919 => 166920)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTableSection.cpp        2014-04-08 08:15:39 UTC (rev 166919)
+++ trunk/Source/WebCore/rendering/RenderTableSection.cpp        2014-04-08 08:58:43 UTC (rev 166920)
</span><span class="lines">@@ -65,12 +65,11 @@
</span><span class="cx">         Length cRowLogicalHeight = row.logicalHeight;
</span><span class="cx">         switch (logicalHeight.type()) {
</span><span class="cx">         case Percent:
</span><del>-            if (!(cRowLogicalHeight.isPercent())
-                || (cRowLogicalHeight.isPercent() &amp;&amp; cRowLogicalHeight.percent() &lt; logicalHeight.percent()))
</del><ins>+            if (!cRowLogicalHeight.isPercentNotCalculated() || cRowLogicalHeight.percent() &lt; logicalHeight.percent())
</ins><span class="cx">                 row.logicalHeight = logicalHeight;
</span><span class="cx">             break;
</span><span class="cx">         case Fixed:
</span><del>-            if (cRowLogicalHeight.type() &lt; Percent
</del><ins>+            if (cRowLogicalHeight.isAuto() || cRowLogicalHeight.isRelative()
</ins><span class="cx">                 || (cRowLogicalHeight.isFixed() &amp;&amp; cRowLogicalHeight.value() &lt; logicalHeight.value()))
</span><span class="cx">                 row.logicalHeight = logicalHeight;
</span><span class="cx">             break;
</span><span class="lines">@@ -435,7 +434,7 @@
</span><span class="cx">     totalPercent = std::min(totalPercent, 100);
</span><span class="cx">     int rowHeight = m_rowPos[1] - m_rowPos[0];
</span><span class="cx">     for (unsigned r = 0; r &lt; totalRows; ++r) {
</span><del>-        if (totalPercent &gt; 0 &amp;&amp; m_grid[r].logicalHeight.isPercent()) {
</del><ins>+        if (totalPercent &gt; 0 &amp;&amp; m_grid[r].logicalHeight.isPercentNotCalculated()) {
</ins><span class="cx">             int toAdd = std::min&lt;int&gt;(extraLogicalHeight, (totalHeight * m_grid[r].logicalHeight.percent() / 100) - rowHeight);
</span><span class="cx">             // If toAdd is negative, then we don't want to shrink the row (this bug
</span><span class="cx">             // affected Outlook Web Access).
</span><span class="lines">@@ -507,7 +506,7 @@
</span><span class="cx">     for (unsigned r = 0; r &lt; totalRows; r++) {
</span><span class="cx">         if (m_grid[r].logicalHeight.isAuto())
</span><span class="cx">             ++autoRowsCount;
</span><del>-        else if (m_grid[r].logicalHeight.isPercent())
</del><ins>+        else if (m_grid[r].logicalHeight.isPercentNotCalculated())
</ins><span class="cx">             totalPercent += m_grid[r].logicalHeight.percent();
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (166919 => 166920)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2014-04-08 08:15:39 UTC (rev 166919)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2014-04-08 08:58:43 UTC (rev 166920)
</span><span class="lines">@@ -932,7 +932,7 @@
</span><span class="cx">     return rareNonInheritedData-&gt;m_altText;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline bool requireTransformOrigin(const Vector&lt;RefPtr&lt;TransformOperation&gt;&gt;&amp; transformOperations, RenderStyle::ApplyTransformOrigin applyOrigin)
</del><ins>+static inline bool requireTransformOrigin(const Vector&lt;RefPtr&lt;TransformOperation&gt;&gt;&amp; transformOperations, RenderStyle::ApplyTransformOrigin applyOrigin)
</ins><span class="cx"> {
</span><span class="cx">     // transform-origin brackets the transform with translate operations.
</span><span class="cx">     // Optimize for the case where the only transform is a translation, since the transform-origin is irrelevant
</span><span class="lines">@@ -940,9 +940,8 @@
</span><span class="cx">     if (applyOrigin != RenderStyle::IncludeTransformOrigin)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    unsigned size = transformOperations.size();
-    for (unsigned i = 0; i &lt; size; ++i) {
-        TransformOperation::OperationType type = transformOperations[i]-&gt;type();
</del><ins>+    for (auto&amp; operation : transformOperations) {
+        TransformOperation::OperationType type = operation-&gt;type();
</ins><span class="cx">         if (type != TransformOperation::TRANSLATE_X
</span><span class="cx">             &amp;&amp; type != TransformOperation::TRANSLATE_Y
</span><span class="cx">             &amp;&amp; type != TransformOperation::TRANSLATE 
</span><span class="lines">@@ -950,28 +949,27 @@
</span><span class="cx">             &amp;&amp; type != TransformOperation::TRANSLATE_3D)
</span><span class="cx">             return true;
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderStyle::applyTransform(TransformationMatrix&amp; transform, const FloatRect&amp; boundingBox, ApplyTransformOrigin applyOrigin) const
</span><span class="cx"> {
</span><del>-    const Vector&lt;RefPtr&lt;TransformOperation&gt;&gt;&amp; transformOperations = rareNonInheritedData-&gt;m_transform-&gt;m_operations.operations();
-    bool applyTransformOrigin = requireTransformOrigin(transformOperations, applyOrigin);
-    
-    float offsetX = transformOriginX().type() == Percent ? boundingBox.x() : 0;
-    float offsetY = transformOriginY().type() == Percent ? boundingBox.y() : 0;
-    
</del><ins>+    auto&amp; operations = rareNonInheritedData-&gt;m_transform-&gt;m_operations.operations();
+    bool applyTransformOrigin = requireTransformOrigin(operations, applyOrigin);
+
+    float offsetX = transformOriginX().isPercentNotCalculated() ? boundingBox.x() : 0;
+    float offsetY = transformOriginY().isPercentNotCalculated() ? boundingBox.y() : 0;
+
</ins><span class="cx">     if (applyTransformOrigin) {
</span><span class="cx">         transform.translate3d(floatValueForLength(transformOriginX(), boundingBox.width()) + offsetX,
</span><span class="cx">                               floatValueForLength(transformOriginY(), boundingBox.height()) + offsetY,
</span><span class="cx">                               transformOriginZ());
</span><span class="cx">     }
</span><del>-    
-    unsigned size = transformOperations.size();
-    for (unsigned i = 0; i &lt; size; ++i)
-        transformOperations[i]-&gt;apply(transform, boundingBox.size());
-    
</del><ins>+
+    for (auto&amp; operation : operations)
+        operation-&gt;apply(transform, boundingBox.size());
+
</ins><span class="cx">     if (applyTransformOrigin) {
</span><span class="cx">         transform.translate3d(-floatValueForLength(transformOriginX(), boundingBox.width()) - offsetX,
</span><span class="cx">                               -floatValueForLength(transformOriginY(), boundingBox.height()) - offsetY,
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGRootcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp (166919 => 166920)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp        2014-04-08 08:15:39 UTC (rev 166919)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp        2014-04-08 08:58:43 UTC (rev 166920)
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx"> 
</span><span class="cx">     // If our intrinsic size is in percentage units, return those to the caller through the intrinsicSize. Notify the caller
</span><span class="cx">     // about the special situation, by setting isPercentageIntrinsicSize=true, so it knows how to interpret the return values.
</span><del>-    if (intrinsicWidthAttribute.isPercent() &amp;&amp; intrinsicHeightAttribute.isPercent()) {
</del><ins>+    if (intrinsicWidthAttribute.isPercentNotCalculated() &amp;&amp; intrinsicHeightAttribute.isPercentNotCalculated()) {
</ins><span class="cx">         isPercentageIntrinsicSize = true;
</span><span class="cx">         intrinsicSize = FloatSize(intrinsicWidthAttribute.percent(), intrinsicHeightAttribute.percent());
</span><span class="cx">     }
</span></span></pre>
</div>
</div>

</body>
</html>