<!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>[175487] 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/175487">175487</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2014-11-03 12:48:23 -0800 (Mon, 03 Nov 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Support modern range loops over CSSValueList
https://bugs.webkit.org/show_bug.cgi?id=138285

Reviewed by Andreas Kling.

Add support for modern range loops over CSSValueList objects.
Port the code base to using range loops for CSSValueList objects and
drop the CSSValueListInspector / CSSValueListIterator classes as they
are no longer needed.

No new tests, no behavior change.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSToStyleMapcpp">trunk/Source/WebCore/css/CSSToStyleMap.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSToStyleMaph">trunk/Source/WebCore/css/CSSToStyleMap.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueListh">trunk/Source/WebCore/css/CSSValueList.h</a></li>
<li><a href="#trunkSourceWebCorecssDeprecatedStyleBuildercpp">trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderConverterh">trunk/Source/WebCore/css/StyleBuilderConverter.h</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderCustomh">trunk/Source/WebCore/css/StyleBuilderCustom.h</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolvercpp">trunk/Source/WebCore/css/StyleResolver.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolverh">trunk/Source/WebCore/css/StyleResolver.h</a></li>
<li><a href="#trunkSourceWebCorecssTransformFunctionscpp">trunk/Source/WebCore/css/TransformFunctions.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (175486 => 175487)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-11-03 20:41:08 UTC (rev 175486)
+++ trunk/Source/WebCore/ChangeLog        2014-11-03 20:48:23 UTC (rev 175487)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-11-03  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Support modern range loops over CSSValueList
+        https://bugs.webkit.org/show_bug.cgi?id=138285
+
+        Reviewed by Andreas Kling.
+
+        Add support for modern range loops over CSSValueList objects.
+        Port the code base to using range loops for CSSValueList objects and
+        drop the CSSValueListInspector / CSSValueListIterator classes as they
+        are no longer needed.
+
+        No new tests, no behavior change.
+
</ins><span class="cx"> 2014-11-03  Andreas Kling  &lt;akling@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         RenderCounter shouldn't need a pre-destructor hook.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSToStyleMapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSToStyleMap.cpp (175486 => 175487)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSToStyleMap.cpp        2014-11-03 20:41:08 UTC (rev 175486)
+++ trunk/Source/WebCore/css/CSSToStyleMap.cpp        2014-11-03 20:48:23 UTC (rev 175487)
</span><span class="lines">@@ -30,6 +30,9 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;Animation.h&quot;
</span><span class="cx"> #include &quot;CSSBorderImageSliceValue.h&quot;
</span><ins>+#include &quot;CSSImageGeneratorValue.h&quot;
+#include &quot;CSSImageSetValue.h&quot;
+#include &quot;CSSImageValue.h&quot;
</ins><span class="cx"> #include &quot;CSSPrimitiveValue.h&quot;
</span><span class="cx"> #include &quot;CSSPrimitiveValueMappings.h&quot;
</span><span class="cx"> #include &quot;CSSTimingFunctionValue.h&quot;
</span><span class="lines">@@ -62,7 +65,7 @@
</span><span class="cx">     return m_resolver-&gt;useSVGZoomRules();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;StyleImage&gt; CSSToStyleMap::styleImage(CSSPropertyID propertyId, CSSValue* value)
</del><ins>+PassRefPtr&lt;StyleImage&gt; CSSToStyleMap::styleImage(CSSPropertyID propertyId, CSSValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     return m_resolver-&gt;styleImage(propertyId, value);
</span><span class="cx"> }
</span><span class="lines">@@ -156,7 +159,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    layer-&gt;setImage(styleImage(property, value));
</del><ins>+    layer-&gt;setImage(styleImage(property, *value));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CSSToStyleMap::mapFillRepeatX(CSSPropertyID, FillLayer* layer, CSSValue* value)
</span><span class="lines">@@ -322,32 +325,30 @@
</span><span class="cx">     layer-&gt;setMaskSourceType(type);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSToStyleMap::mapAnimationDelay(Animation* animation, CSSValue* value)
</del><ins>+void CSSToStyleMap::mapAnimationDelay(Animation* animation, CSSValue&amp; value)
</ins><span class="cx"> {
</span><del>-    if (value-&gt;isInitialValue()) {
</del><ins>+    if (value.isInitialValue()) {
</ins><span class="cx">         animation-&gt;setDelay(Animation::initialAnimationDelay());
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!is&lt;CSSPrimitiveValue&gt;(*value))
</del><ins>+    if (!is&lt;CSSPrimitiveValue&gt;(value))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*value);
-    animation-&gt;setDelay(primitiveValue.computeTime&lt;double, CSSPrimitiveValue::Seconds&gt;());
</del><ins>+    animation-&gt;setDelay(downcast&lt;CSSPrimitiveValue&gt;(value).computeTime&lt;double, CSSPrimitiveValue::Seconds&gt;());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSToStyleMap::mapAnimationDirection(Animation* layer, CSSValue* value)
</del><ins>+void CSSToStyleMap::mapAnimationDirection(Animation* layer, CSSValue&amp; value)
</ins><span class="cx"> {
</span><del>-    if (value-&gt;isInitialValue()) {
</del><ins>+    if (value.isInitialValue()) {
</ins><span class="cx">         layer-&gt;setDirection(Animation::initialAnimationDirection());
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!is&lt;CSSPrimitiveValue&gt;(*value))
</del><ins>+    if (!is&lt;CSSPrimitiveValue&gt;(value))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*value);
-    switch (primitiveValue.getValueID()) {
</del><ins>+    switch (downcast&lt;CSSPrimitiveValue&gt;(value).getValueID()) {
</ins><span class="cx">     case CSSValueNormal:
</span><span class="cx">         layer-&gt;setDirection(Animation::AnimationDirectionNormal);
</span><span class="cx">         break;
</span><span class="lines">@@ -365,32 +366,30 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSToStyleMap::mapAnimationDuration(Animation* animation, CSSValue* value)
</del><ins>+void CSSToStyleMap::mapAnimationDuration(Animation* animation, CSSValue&amp; value)
</ins><span class="cx"> {
</span><del>-    if (value-&gt;isInitialValue()) {
</del><ins>+    if (value.isInitialValue()) {
</ins><span class="cx">         animation-&gt;setDuration(Animation::initialAnimationDuration());
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!is&lt;CSSPrimitiveValue&gt;(*value))
</del><ins>+    if (!is&lt;CSSPrimitiveValue&gt;(value))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*value);
-    animation-&gt;setDuration(primitiveValue.computeTime&lt;double, CSSPrimitiveValue::Seconds&gt;());
</del><ins>+    animation-&gt;setDuration(downcast&lt;CSSPrimitiveValue&gt;(value).computeTime&lt;double, CSSPrimitiveValue::Seconds&gt;());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSToStyleMap::mapAnimationFillMode(Animation* layer, CSSValue* value)
</del><ins>+void CSSToStyleMap::mapAnimationFillMode(Animation* layer, CSSValue&amp; value)
</ins><span class="cx"> {
</span><del>-    if (value-&gt;isInitialValue()) {
</del><ins>+    if (value.isInitialValue()) {
</ins><span class="cx">         layer-&gt;setFillMode(Animation::initialAnimationFillMode());
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!is&lt;CSSPrimitiveValue&gt;(*value))
</del><ins>+    if (!is&lt;CSSPrimitiveValue&gt;(value))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*value);
-    switch (primitiveValue.getValueID()) {
</del><ins>+    switch (downcast&lt;CSSPrimitiveValue&gt;(value).getValueID()) {
</ins><span class="cx">     case CSSValueNone:
</span><span class="cx">         layer-&gt;setFillMode(AnimationFillModeNone);
</span><span class="cx">         break;
</span><span class="lines">@@ -408,67 +407,66 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSToStyleMap::mapAnimationIterationCount(Animation* animation, CSSValue* value)
</del><ins>+void CSSToStyleMap::mapAnimationIterationCount(Animation* animation, CSSValue&amp; value)
</ins><span class="cx"> {
</span><del>-    if (value-&gt;isInitialValue()) {
</del><ins>+    if (value.isInitialValue()) {
</ins><span class="cx">         animation-&gt;setIterationCount(Animation::initialAnimationIterationCount());
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!is&lt;CSSPrimitiveValue&gt;(*value))
</del><ins>+    if (!is&lt;CSSPrimitiveValue&gt;(value))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*value);
</del><ins>+    auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
</ins><span class="cx">     if (primitiveValue.getValueID() == CSSValueInfinite)
</span><span class="cx">         animation-&gt;setIterationCount(Animation::IterationCountInfinite);
</span><span class="cx">     else
</span><span class="cx">         animation-&gt;setIterationCount(primitiveValue.getFloatValue());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSToStyleMap::mapAnimationName(Animation* layer, CSSValue* value)
</del><ins>+void CSSToStyleMap::mapAnimationName(Animation* layer, CSSValue&amp; value)
</ins><span class="cx"> {
</span><del>-    if (value-&gt;isInitialValue()) {
</del><ins>+    if (value.isInitialValue()) {
</ins><span class="cx">         layer-&gt;setName(Animation::initialAnimationName());
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!is&lt;CSSPrimitiveValue&gt;(*value))
</del><ins>+    if (!is&lt;CSSPrimitiveValue&gt;(value))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*value);
</del><ins>+    auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
</ins><span class="cx">     if (primitiveValue.getValueID() == CSSValueNone)
</span><span class="cx">         layer-&gt;setIsNoneAnimation(true);
</span><span class="cx">     else
</span><span class="cx">         layer-&gt;setName(primitiveValue.getStringValue());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSToStyleMap::mapAnimationPlayState(Animation* layer, CSSValue* value)
</del><ins>+void CSSToStyleMap::mapAnimationPlayState(Animation* layer, CSSValue&amp; value)
</ins><span class="cx"> {
</span><del>-    if (value-&gt;isInitialValue()) {
</del><ins>+    if (value.isInitialValue()) {
</ins><span class="cx">         layer-&gt;setPlayState(Animation::initialAnimationPlayState());
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!is&lt;CSSPrimitiveValue&gt;(*value))
</del><ins>+    if (!is&lt;CSSPrimitiveValue&gt;(value))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*value);
-    EAnimPlayState playState = (primitiveValue.getValueID() == CSSValuePaused) ? AnimPlayStatePaused : AnimPlayStatePlaying;
</del><ins>+    EAnimPlayState playState = (downcast&lt;CSSPrimitiveValue&gt;(value).getValueID() == CSSValuePaused) ? AnimPlayStatePaused : AnimPlayStatePlaying;
</ins><span class="cx">     layer-&gt;setPlayState(playState);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSToStyleMap::mapAnimationProperty(Animation* animation, CSSValue* value)
</del><ins>+void CSSToStyleMap::mapAnimationProperty(Animation* animation, CSSValue&amp; value)
</ins><span class="cx"> {
</span><del>-    if (value-&gt;isInitialValue()) {
</del><ins>+    if (value.isInitialValue()) {
</ins><span class="cx">         animation-&gt;setAnimationMode(Animation::AnimateAll);
</span><span class="cx">         animation-&gt;setProperty(CSSPropertyInvalid);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!is&lt;CSSPrimitiveValue&gt;(*value))
</del><ins>+    if (!is&lt;CSSPrimitiveValue&gt;(value))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*value);
</del><ins>+    auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
</ins><span class="cx">     if (primitiveValue.getValueID() == CSSValueAll) {
</span><span class="cx">         animation-&gt;setAnimationMode(Animation::AnimateAll);
</span><span class="cx">         animation-&gt;setProperty(CSSPropertyInvalid);
</span><span class="lines">@@ -481,16 +479,15 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSToStyleMap::mapAnimationTimingFunction(Animation* animation, CSSValue* value)
</del><ins>+void CSSToStyleMap::mapAnimationTimingFunction(Animation* animation, CSSValue&amp; value)
</ins><span class="cx"> {
</span><del>-    if (value-&gt;isInitialValue()) {
</del><ins>+    if (value.isInitialValue()) {
</ins><span class="cx">         animation-&gt;setTimingFunction(Animation::initialAnimationTimingFunction());
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (is&lt;CSSPrimitiveValue&gt;(*value)) {
-        CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*value);
-        switch (primitiveValue.getValueID()) {
</del><ins>+    if (is&lt;CSSPrimitiveValue&gt;(value)) {
+        switch (downcast&lt;CSSPrimitiveValue&gt;(value).getValueID()) {
</ins><span class="cx">         case CSSValueLinear:
</span><span class="cx">             animation-&gt;setTimingFunction(LinearTimingFunction::create());
</span><span class="cx">             break;
</span><span class="lines">@@ -518,11 +515,11 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (is&lt;CSSCubicBezierTimingFunctionValue&gt;(*value)) {
-        CSSCubicBezierTimingFunctionValue&amp; cubicTimingFunction = downcast&lt;CSSCubicBezierTimingFunctionValue&gt;(*value);
</del><ins>+    if (is&lt;CSSCubicBezierTimingFunctionValue&gt;(value)) {
+        auto&amp; cubicTimingFunction = downcast&lt;CSSCubicBezierTimingFunctionValue&gt;(value);
</ins><span class="cx">         animation-&gt;setTimingFunction(CubicBezierTimingFunction::create(cubicTimingFunction.x1(), cubicTimingFunction.y1(), cubicTimingFunction.x2(), cubicTimingFunction.y2()));
</span><del>-    } else if (is&lt;CSSStepsTimingFunctionValue&gt;(*value)) {
-        CSSStepsTimingFunctionValue&amp; stepsTimingFunction = downcast&lt;CSSStepsTimingFunctionValue&gt;(*value);
</del><ins>+    } else if (is&lt;CSSStepsTimingFunctionValue&gt;(value)) {
+        auto&amp; stepsTimingFunction = downcast&lt;CSSStepsTimingFunctionValue&gt;(value);
</ins><span class="cx">         animation-&gt;setTimingFunction(StepsTimingFunction::create(stepsTimingFunction.numberOfSteps(), stepsTimingFunction.stepAtStart()));
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -545,33 +542,31 @@
</span><span class="cx">     else
</span><span class="cx">         imageProperty = property;
</span><span class="cx"> 
</span><del>-    for (unsigned i = 0 ; i &lt; borderImage.length(); ++i) {
-        CSSValue* current = borderImage.item(i);
-
-        if (current-&gt;isImageValue() || current-&gt;isImageGeneratorValue()
</del><ins>+    for (auto&amp; current : borderImage) {
+        if (is&lt;CSSImageValue&gt;(current.get()) || is&lt;CSSImageGeneratorValue&gt;(current.get())
</ins><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><del>-            || current-&gt;isImageSetValue()
</del><ins>+            || is&lt;CSSImageSetValue&gt;(current.get())
</ins><span class="cx"> #endif
</span><span class="cx">             )
</span><del>-            image.setImage(styleImage(imageProperty, current));
-        else if (current-&gt;isBorderImageSliceValue())
-            mapNinePieceImageSlice(current, image);
-        else if (is&lt;CSSValueList&gt;(*current)) {
-            CSSValueList&amp; slashList = downcast&lt;CSSValueList&gt;(*current);
</del><ins>+            image.setImage(styleImage(imageProperty, current.get()));
+        else if (is&lt;CSSBorderImageSliceValue&gt;(current.get()))
+            mapNinePieceImageSlice(current.get(), image);
+        else if (is&lt;CSSValueList&gt;(current.get())) {
+            CSSValueList&amp; slashList = downcast&lt;CSSValueList&gt;(current.get());
</ins><span class="cx">             // Map in the image slices.
</span><del>-            if (slashList.item(0) &amp;&amp; slashList.item(0)-&gt;isBorderImageSliceValue())
-                mapNinePieceImageSlice(slashList.item(0), image);
</del><ins>+            if (is&lt;CSSBorderImageSliceValue&gt;(slashList.item(0)))
+                mapNinePieceImageSlice(*slashList.item(0), image);
</ins><span class="cx"> 
</span><span class="cx">             // Map in the border slices.
</span><span class="cx">             if (slashList.item(1))
</span><del>-                image.setBorderSlices(mapNinePieceImageQuad(slashList.item(1)));
</del><ins>+                image.setBorderSlices(mapNinePieceImageQuad(*slashList.item(1)));
</ins><span class="cx"> 
</span><span class="cx">             // Map in the outset.
</span><span class="cx">             if (slashList.item(2))
</span><del>-                image.setOutset(mapNinePieceImageQuad(slashList.item(2)));
-        } else if (current-&gt;isPrimitiveValue()) {
</del><ins>+                image.setOutset(mapNinePieceImageQuad(*slashList.item(2)));
+        } else if (is&lt;CSSPrimitiveValue&gt;(current.get())) {
</ins><span class="cx">             // Set the appropriate rules for stretch/round/repeat of the slices.
</span><del>-            mapNinePieceImageRepeat(current, image);
</del><ins>+            mapNinePieceImageRepeat(current.get(), image);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -590,13 +585,13 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSToStyleMap::mapNinePieceImageSlice(CSSValue* value, NinePieceImage&amp; image)
</del><ins>+void CSSToStyleMap::mapNinePieceImageSlice(CSSValue&amp; value, NinePieceImage&amp; image)
</ins><span class="cx"> {
</span><span class="cx">     if (!is&lt;CSSBorderImageSliceValue&gt;(value))
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // Retrieve the border image value.
</span><del>-    CSSBorderImageSliceValue&amp; borderImageSlice = downcast&lt;CSSBorderImageSliceValue&gt;(*value);
</del><ins>+    auto&amp; borderImageSlice = downcast&lt;CSSBorderImageSliceValue&gt;(value);
</ins><span class="cx"> 
</span><span class="cx">     // Set up a length box to represent our image slices.
</span><span class="cx">     LengthBox box;
</span><span class="lines">@@ -623,7 +618,7 @@
</span><span class="cx">     image.setFill(borderImageSlice.m_fill);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LengthBox CSSToStyleMap::mapNinePieceImageQuad(CSSValue* value)
</del><ins>+LengthBox CSSToStyleMap::mapNinePieceImageQuad(CSSValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     if (!is&lt;CSSPrimitiveValue&gt;(value))
</span><span class="cx">         return LengthBox();
</span><span class="lines">@@ -632,7 +627,7 @@
</span><span class="cx">     CSSToLengthConversionData conversionData = useSVGZoomRules() ? m_resolver-&gt;state().cssToLengthConversionData().copyWithAdjustedZoom(1.0f) : m_resolver-&gt;state().cssToLengthConversionData();
</span><span class="cx"> 
</span><span class="cx">     // Retrieve the primitive value.
</span><del>-    CSSPrimitiveValue&amp; borderWidths = downcast&lt;CSSPrimitiveValue&gt;(*value);
</del><ins>+    auto&amp; borderWidths = downcast&lt;CSSPrimitiveValue&gt;(value);
</ins><span class="cx"> 
</span><span class="cx">     // Set up a length box to represent our image slices.
</span><span class="cx">     LengthBox box; // Defaults to 'auto' so we don't have to handle that explicitly below.
</span><span class="lines">@@ -668,12 +663,12 @@
</span><span class="cx">     return box;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSToStyleMap::mapNinePieceImageRepeat(CSSValue* value, NinePieceImage&amp; image)
</del><ins>+void CSSToStyleMap::mapNinePieceImageRepeat(CSSValue&amp; value, NinePieceImage&amp; image)
</ins><span class="cx"> {
</span><span class="cx">     if (!is&lt;CSSPrimitiveValue&gt;(value))
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*value);
</del><ins>+    CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
</ins><span class="cx">     Pair* pair = primitiveValue.getPairValue();
</span><span class="cx">     if (!pair || !pair-&gt;first() || !pair-&gt;second())
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSToStyleMaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSToStyleMap.h (175486 => 175487)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSToStyleMap.h        2014-11-03 20:41:08 UTC (rev 175486)
+++ trunk/Source/WebCore/css/CSSToStyleMap.h        2014-11-03 20:48:23 UTC (rev 175487)
</span><span class="lines">@@ -58,20 +58,20 @@
</span><span class="cx">     void mapFillYPosition(CSSPropertyID, FillLayer*, CSSValue*);
</span><span class="cx">     void mapFillMaskSourceType(CSSPropertyID, FillLayer*, CSSValue*);
</span><span class="cx"> 
</span><del>-    void mapAnimationDelay(Animation*, CSSValue*);
-    void mapAnimationDirection(Animation*, CSSValue*);
-    void mapAnimationDuration(Animation*, CSSValue*);
-    void mapAnimationFillMode(Animation*, CSSValue*);
-    void mapAnimationIterationCount(Animation*, CSSValue*);
-    void mapAnimationName(Animation*, CSSValue*);
-    void mapAnimationPlayState(Animation*, CSSValue*);
-    void mapAnimationProperty(Animation*, CSSValue*);
-    void mapAnimationTimingFunction(Animation*, CSSValue*);
</del><ins>+    void mapAnimationDelay(Animation*, CSSValue&amp;);
+    void mapAnimationDirection(Animation*, CSSValue&amp;);
+    void mapAnimationDuration(Animation*, CSSValue&amp;);
+    void mapAnimationFillMode(Animation*, CSSValue&amp;);
+    void mapAnimationIterationCount(Animation*, CSSValue&amp;);
+    void mapAnimationName(Animation*, CSSValue&amp;);
+    void mapAnimationPlayState(Animation*, CSSValue&amp;);
+    void mapAnimationProperty(Animation*, CSSValue&amp;);
+    void mapAnimationTimingFunction(Animation*, CSSValue&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void mapNinePieceImage(CSSPropertyID, CSSValue*, NinePieceImage&amp;);
</span><del>-    void mapNinePieceImageSlice(CSSValue*, NinePieceImage&amp;);
-    LengthBox mapNinePieceImageQuad(CSSValue*);
-    void mapNinePieceImageRepeat(CSSValue*, NinePieceImage&amp;);
</del><ins>+    void mapNinePieceImageSlice(CSSValue&amp;, NinePieceImage&amp;);
+    LengthBox mapNinePieceImageQuad(CSSValue&amp;);
+    void mapNinePieceImageRepeat(CSSValue&amp;, NinePieceImage&amp;);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     // FIXME: These accessors should be replaced by a ResolveState object
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx">     // FIXME: This should be part of some sort of StyleImageCache object which
</span><span class="cx">     // is held by the StyleResolver, and likely provided to this object
</span><span class="cx">     // during the resolve.
</span><del>-    PassRefPtr&lt;StyleImage&gt; styleImage(CSSPropertyID, CSSValue*);
</del><ins>+    PassRefPtr&lt;StyleImage&gt; styleImage(CSSPropertyID, CSSValue&amp;);
</ins><span class="cx"> 
</span><span class="cx">     StyleResolver* m_resolver;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueList.h (175486 => 175487)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValueList.h        2014-11-03 20:41:08 UTC (rev 175486)
+++ trunk/Source/WebCore/css/CSSValueList.h        2014-11-03 20:48:23 UTC (rev 175487)
</span><span class="lines">@@ -31,6 +31,9 @@
</span><span class="cx"> 
</span><span class="cx"> class CSSValueList : public CSSValue {
</span><span class="cx"> public:
</span><ins>+    typedef Vector&lt;Ref&lt;CSSValue&gt;, 4&gt;::iterator iterator;
+    typedef Vector&lt;Ref&lt;CSSValue&gt;, 4&gt;::const_iterator const_iterator;
+
</ins><span class="cx">     static PassRef&lt;CSSValueList&gt; createCommaSeparated()
</span><span class="cx">     {
</span><span class="cx">         return adoptRef(*new CSSValueList(CommaSeparator));
</span><span class="lines">@@ -54,6 +57,11 @@
</span><span class="cx">     CSSValue* itemWithoutBoundsCheck(size_t index) { return &amp;m_values[index].get(); }
</span><span class="cx">     const CSSValue* itemWithoutBoundsCheck(size_t index) const { ASSERT(index &lt; m_values.size()); return &amp;m_values[index].get(); }
</span><span class="cx"> 
</span><ins>+    const_iterator begin() const { return m_values.begin(); }
+    const_iterator end() const { return m_values.end(); }
+    iterator begin() { return m_values.begin(); }
+    iterator end() { return m_values.end(); }
+
</ins><span class="cx">     void append(PassRef&lt;CSSValue&gt;);
</span><span class="cx">     void prepend(PassRef&lt;CSSValue&gt;);
</span><span class="cx">     bool removeAll(CSSValue*);
</span><span class="lines">@@ -91,38 +99,6 @@
</span><span class="cx">     m_values.insert(0, WTF::move(value));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-// Objects of this class are intended to be stack-allocated and scoped to a single function.
-// Please take care not to pass these around as they do hold onto a raw pointer.
-class CSSValueListInspector {
-public:
-    CSSValueListInspector(CSSValue* value)
-        : m_list(is&lt;CSSValueList&gt;(value) ? downcast&lt;CSSValueList&gt;(value) : nullptr)
-    {
-    }
-
-    CSSValue* item(size_t index) const { ASSERT_WITH_SECURITY_IMPLICATION(index &lt; length()); return m_list-&gt;itemWithoutBoundsCheck(index); }
-    CSSValue* first() const { return item(0); }
-    CSSValue* second() const { return item(1); }
-    size_t length() const { return m_list ? m_list-&gt;length() : 0; }
-private:
-    CSSValueList* m_list;
-};
-
-// Wrapper that can be used to iterate over any CSSValue. Non-list values and 0 behave as zero-length lists.
-// Objects of this class are intended to be stack-allocated and scoped to a single function.
-// Please take care not to pass these around as they do hold onto a raw pointer.
-class CSSValueListIterator {
-public:
-    CSSValueListIterator(CSSValue* value) : m_inspector(value), m_position(0) { }
-    bool hasMore() const { return m_position &lt; m_inspector.length(); }
-    CSSValue* value() const { return m_inspector.item(m_position); }
-    bool isPrimitiveValue() const { return value()-&gt;isPrimitiveValue(); }
-    void advance() { m_position++; ASSERT(m_position &lt;= m_inspector.length());}
-    size_t index() const { return m_position; }
-private:
-    CSSValueListInspector m_inspector;
-    size_t m_position;
-};
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSValueList, isValueList())
</span></span></pre></div>
<a id="trunkSourceWebCorecssDeprecatedStyleBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (175486 => 175487)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-11-03 20:41:08 UTC (rev 175486)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-11-03 20:48:23 UTC (rev 175487)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &quot;CSSAspectRatioValue.h&quot;
</span><span class="cx"> #include &quot;CSSCalculationValue.h&quot;
</span><span class="cx"> #include &quot;CSSCursorImageValue.h&quot;
</span><ins>+#include &quot;CSSImageGeneratorValue.h&quot;
</ins><span class="cx"> #include &quot;CSSImageSetValue.h&quot;
</span><span class="cx"> #include &quot;CSSPrimitiveValue.h&quot;
</span><span class="cx"> #include &quot;CSSPrimitiveValueMappings.h&quot;
</span><span class="lines">@@ -163,7 +164,7 @@
</span><span class="cx"> template &lt;StyleImage* (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(PassRefPtr&lt;StyleImage&gt;), StyleImage* (*initialFunction)(), CSSPropertyID property&gt;
</span><span class="cx"> class ApplyPropertyStyleImage {
</span><span class="cx"> public:
</span><del>-    static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value) { (styleResolver-&gt;style()-&gt;*setterFunction)(styleResolver-&gt;styleImage(property, value)); }
</del><ins>+    static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value) { (styleResolver-&gt;style()-&gt;*setterFunction)(styleResolver-&gt;styleImage(property, *value)); }
</ins><span class="cx">     static PropertyHandler createHandler()
</span><span class="cx">     {
</span><span class="cx">         PropertyHandler handler = ApplyPropertyDefaultBase&lt;StyleImage*, getterFunction, PassRefPtr&lt;StyleImage&gt;, setterFunction, StyleImage*, initialFunction&gt;::createHandler();
</span><span class="lines">@@ -850,16 +851,16 @@
</span><span class="cx">         NinePieceImage image(getValue(styleResolver-&gt;style()));
</span><span class="cx">         switch (modifier) {
</span><span class="cx">         case Outset:
</span><del>-            image.setOutset(styleResolver-&gt;styleMap()-&gt;mapNinePieceImageQuad(value));
</del><ins>+            image.setOutset(styleResolver-&gt;styleMap()-&gt;mapNinePieceImageQuad(*value));
</ins><span class="cx">             break;
</span><span class="cx">         case Repeat:
</span><del>-            styleResolver-&gt;styleMap()-&gt;mapNinePieceImageRepeat(value, image);
</del><ins>+            styleResolver-&gt;styleMap()-&gt;mapNinePieceImageRepeat(*value, image);
</ins><span class="cx">             break;
</span><span class="cx">         case Slice:
</span><del>-            styleResolver-&gt;styleMap()-&gt;mapNinePieceImageSlice(value, image);
</del><ins>+            styleResolver-&gt;styleMap()-&gt;mapNinePieceImageSlice(*value, image);
</ins><span class="cx">             break;
</span><span class="cx">         case Width:
</span><del>-            image.setBorderSlices(styleResolver-&gt;styleMap()-&gt;mapNinePieceImageQuad(value));
</del><ins>+            image.setBorderSlices(styleResolver-&gt;styleMap()-&gt;mapNinePieceImageQuad(*value));
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         setValue(styleResolver-&gt;style(), image);
</span><span class="lines">@@ -961,7 +962,7 @@
</span><span class="cx">                     CSSCursorImageValue&amp; image = downcast&lt;CSSCursorImageValue&gt;(*item);
</span><span class="cx">                     if (image.updateIfSVGCursorIsUsed(styleResolver-&gt;element())) // Elements with SVG cursors are not allowed to share style.
</span><span class="cx">                         styleResolver-&gt;style()-&gt;setUnique();
</span><del>-                    styleResolver-&gt;style()-&gt;addCursor(styleResolver-&gt;styleImage(CSSPropertyCursor, &amp;image), image.hotSpot());
</del><ins>+                    styleResolver-&gt;style()-&gt;addCursor(styleResolver-&gt;styleImage(CSSPropertyCursor, image), image.hotSpot());
</ins><span class="cx">                 } else if (is&lt;CSSPrimitiveValue&gt;(*item)) {
</span><span class="cx">                     CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*item);
</span><span class="cx">                     if (primitiveValue.isValueID())
</span><span class="lines">@@ -1043,8 +1044,10 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         TextDecorationSkip skip = RenderStyle::initialTextDecorationSkip();
</span><del>-        for (CSSValueListIterator i(value); i.hasMore(); i.advance())
-            skip |= valueToDecorationSkip(downcast&lt;CSSPrimitiveValue&gt;(*i.value()));
</del><ins>+        if (is&lt;CSSValueList&gt;(*value)) {
+            for (auto&amp; currentValue : downcast&lt;CSSValueList&gt;(*value))
+                skip |= valueToDecorationSkip(downcast&lt;CSSPrimitiveValue&gt;(currentValue.get()));
+        }
</ins><span class="cx">         styleResolver-&gt;style()-&gt;setTextDecorationSkip(skip);
</span><span class="cx">     }
</span><span class="cx">     static PropertyHandler createHandler()
</span><span class="lines">@@ -1120,10 +1123,11 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         unsigned t = 0;
</span><del>-        for (CSSValueListIterator i(value); i.hasMore(); i.advance()) {
-            CSSValue* item = i.value();
-            TextUnderlinePosition t2 = downcast&lt;CSSPrimitiveValue&gt;(*item);
-            t |= t2;
</del><ins>+        if (is&lt;CSSValueList&gt;(*value)) {
+            for (auto&amp; currentValue : downcast&lt;CSSValueList&gt;(*value)) {
+                TextUnderlinePosition t2 = downcast&lt;CSSPrimitiveValue&gt;(currentValue.get());
+                t |= t2;
+            }
</ins><span class="cx">         }
</span><span class="cx">         styleResolver-&gt;style()-&gt;setTextUnderlinePosition(static_cast&lt;TextUnderlinePosition&gt;(t));
</span><span class="cx">     }
</span><span class="lines">@@ -1340,35 +1344,41 @@
</span><span class="cx">         Length width;
</span><span class="cx">         Length height;
</span><span class="cx">         PageSizeType pageSizeType = PAGE_SIZE_AUTO;
</span><del>-        CSSValueListInspector inspector(value);
-        switch (inspector.length()) {
</del><ins>+        if (!is&lt;CSSValueList&gt;(value))
+            return;
+
+        auto&amp; valueList = downcast&lt;CSSValueList&gt;(*value);
+        switch (valueList.length()) {
</ins><span class="cx">         case 2: {
</span><ins>+            CSSValue* firstValue = valueList.itemWithoutBoundsCheck(0);
+            CSSValue* secondValue = valueList.itemWithoutBoundsCheck(1);
</ins><span class="cx">             // &lt;length&gt;{2} | &lt;page-size&gt; &lt;orientation&gt;
</span><del>-            if (!is&lt;CSSPrimitiveValue&gt;(*inspector.first()) || !is&lt;CSSPrimitiveValue&gt;(*inspector.second()))
</del><ins>+            if (!is&lt;CSSPrimitiveValue&gt;(*firstValue) || !is&lt;CSSPrimitiveValue&gt;(*secondValue))
</ins><span class="cx">                 return;
</span><del>-            CSSPrimitiveValue&amp; first = downcast&lt;CSSPrimitiveValue&gt;(*inspector.first());
-            CSSPrimitiveValue&amp; second = downcast&lt;CSSPrimitiveValue&gt;(*inspector.second());
-            if (first.isLength()) {
</del><ins>+            auto&amp; firstPrimitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*firstValue);
+            auto&amp; secondPrimitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*secondValue);
+            if (firstPrimitiveValue.isLength()) {
</ins><span class="cx">                 // &lt;length&gt;{2}
</span><del>-                if (!second.isLength())
</del><ins>+                if (!secondPrimitiveValue.isLength())
</ins><span class="cx">                     return;
</span><span class="cx">                 CSSToLengthConversionData conversionData = styleResolver-&gt;state().cssToLengthConversionData().copyWithAdjustedZoom(1.0f);
</span><del>-                width = first.computeLength&lt;Length&gt;(conversionData);
-                height = second.computeLength&lt;Length&gt;(conversionData);
</del><ins>+                width = firstPrimitiveValue.computeLength&lt;Length&gt;(conversionData);
+                height = secondPrimitiveValue.computeLength&lt;Length&gt;(conversionData);
</ins><span class="cx">             } else {
</span><span class="cx">                 // &lt;page-size&gt; &lt;orientation&gt;
</span><span class="cx">                 // The value order is guaranteed. See CSSParser::parseSizeParameter.
</span><del>-                if (!getPageSizeFromName(&amp;first, &amp;second, width, height))
</del><ins>+                if (!getPageSizeFromName(&amp;firstPrimitiveValue, &amp;secondPrimitiveValue, width, height))
</ins><span class="cx">                     return;
</span><span class="cx">             }
</span><span class="cx">             pageSizeType = PAGE_SIZE_RESOLVED;
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case 1: {
</span><ins>+            CSSValue* value = valueList.itemWithoutBoundsCheck(0);
</ins><span class="cx">             // &lt;length&gt; | auto | &lt;page-size&gt; | [ portrait | landscape]
</span><del>-            if (!is&lt;CSSPrimitiveValue&gt;(*inspector.first()))
</del><ins>+            if (!is&lt;CSSPrimitiveValue&gt;(*value))
</ins><span class="cx">                 return;
</span><del>-            CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*inspector.first());
</del><ins>+            auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*value);
</ins><span class="cx">             if (primitiveValue.isLength()) {
</span><span class="cx">                 // &lt;length&gt;
</span><span class="cx">                 pageSizeType = PAGE_SIZE_RESOLVED;
</span><span class="lines">@@ -1498,8 +1508,10 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         TextEmphasisPosition position = 0;
</span><del>-        for (CSSValueListIterator i(value); i.hasMore(); i.advance())
-            position |= valueToEmphasisPosition(downcast&lt;CSSPrimitiveValue&gt;(*i.value()));
</del><ins>+        if (is&lt;CSSValueList&gt;(*value)) {
+            for (auto&amp; currentValue : downcast&lt;CSSValueList&gt;(*value))
+                position |= valueToEmphasisPosition(downcast&lt;CSSPrimitiveValue&gt;(currentValue.get()));
+        }
</ins><span class="cx">         styleResolver-&gt;style()-&gt;setTextEmphasisPosition(position);
</span><span class="cx">     }
</span><span class="cx">     static PropertyHandler createHandler()
</span><span class="lines">@@ -1515,7 +1527,7 @@
</span><span class="cx">           bool (Animation::*testFunction)() const,
</span><span class="cx">           void (Animation::*clearFunction)(),
</span><span class="cx">           T (*initialFunction)(),
</span><del>-          void (CSSToStyleMap::*mapFunction)(Animation*, CSSValue*),
</del><ins>+          void (CSSToStyleMap::*mapFunction)(Animation*, CSSValue&amp;),
</ins><span class="cx">           AnimationList* (RenderStyle::*animationGetterFunction)(),
</span><span class="cx">           const AnimationList* (RenderStyle::*immutableAnimationGetterFunction)() const&gt;
</span><span class="cx"> class ApplyPropertyAnimation {
</span><span class="lines">@@ -1525,7 +1537,7 @@
</span><span class="cx">     static bool test(const Animation&amp; animation) { return (animation.*testFunction)(); }
</span><span class="cx">     static void clear(Animation&amp; animation) { (animation.*clearFunction)(); }
</span><span class="cx">     static T initial() { return (*initialFunction)(); }
</span><del>-    static void map(StyleResolver* styleResolver, Animation&amp; animation, CSSValue* value) { (styleResolver-&gt;styleMap()-&gt;*mapFunction)(&amp;animation, value); }
</del><ins>+    static void map(StyleResolver* styleResolver, Animation&amp; animation, CSSValue&amp; value) { (styleResolver-&gt;styleMap()-&gt;*mapFunction)(&amp;animation, value); }
</ins><span class="cx">     static AnimationList* accessAnimations(RenderStyle* style) { return (style-&gt;*animationGetterFunction)(); }
</span><span class="cx">     static const AnimationList* animations(RenderStyle* style) { return (style-&gt;*immutableAnimationGetterFunction)(); }
</span><span class="cx"> 
</span><span class="lines">@@ -1562,18 +1574,18 @@
</span><span class="cx">     {
</span><span class="cx">         AnimationList* list = accessAnimations(styleResolver-&gt;style());
</span><span class="cx">         size_t childIndex = 0;
</span><del>-        if (value-&gt;isValueList()) {
</del><ins>+        if (is&lt;CSSValueList&gt;(*value)) {
</ins><span class="cx">             /* Walk each value and put it into an animation, creating new animations as needed. */
</span><del>-            for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {
</del><ins>+            for (auto&amp; currentValue : downcast&lt;CSSValueList&gt;(*value)) {
</ins><span class="cx">                 if (childIndex &lt;= list-&gt;size())
</span><span class="cx">                     list-&gt;append(Animation::create());
</span><del>-                map(styleResolver, list-&gt;animation(childIndex), i.value());
</del><ins>+                map(styleResolver, list-&gt;animation(childIndex), currentValue.get());
</ins><span class="cx">                 ++childIndex;
</span><span class="cx">             }
</span><span class="cx">         } else {
</span><span class="cx">             if (list-&gt;isEmpty())
</span><span class="cx">                 list-&gt;append(Animation::create());
</span><del>-            map(styleResolver, list-&gt;animation(childIndex), value);
</del><ins>+            map(styleResolver, list-&gt;animation(childIndex), *value);
</ins><span class="cx">             childIndex = 1;
</span><span class="cx">         }
</span><span class="cx">         for ( ; childIndex &lt; list-&gt;size(); ++childIndex) {
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderConverterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (175486 => 175487)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderConverter.h        2014-11-03 20:41:08 UTC (rev 175486)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h        2014-11-03 20:48:23 UTC (rev 175487)
</span><span class="lines">@@ -201,8 +201,10 @@
</span><span class="cx"> inline TextDecoration StyleBuilderConverter::convertTextDecoration(StyleResolver&amp;, CSSValue&amp; value)
</span><span class="cx"> {
</span><span class="cx">     TextDecoration result = RenderStyle::initialTextDecoration();
</span><del>-    for (CSSValueListIterator it(&amp;value); it.hasMore(); it.advance())
-        result |= downcast&lt;CSSPrimitiveValue&gt;(*it.value());
</del><ins>+    if (is&lt;CSSValueList&gt;(value)) {
+        for (auto&amp; currentValue : downcast&lt;CSSValueList&gt;(value))
+            result |= downcast&lt;CSSPrimitiveValue&gt;(currentValue.get());
+    }
</ins><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -242,7 +244,7 @@
</span><span class="cx"> template &lt;CSSPropertyID property&gt;
</span><span class="cx"> inline PassRefPtr&lt;StyleImage&gt; StyleBuilderConverter::convertBorderImageSource(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</span><span class="cx"> {
</span><del>-    return styleResolver.styleImage(property, &amp;value);
</del><ins>+    return styleResolver.styleImage(property, value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline TransformOperations StyleBuilderConverter::convertTransform(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderCustomh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderCustom.h (175486 => 175487)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderCustom.h        2014-11-03 20:41:08 UTC (rev 175486)
+++ trunk/Source/WebCore/css/StyleBuilderCustom.h        2014-11-03 20:48:23 UTC (rev 175487)
</span><span class="lines">@@ -122,14 +122,13 @@
</span><span class="cx">         if (downcast&lt;CSSPrimitiveValue&gt;(value).getValueID() == CSSValueAuto)
</span><span class="cx">             styleResolver.style()-&gt;setShapeOutside(nullptr);
</span><span class="cx">     } if (is&lt;CSSImageValue&gt;(value) || is&lt;CSSImageGeneratorValue&gt;(value) || is&lt;CSSImageSetValue&gt;(value)) {
</span><del>-        RefPtr&lt;ShapeValue&gt; shape = ShapeValue::createImageValue(styleResolver.styleImage(CSSPropertyWebkitShapeOutside, &amp;value));
</del><ins>+        RefPtr&lt;ShapeValue&gt; shape = ShapeValue::createImageValue(styleResolver.styleImage(CSSPropertyWebkitShapeOutside, value));
</ins><span class="cx">         styleResolver.style()-&gt;setShapeOutside(shape.release());
</span><span class="cx">     } else if (is&lt;CSSValueList&gt;(value)) {
</span><span class="cx">         RefPtr&lt;BasicShape&gt; shape;
</span><span class="cx">         CSSBoxType referenceBox = BoxMissing;
</span><del>-        auto&amp; valueList = downcast&lt;CSSValueList&gt;(value);
-        for (unsigned i = 0; i &lt; valueList.length(); ++i) {
-            CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*valueList.itemWithoutBoundsCheck(i));
</del><ins>+        for (auto&amp; currentValue : downcast&lt;CSSValueList&gt;(value)) {
+            CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(currentValue.get());
</ins><span class="cx">             if (primitiveValue.isShape())
</span><span class="cx">                 shape = basicShapeForValue(styleResolver.state().cssToLengthConversionData(), primitiveValue.getShapeValue());
</span><span class="cx">             else if (primitiveValue.getValueID() == CSSValueContentBox
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.cpp (175486 => 175487)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.cpp        2014-11-03 20:41:08 UTC (rev 175486)
+++ trunk/Source/WebCore/css/StyleResolver.cpp        2014-11-03 20:48:23 UTC (rev 175487)
</span><span class="lines">@@ -1929,10 +1929,10 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool createGridTrackSize(CSSValue* value, GridTrackSize&amp; trackSize, const StyleResolver::State&amp; state)
</del><ins>+static bool createGridTrackSize(CSSValue&amp; value, GridTrackSize&amp; trackSize, const StyleResolver::State&amp; state)
</ins><span class="cx"> {
</span><del>-    if (is&lt;CSSPrimitiveValue&gt;(*value)) {
-        CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*value);
</del><ins>+    if (is&lt;CSSPrimitiveValue&gt;(value)) {
+        CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
</ins><span class="cx">         GridLength workingLength;
</span><span class="cx">         if (!createGridTrackBreadth(&amp;primitiveValue, state, workingLength))
</span><span class="cx">             return false;
</span><span class="lines">@@ -1941,7 +1941,7 @@
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    CSSFunctionValue&amp; minmaxFunction = downcast&lt;CSSFunctionValue&gt;(*value);
</del><ins>+    CSSFunctionValue&amp; minmaxFunction = downcast&lt;CSSFunctionValue&gt;(value);
</ins><span class="cx">     CSSValueList* arguments = minmaxFunction.arguments();
</span><span class="cx">     ASSERT_WITH_SECURITY_IMPLICATION(arguments-&gt;length() == 2);
</span><span class="cx">     GridLength minTrackBreadth;
</span><span class="lines">@@ -1961,16 +1961,14 @@
</span><span class="cx">         return primitiveValue.getValueID() == CSSValueNone;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!value-&gt;isValueList())
</del><ins>+    if (!is&lt;CSSValueList&gt;(*value))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     size_t currentNamedGridLine = 0;
</span><del>-    for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {
-        CSSValue* currValue = i.value();
-        if (is&lt;CSSGridLineNamesValue&gt;(*currValue)) {
-            CSSGridLineNamesValue&amp; lineNamesValue = downcast&lt;CSSGridLineNamesValue&gt;(*currValue);
-            for (CSSValueListIterator j = &amp;lineNamesValue; j.hasMore(); j.advance()) {
-                String namedGridLine = downcast&lt;CSSPrimitiveValue&gt;(j.value())-&gt;getStringValue();
</del><ins>+    for (auto&amp; currentValue : downcast&lt;CSSValueList&gt;(*value)) {
+        if (is&lt;CSSGridLineNamesValue&gt;(currentValue.get())) {
+            for (auto&amp; currentGridLineName : downcast&lt;CSSGridLineNamesValue&gt;(currentValue.get())) {
+                String namedGridLine = downcast&lt;CSSPrimitiveValue&gt;(currentGridLineName.get()).getStringValue();
</ins><span class="cx">                 NamedGridLinesMap::AddResult result = namedGridLines.add(namedGridLine, Vector&lt;size_t&gt;());
</span><span class="cx">                 result.iterator-&gt;value.append(currentNamedGridLine);
</span><span class="cx">                 OrderedNamedGridLinesMap::AddResult orderedResult = orderedNamedGridLines.add(currentNamedGridLine, Vector&lt;String&gt;());
</span><span class="lines">@@ -1981,7 +1979,7 @@
</span><span class="cx"> 
</span><span class="cx">         ++currentNamedGridLine;
</span><span class="cx">         GridTrackSize trackSize;
</span><del>-        if (!createGridTrackSize(currValue, trackSize, state))
</del><ins>+        if (!createGridTrackSize(currentValue.get(), trackSize, state))
</ins><span class="cx">             return false;
</span><span class="cx"> 
</span><span class="cx">         trackSizes.append(trackSize);
</span><span class="lines">@@ -2010,33 +2008,33 @@
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    CSSValueList&amp; values = downcast&lt;CSSValueList&gt;(*value);
</del><ins>+    auto&amp; values = downcast&lt;CSSValueList&gt;(*value);
</ins><span class="cx">     ASSERT(values.length());
</span><span class="cx"> 
</span><span class="cx">     bool isSpanPosition = false;
</span><span class="cx">     int gridLineNumber = 0;
</span><span class="cx">     String gridLineName;
</span><span class="cx"> 
</span><del>-    CSSValueListIterator it = &amp;values;
-    CSSPrimitiveValue* currentValue = downcast&lt;CSSPrimitiveValue&gt;(it.value());
</del><ins>+    auto it = values.begin();
+    CSSPrimitiveValue* currentValue = &amp;downcast&lt;CSSPrimitiveValue&gt;(it-&gt;get());
</ins><span class="cx">     if (currentValue-&gt;getValueID() == CSSValueSpan) {
</span><span class="cx">         isSpanPosition = true;
</span><del>-        it.advance();
-        currentValue = it.hasMore() ? downcast&lt;CSSPrimitiveValue&gt;(it.value()) : nullptr;
</del><ins>+        ++it;
+        currentValue = it != values.end() ? &amp;downcast&lt;CSSPrimitiveValue&gt;(it-&gt;get()) : nullptr;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (currentValue &amp;&amp; currentValue-&gt;isNumber()) {
</span><span class="cx">         gridLineNumber = currentValue-&gt;getIntValue();
</span><del>-        it.advance();
-        currentValue = it.hasMore() ? downcast&lt;CSSPrimitiveValue&gt;(it.value()) : nullptr;
</del><ins>+        ++it;
+        currentValue = it != values.end() ? &amp;downcast&lt;CSSPrimitiveValue&gt;(it-&gt;get()) : nullptr;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (currentValue &amp;&amp; currentValue-&gt;isString()) {
</span><span class="cx">         gridLineName = currentValue-&gt;getStringValue();
</span><del>-        it.advance();
</del><ins>+        ++it;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    ASSERT(!it.hasMore());
</del><ins>+    ASSERT(it != values.end());
</ins><span class="cx">     if (isSpanPosition)
</span><span class="cx">         position.setSpanPosition(gridLineNumber ? gridLineNumber : 1, gridLineName);
</span><span class="cx">     else
</span><span class="lines">@@ -2073,16 +2071,18 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     points.hasRepeat = false;
</span><del>-    for (CSSValueListIterator it(&amp;value); it.hasMore(); it.advance()) {
-        auto&amp; itemValue = downcast&lt;CSSPrimitiveValue&gt;(*it.value());
-        if (auto* lengthRepeat = itemValue.getLengthRepeatValue()) {
-            if (auto* interval = lengthRepeat-&gt;interval()) {
-                points.repeatOffset = parseSnapCoordinate(*interval);
-                points.hasRepeat = true;
-                break;
</del><ins>+    if (is&lt;CSSValueList&gt;(value)) {
+        for (auto&amp; currentValue : downcast&lt;CSSValueList&gt;(value)) {
+            auto&amp; itemValue = downcast&lt;CSSPrimitiveValue&gt;(currentValue.get());
+            if (auto* lengthRepeat = itemValue.getLengthRepeatValue()) {
+                if (auto* interval = lengthRepeat-&gt;interval()) {
+                    points.repeatOffset = parseSnapCoordinate(*interval);
+                    points.hasRepeat = true;
+                    break;
+                }
</ins><span class="cx">             }
</span><ins>+            points.offsets.append(parseSnapCoordinate(itemValue));
</ins><span class="cx">         }
</span><del>-        points.offsets.append(parseSnapCoordinate(itemValue));
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return points;
</span><span class="lines">@@ -2148,35 +2148,34 @@
</span><span class="cx">                 return;
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            if (!value-&gt;isValueList())
</del><ins>+            if (!is&lt;CSSValueList&gt;(*value))
</ins><span class="cx">                 return;
</span><span class="cx"> 
</span><span class="cx">             bool didSet = false;
</span><del>-            for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {
-                CSSValue* item = i.value();
-                if (is&lt;CSSImageGeneratorValue&gt;(*item)) {
-                    if (is&lt;CSSGradientValue&gt;(*item))
-                        state.style()-&gt;setContent(StyleGeneratedImage::create(*downcast&lt;CSSGradientValue&gt;(*item).gradientWithStylesResolved(this)), didSet);
</del><ins>+            for (auto&amp; item : downcast&lt;CSSValueList&gt;(*value)) {
+                if (is&lt;CSSImageGeneratorValue&gt;(item.get())) {
+                    if (is&lt;CSSGradientValue&gt;(item.get()))
+                        state.style()-&gt;setContent(StyleGeneratedImage::create(*downcast&lt;CSSGradientValue&gt;(item.get()).gradientWithStylesResolved(this)), didSet);
</ins><span class="cx">                     else
</span><del>-                        state.style()-&gt;setContent(StyleGeneratedImage::create(downcast&lt;CSSImageGeneratorValue&gt;(*item)), didSet);
</del><ins>+                        state.style()-&gt;setContent(StyleGeneratedImage::create(downcast&lt;CSSImageGeneratorValue&gt;(item.get())), didSet);
</ins><span class="cx">                     didSet = true;
</span><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><del>-                } else if (is&lt;CSSImageSetValue&gt;(*item)) {
-                    state.style()-&gt;setContent(setOrPendingFromValue(CSSPropertyContent, downcast&lt;CSSImageSetValue&gt;(item)), didSet);
</del><ins>+                } else if (is&lt;CSSImageSetValue&gt;(item.get())) {
+                    state.style()-&gt;setContent(setOrPendingFromValue(CSSPropertyContent, downcast&lt;CSSImageSetValue&gt;(item.get())), didSet);
</ins><span class="cx">                     didSet = true;
</span><span class="cx"> #endif
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                if (is&lt;CSSImageValue&gt;(*item)) {
-                    state.style()-&gt;setContent(cachedOrPendingFromValue(CSSPropertyContent, downcast&lt;CSSImageValue&gt;(item)), didSet);
</del><ins>+                if (is&lt;CSSImageValue&gt;(item.get())) {
+                    state.style()-&gt;setContent(cachedOrPendingFromValue(CSSPropertyContent, downcast&lt;CSSImageValue&gt;(item.get())), didSet);
</ins><span class="cx">                     didSet = true;
</span><span class="cx">                     continue;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                if (!is&lt;CSSPrimitiveValue&gt;(*item))
</del><ins>+                if (!is&lt;CSSPrimitiveValue&gt;(item.get()))
</ins><span class="cx">                     continue;
</span><span class="cx"> 
</span><del>-                CSSPrimitiveValue&amp; contentValue = downcast&lt;CSSPrimitiveValue&gt;(*item);
</del><ins>+                auto&amp; contentValue = downcast&lt;CSSPrimitiveValue&gt;(item.get());
</ins><span class="cx"> 
</span><span class="cx">                 if (contentValue.isString()) {
</span><span class="cx">                     state.style()-&gt;setContent(contentValue.getStringValue().impl(), didSet);
</span><span class="lines">@@ -2402,14 +2401,14 @@
</span><span class="cx">         if (isInitial || primitiveValue) // initial | none
</span><span class="cx">             return id == CSSPropertyTextShadow ? state.style()-&gt;setTextShadow(nullptr) : state.style()-&gt;setBoxShadow(nullptr);
</span><span class="cx"> 
</span><del>-        if (!value-&gt;isValueList())
</del><ins>+        if (!is&lt;CSSValueList&gt;(*value))
</ins><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {
-            CSSValue* currValue = i.value();
-            if (!is&lt;CSSShadowValue&gt;(*currValue))
</del><ins>+        bool isFirstEntry = true;
+        for (auto&amp; currentValue : downcast&lt;CSSValueList&gt;(*value)) {
+            if (!is&lt;CSSShadowValue&gt;(currentValue.get()))
</ins><span class="cx">                 continue;
</span><del>-            CSSShadowValue&amp; item = downcast&lt;CSSShadowValue&gt;(*currValue);
</del><ins>+            auto&amp; item = downcast&lt;CSSShadowValue&gt;(currentValue.get());
</ins><span class="cx">             int x = item.x-&gt;computeLength&lt;int&gt;(state.cssToLengthConversionData());
</span><span class="cx">             int y = item.y-&gt;computeLength&lt;int&gt;(state.cssToLengthConversionData());
</span><span class="cx">             int blur = item.blur ? item.blur-&gt;computeLength&lt;int&gt;(state.cssToLengthConversionData()) : 0;
</span><span class="lines">@@ -2423,9 +2422,11 @@
</span><span class="cx"> 
</span><span class="cx">             auto shadowData = std::make_unique&lt;ShadowData&gt;(IntPoint(x, y), blur, spread, shadowStyle, id == CSSPropertyWebkitBoxShadow, color.isValid() ? color : Color::transparent);
</span><span class="cx">             if (id == CSSPropertyTextShadow)
</span><del>-                state.style()-&gt;setTextShadow(WTF::move(shadowData), i.index()); // add to the list if this is not the first entry
</del><ins>+                state.style()-&gt;setTextShadow(WTF::move(shadowData), !isFirstEntry); // add to the list if this is not the first entry
</ins><span class="cx">             else
</span><del>-                state.style()-&gt;setBoxShadow(WTF::move(shadowData), i.index()); // add to the list if this is not the first entry
</del><ins>+                state.style()-&gt;setBoxShadow(WTF::move(shadowData), !isFirstEntry); // add to the list if this is not the first entry
+
+            isFirstEntry = false;
</ins><span class="cx">         }
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -2705,7 +2706,7 @@
</span><span class="cx">     case CSSPropertyWebkitGridAutoColumns: {
</span><span class="cx">         HANDLE_INHERIT_AND_INITIAL(gridAutoColumns, GridAutoColumns);
</span><span class="cx">         GridTrackSize trackSize;
</span><del>-        if (!createGridTrackSize(value, trackSize, state))
</del><ins>+        if (!createGridTrackSize(*value, trackSize, state))
</ins><span class="cx">             return;
</span><span class="cx">         state.style()-&gt;setGridAutoColumns(trackSize);
</span><span class="cx">         return;
</span><span class="lines">@@ -2713,7 +2714,7 @@
</span><span class="cx">     case CSSPropertyWebkitGridAutoRows: {
</span><span class="cx">         HANDLE_INHERIT_AND_INITIAL(gridAutoRows, GridAutoRows);
</span><span class="cx">         GridTrackSize trackSize;
</span><del>-        if (!createGridTrackSize(value, trackSize, state))
</del><ins>+        if (!createGridTrackSize(*value, trackSize, state))
</ins><span class="cx">             return;
</span><span class="cx">         state.style()-&gt;setGridAutoRows(trackSize);
</span><span class="cx">         return;
</span><span class="lines">@@ -3213,33 +3214,33 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;StyleImage&gt; StyleResolver::styleImage(CSSPropertyID property, CSSValue* value)
</del><ins>+PassRefPtr&lt;StyleImage&gt; StyleResolver::styleImage(CSSPropertyID property, CSSValue&amp; value)
</ins><span class="cx"> {
</span><del>-    if (is&lt;CSSImageValue&gt;(*value))
</del><ins>+    if (is&lt;CSSImageValue&gt;(value))
</ins><span class="cx">         return cachedOrPendingFromValue(property, downcast&lt;CSSImageValue&gt;(value));
</span><span class="cx"> 
</span><del>-    if (is&lt;CSSImageGeneratorValue&gt;(*value)) {
-        if (is&lt;CSSGradientValue&gt;(*value))
-            return generatedOrPendingFromValue(property, *downcast&lt;CSSGradientValue&gt;(*value).gradientWithStylesResolved(this));
-        return generatedOrPendingFromValue(property, downcast&lt;CSSImageGeneratorValue&gt;(*value));
</del><ins>+    if (is&lt;CSSImageGeneratorValue&gt;(value)) {
+        if (is&lt;CSSGradientValue&gt;(value))
+            return generatedOrPendingFromValue(property, *downcast&lt;CSSGradientValue&gt;(value).gradientWithStylesResolved(this));
+        return generatedOrPendingFromValue(property, downcast&lt;CSSImageGeneratorValue&gt;(value));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><del>-    if (is&lt;CSSImageSetValue&gt;(*value))
</del><ins>+    if (is&lt;CSSImageSetValue&gt;(value))
</ins><span class="cx">         return setOrPendingFromValue(property, downcast&lt;CSSImageSetValue&gt;(value));
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    if (is&lt;CSSCursorImageValue&gt;(*value))
</del><ins>+    if (is&lt;CSSCursorImageValue&gt;(value))
</ins><span class="cx">         return cursorOrPendingFromValue(property, downcast&lt;CSSCursorImageValue&gt;(value));
</span><span class="cx"> 
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;StyleImage&gt; StyleResolver::cachedOrPendingFromValue(CSSPropertyID property, CSSImageValue* value)
</del><ins>+PassRefPtr&lt;StyleImage&gt; StyleResolver::cachedOrPendingFromValue(CSSPropertyID property, CSSImageValue&amp; value)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;StyleImage&gt; image = value-&gt;cachedOrPendingImage();
</del><ins>+    RefPtr&lt;StyleImage&gt; image = value.cachedOrPendingImage();
</ins><span class="cx">     if (image &amp;&amp; image-&gt;isPendingImage())
</span><del>-        m_state.pendingImageProperties().set(property, value);
</del><ins>+        m_state.pendingImageProperties().set(property, &amp;value);
</ins><span class="cx">     return image.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3258,20 +3259,20 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><del>-PassRefPtr&lt;StyleImage&gt; StyleResolver::setOrPendingFromValue(CSSPropertyID property, CSSImageSetValue* value)
</del><ins>+PassRefPtr&lt;StyleImage&gt; StyleResolver::setOrPendingFromValue(CSSPropertyID property, CSSImageSetValue&amp; value)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;StyleImage&gt; image = value-&gt;cachedOrPendingImageSet(document());
</del><ins>+    RefPtr&lt;StyleImage&gt; image = value.cachedOrPendingImageSet(document());
</ins><span class="cx">     if (image &amp;&amp; image-&gt;isPendingImage())
</span><del>-        m_state.pendingImageProperties().set(property, value);
</del><ins>+        m_state.pendingImageProperties().set(property, &amp;value);
</ins><span class="cx">     return image.release();
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;StyleImage&gt; StyleResolver::cursorOrPendingFromValue(CSSPropertyID property, CSSCursorImageValue* value)
</del><ins>+PassRefPtr&lt;StyleImage&gt; StyleResolver::cursorOrPendingFromValue(CSSPropertyID property, CSSCursorImageValue&amp; value)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;StyleImage&gt; image = value-&gt;cachedOrPendingImage(document());
</del><ins>+    RefPtr&lt;StyleImage&gt; image = value.cachedOrPendingImage(document());
</ins><span class="cx">     if (image &amp;&amp; image-&gt;isPendingImage())
</span><del>-        m_state.pendingImageProperties().set(property, value);
</del><ins>+        m_state.pendingImageProperties().set(property, &amp;value);
</ins><span class="cx">     return image.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3518,16 +3519,15 @@
</span><span class="cx">             return true;
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    if (!inValue-&gt;isValueList())
</del><ins>+    if (!is&lt;CSSValueList&gt;(*inValue))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     FilterOperations operations;
</span><del>-    for (CSSValueListIterator i = inValue; i.hasMore(); i.advance()) {
-        CSSValue* currValue = i.value();
-        if (!is&lt;WebKitCSSFilterValue&gt;(*currValue))
</del><ins>+    for (auto&amp; currentValue : downcast&lt;CSSValueList&gt;(*inValue)) {
+        if (!is&lt;WebKitCSSFilterValue&gt;(currentValue.get()))
</ins><span class="cx">             continue;
</span><span class="cx"> 
</span><del>-        WebKitCSSFilterValue&amp; filterValue = downcast&lt;WebKitCSSFilterValue&gt;(*i.value());
</del><ins>+        auto&amp; filterValue = downcast&lt;WebKitCSSFilterValue&gt;(currentValue.get());
</ins><span class="cx">         FilterOperation::OperationType operationType = filterOperationForType(filterValue.operationType());
</span><span class="cx"> 
</span><span class="cx">         if (operationType == FilterOperation::REFERENCE) {
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolverh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.h (175486 => 175487)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.h        2014-11-03 20:41:08 UTC (rev 175486)
+++ trunk/Source/WebCore/css/StyleResolver.h        2014-11-03 20:48:23 UTC (rev 175487)
</span><span class="lines">@@ -447,13 +447,13 @@
</span><span class="cx"> 
</span><span class="cx">     static RenderStyle* styleNotYetAvailable() { return s_styleNotYetAvailable; }
</span><span class="cx"> 
</span><del>-    PassRefPtr&lt;StyleImage&gt; styleImage(CSSPropertyID, CSSValue*);
-    PassRefPtr&lt;StyleImage&gt; cachedOrPendingFromValue(CSSPropertyID, CSSImageValue*);
</del><ins>+    PassRefPtr&lt;StyleImage&gt; styleImage(CSSPropertyID, CSSValue&amp;);
+    PassRefPtr&lt;StyleImage&gt; cachedOrPendingFromValue(CSSPropertyID, CSSImageValue&amp;);
</ins><span class="cx">     PassRefPtr&lt;StyleImage&gt; generatedOrPendingFromValue(CSSPropertyID, CSSImageGeneratorValue&amp;);
</span><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><del>-    PassRefPtr&lt;StyleImage&gt; setOrPendingFromValue(CSSPropertyID, CSSImageSetValue*);
</del><ins>+    PassRefPtr&lt;StyleImage&gt; setOrPendingFromValue(CSSPropertyID, CSSImageSetValue&amp;);
</ins><span class="cx"> #endif
</span><del>-    PassRefPtr&lt;StyleImage&gt; cursorOrPendingFromValue(CSSPropertyID, CSSCursorImageValue*);
</del><ins>+    PassRefPtr&lt;StyleImage&gt; cursorOrPendingFromValue(CSSPropertyID, CSSCursorImageValue&amp;);
</ins><span class="cx"> 
</span><span class="cx">     bool applyPropertyToRegularStyle() const { return m_state.applyPropertyToRegularStyle(); }
</span><span class="cx">     bool applyPropertyToVisitedLinkStyle() const { return m_state.applyPropertyToVisitedLinkStyle(); }
</span></span></pre></div>
<a id="trunkSourceWebCorecssTransformFunctionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/TransformFunctions.cpp (175486 => 175487)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/TransformFunctions.cpp        2014-11-03 20:41:08 UTC (rev 175486)
+++ trunk/Source/WebCore/css/TransformFunctions.cpp        2014-11-03 20:48:23 UTC (rev 175487)
</span><span class="lines">@@ -83,19 +83,17 @@
</span><span class="cx"> 
</span><span class="cx"> bool transformsForValue(CSSValue&amp; value, const CSSToLengthConversionData&amp; conversionData, TransformOperations&amp; outOperations)
</span><span class="cx"> {
</span><del>-    if (!value.isValueList()) {
</del><ins>+    if (!is&lt;CSSValueList&gt;(value)) {
</ins><span class="cx">         outOperations.clear();
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     TransformOperations operations;
</span><del>-    for (CSSValueListIterator i = &amp;value; i.hasMore(); i.advance()) {
-        CSSValue&amp; currValue = *i.value();
-
-        if (!is&lt;WebKitCSSTransformValue&gt;(currValue))
</del><ins>+    for (auto&amp; currentValue : downcast&lt;CSSValueList&gt;(value)) {
+        if (!is&lt;WebKitCSSTransformValue&gt;(currentValue.get()))
</ins><span class="cx">             continue;
</span><span class="cx"> 
</span><del>-        WebKitCSSTransformValue&amp; transformValue = downcast&lt;WebKitCSSTransformValue&gt;(currValue);
</del><ins>+        auto&amp; transformValue = downcast&lt;WebKitCSSTransformValue&gt;(currentValue.get());
</ins><span class="cx">         if (!transformValue.length())
</span><span class="cx">             continue;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>