<!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 <cdumez@apple.com>
+
+ 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 <akling@apple.com>
</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 "Animation.h"
</span><span class="cx"> #include "CSSBorderImageSliceValue.h"
</span><ins>+#include "CSSImageGeneratorValue.h"
+#include "CSSImageSetValue.h"
+#include "CSSImageValue.h"
</ins><span class="cx"> #include "CSSPrimitiveValue.h"
</span><span class="cx"> #include "CSSPrimitiveValueMappings.h"
</span><span class="cx"> #include "CSSTimingFunctionValue.h"
</span><span class="lines">@@ -62,7 +65,7 @@
</span><span class="cx"> return m_resolver->useSVGZoomRules();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<StyleImage> CSSToStyleMap::styleImage(CSSPropertyID propertyId, CSSValue* value)
</del><ins>+PassRefPtr<StyleImage> CSSToStyleMap::styleImage(CSSPropertyID propertyId, CSSValue& value)
</ins><span class="cx"> {
</span><span class="cx"> return m_resolver->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->setImage(styleImage(property, value));
</del><ins>+ layer->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->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& value)
</ins><span class="cx"> {
</span><del>- if (value->isInitialValue()) {
</del><ins>+ if (value.isInitialValue()) {
</ins><span class="cx"> animation->setDelay(Animation::initialAnimationDelay());
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!is<CSSPrimitiveValue>(*value))
</del><ins>+ if (!is<CSSPrimitiveValue>(value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
- animation->setDelay(primitiveValue.computeTime<double, CSSPrimitiveValue::Seconds>());
</del><ins>+ animation->setDelay(downcast<CSSPrimitiveValue>(value).computeTime<double, CSSPrimitiveValue::Seconds>());
</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& value)
</ins><span class="cx"> {
</span><del>- if (value->isInitialValue()) {
</del><ins>+ if (value.isInitialValue()) {
</ins><span class="cx"> layer->setDirection(Animation::initialAnimationDirection());
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!is<CSSPrimitiveValue>(*value))
</del><ins>+ if (!is<CSSPrimitiveValue>(value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
- switch (primitiveValue.getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(value).getValueID()) {
</ins><span class="cx"> case CSSValueNormal:
</span><span class="cx"> layer->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& value)
</ins><span class="cx"> {
</span><del>- if (value->isInitialValue()) {
</del><ins>+ if (value.isInitialValue()) {
</ins><span class="cx"> animation->setDuration(Animation::initialAnimationDuration());
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!is<CSSPrimitiveValue>(*value))
</del><ins>+ if (!is<CSSPrimitiveValue>(value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
- animation->setDuration(primitiveValue.computeTime<double, CSSPrimitiveValue::Seconds>());
</del><ins>+ animation->setDuration(downcast<CSSPrimitiveValue>(value).computeTime<double, CSSPrimitiveValue::Seconds>());
</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& value)
</ins><span class="cx"> {
</span><del>- if (value->isInitialValue()) {
</del><ins>+ if (value.isInitialValue()) {
</ins><span class="cx"> layer->setFillMode(Animation::initialAnimationFillMode());
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!is<CSSPrimitiveValue>(*value))
</del><ins>+ if (!is<CSSPrimitiveValue>(value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
- switch (primitiveValue.getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(value).getValueID()) {
</ins><span class="cx"> case CSSValueNone:
</span><span class="cx"> layer->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& value)
</ins><span class="cx"> {
</span><del>- if (value->isInitialValue()) {
</del><ins>+ if (value.isInitialValue()) {
</ins><span class="cx"> animation->setIterationCount(Animation::initialAnimationIterationCount());
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!is<CSSPrimitiveValue>(*value))
</del><ins>+ if (!is<CSSPrimitiveValue>(value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</del><ins>+ auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</ins><span class="cx"> if (primitiveValue.getValueID() == CSSValueInfinite)
</span><span class="cx"> animation->setIterationCount(Animation::IterationCountInfinite);
</span><span class="cx"> else
</span><span class="cx"> animation->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& value)
</ins><span class="cx"> {
</span><del>- if (value->isInitialValue()) {
</del><ins>+ if (value.isInitialValue()) {
</ins><span class="cx"> layer->setName(Animation::initialAnimationName());
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!is<CSSPrimitiveValue>(*value))
</del><ins>+ if (!is<CSSPrimitiveValue>(value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</del><ins>+ auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</ins><span class="cx"> if (primitiveValue.getValueID() == CSSValueNone)
</span><span class="cx"> layer->setIsNoneAnimation(true);
</span><span class="cx"> else
</span><span class="cx"> layer->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& value)
</ins><span class="cx"> {
</span><del>- if (value->isInitialValue()) {
</del><ins>+ if (value.isInitialValue()) {
</ins><span class="cx"> layer->setPlayState(Animation::initialAnimationPlayState());
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!is<CSSPrimitiveValue>(*value))
</del><ins>+ if (!is<CSSPrimitiveValue>(value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
- EAnimPlayState playState = (primitiveValue.getValueID() == CSSValuePaused) ? AnimPlayStatePaused : AnimPlayStatePlaying;
</del><ins>+ EAnimPlayState playState = (downcast<CSSPrimitiveValue>(value).getValueID() == CSSValuePaused) ? AnimPlayStatePaused : AnimPlayStatePlaying;
</ins><span class="cx"> layer->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& value)
</ins><span class="cx"> {
</span><del>- if (value->isInitialValue()) {
</del><ins>+ if (value.isInitialValue()) {
</ins><span class="cx"> animation->setAnimationMode(Animation::AnimateAll);
</span><span class="cx"> animation->setProperty(CSSPropertyInvalid);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!is<CSSPrimitiveValue>(*value))
</del><ins>+ if (!is<CSSPrimitiveValue>(value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</del><ins>+ auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</ins><span class="cx"> if (primitiveValue.getValueID() == CSSValueAll) {
</span><span class="cx"> animation->setAnimationMode(Animation::AnimateAll);
</span><span class="cx"> animation->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& value)
</ins><span class="cx"> {
</span><del>- if (value->isInitialValue()) {
</del><ins>+ if (value.isInitialValue()) {
</ins><span class="cx"> animation->setTimingFunction(Animation::initialAnimationTimingFunction());
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (is<CSSPrimitiveValue>(*value)) {
- CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
- switch (primitiveValue.getValueID()) {
</del><ins>+ if (is<CSSPrimitiveValue>(value)) {
+ switch (downcast<CSSPrimitiveValue>(value).getValueID()) {
</ins><span class="cx"> case CSSValueLinear:
</span><span class="cx"> animation->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<CSSCubicBezierTimingFunctionValue>(*value)) {
- CSSCubicBezierTimingFunctionValue& cubicTimingFunction = downcast<CSSCubicBezierTimingFunctionValue>(*value);
</del><ins>+ if (is<CSSCubicBezierTimingFunctionValue>(value)) {
+ auto& cubicTimingFunction = downcast<CSSCubicBezierTimingFunctionValue>(value);
</ins><span class="cx"> animation->setTimingFunction(CubicBezierTimingFunction::create(cubicTimingFunction.x1(), cubicTimingFunction.y1(), cubicTimingFunction.x2(), cubicTimingFunction.y2()));
</span><del>- } else if (is<CSSStepsTimingFunctionValue>(*value)) {
- CSSStepsTimingFunctionValue& stepsTimingFunction = downcast<CSSStepsTimingFunctionValue>(*value);
</del><ins>+ } else if (is<CSSStepsTimingFunctionValue>(value)) {
+ auto& stepsTimingFunction = downcast<CSSStepsTimingFunctionValue>(value);
</ins><span class="cx"> animation->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 < borderImage.length(); ++i) {
- CSSValue* current = borderImage.item(i);
-
- if (current->isImageValue() || current->isImageGeneratorValue()
</del><ins>+ for (auto& current : borderImage) {
+ if (is<CSSImageValue>(current.get()) || is<CSSImageGeneratorValue>(current.get())
</ins><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><del>- || current->isImageSetValue()
</del><ins>+ || is<CSSImageSetValue>(current.get())
</ins><span class="cx"> #endif
</span><span class="cx"> )
</span><del>- image.setImage(styleImage(imageProperty, current));
- else if (current->isBorderImageSliceValue())
- mapNinePieceImageSlice(current, image);
- else if (is<CSSValueList>(*current)) {
- CSSValueList& slashList = downcast<CSSValueList>(*current);
</del><ins>+ image.setImage(styleImage(imageProperty, current.get()));
+ else if (is<CSSBorderImageSliceValue>(current.get()))
+ mapNinePieceImageSlice(current.get(), image);
+ else if (is<CSSValueList>(current.get())) {
+ CSSValueList& slashList = downcast<CSSValueList>(current.get());
</ins><span class="cx"> // Map in the image slices.
</span><del>- if (slashList.item(0) && slashList.item(0)->isBorderImageSliceValue())
- mapNinePieceImageSlice(slashList.item(0), image);
</del><ins>+ if (is<CSSBorderImageSliceValue>(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->isPrimitiveValue()) {
</del><ins>+ image.setOutset(mapNinePieceImageQuad(*slashList.item(2)));
+ } else if (is<CSSPrimitiveValue>(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& image)
</del><ins>+void CSSToStyleMap::mapNinePieceImageSlice(CSSValue& value, NinePieceImage& image)
</ins><span class="cx"> {
</span><span class="cx"> if (!is<CSSBorderImageSliceValue>(value))
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // Retrieve the border image value.
</span><del>- CSSBorderImageSliceValue& borderImageSlice = downcast<CSSBorderImageSliceValue>(*value);
</del><ins>+ auto& borderImageSlice = downcast<CSSBorderImageSliceValue>(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& value)
</ins><span class="cx"> {
</span><span class="cx"> if (!is<CSSPrimitiveValue>(value))
</span><span class="cx"> return LengthBox();
</span><span class="lines">@@ -632,7 +627,7 @@
</span><span class="cx"> CSSToLengthConversionData conversionData = useSVGZoomRules() ? m_resolver->state().cssToLengthConversionData().copyWithAdjustedZoom(1.0f) : m_resolver->state().cssToLengthConversionData();
</span><span class="cx">
</span><span class="cx"> // Retrieve the primitive value.
</span><del>- CSSPrimitiveValue& borderWidths = downcast<CSSPrimitiveValue>(*value);
</del><ins>+ auto& borderWidths = downcast<CSSPrimitiveValue>(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& image)
</del><ins>+void CSSToStyleMap::mapNinePieceImageRepeat(CSSValue& value, NinePieceImage& image)
</ins><span class="cx"> {
</span><span class="cx"> if (!is<CSSPrimitiveValue>(value))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(value);
</ins><span class="cx"> Pair* pair = primitiveValue.getPairValue();
</span><span class="cx"> if (!pair || !pair->first() || !pair->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&);
+ 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&);
</ins><span class="cx">
</span><span class="cx"> void mapNinePieceImage(CSSPropertyID, CSSValue*, NinePieceImage&);
</span><del>- void mapNinePieceImageSlice(CSSValue*, NinePieceImage&);
- LengthBox mapNinePieceImageQuad(CSSValue*);
- void mapNinePieceImageRepeat(CSSValue*, NinePieceImage&);
</del><ins>+ void mapNinePieceImageSlice(CSSValue&, NinePieceImage&);
+ LengthBox mapNinePieceImageQuad(CSSValue&);
+ void mapNinePieceImageRepeat(CSSValue&, NinePieceImage&);
</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<StyleImage> styleImage(CSSPropertyID, CSSValue*);
</del><ins>+ PassRefPtr<StyleImage> styleImage(CSSPropertyID, CSSValue&);
</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<Ref<CSSValue>, 4>::iterator iterator;
+ typedef Vector<Ref<CSSValue>, 4>::const_iterator const_iterator;
+
</ins><span class="cx"> static PassRef<CSSValueList> 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 &m_values[index].get(); }
</span><span class="cx"> const CSSValue* itemWithoutBoundsCheck(size_t index) const { ASSERT(index < m_values.size()); return &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<CSSValue>);
</span><span class="cx"> void prepend(PassRef<CSSValue>);
</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<CSSValueList>(value) ? downcast<CSSValueList>(value) : nullptr)
- {
- }
-
- CSSValue* item(size_t index) const { ASSERT_WITH_SECURITY_IMPLICATION(index < length()); return m_list->itemWithoutBoundsCheck(index); }
- CSSValue* first() const { return item(0); }
- CSSValue* second() const { return item(1); }
- size_t length() const { return m_list ? m_list->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 < m_inspector.length(); }
- CSSValue* value() const { return m_inspector.item(m_position); }
- bool isPrimitiveValue() const { return value()->isPrimitiveValue(); }
- void advance() { m_position++; ASSERT(m_position <= 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 "CSSAspectRatioValue.h"
</span><span class="cx"> #include "CSSCalculationValue.h"
</span><span class="cx"> #include "CSSCursorImageValue.h"
</span><ins>+#include "CSSImageGeneratorValue.h"
</ins><span class="cx"> #include "CSSImageSetValue.h"
</span><span class="cx"> #include "CSSPrimitiveValue.h"
</span><span class="cx"> #include "CSSPrimitiveValueMappings.h"
</span><span class="lines">@@ -163,7 +164,7 @@
</span><span class="cx"> template <StyleImage* (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(PassRefPtr<StyleImage>), StyleImage* (*initialFunction)(), CSSPropertyID property>
</span><span class="cx"> class ApplyPropertyStyleImage {
</span><span class="cx"> public:
</span><del>- static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value) { (styleResolver->style()->*setterFunction)(styleResolver->styleImage(property, value)); }
</del><ins>+ static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value) { (styleResolver->style()->*setterFunction)(styleResolver->styleImage(property, *value)); }
</ins><span class="cx"> static PropertyHandler createHandler()
</span><span class="cx"> {
</span><span class="cx"> PropertyHandler handler = ApplyPropertyDefaultBase<StyleImage*, getterFunction, PassRefPtr<StyleImage>, setterFunction, StyleImage*, initialFunction>::createHandler();
</span><span class="lines">@@ -850,16 +851,16 @@
</span><span class="cx"> NinePieceImage image(getValue(styleResolver->style()));
</span><span class="cx"> switch (modifier) {
</span><span class="cx"> case Outset:
</span><del>- image.setOutset(styleResolver->styleMap()->mapNinePieceImageQuad(value));
</del><ins>+ image.setOutset(styleResolver->styleMap()->mapNinePieceImageQuad(*value));
</ins><span class="cx"> break;
</span><span class="cx"> case Repeat:
</span><del>- styleResolver->styleMap()->mapNinePieceImageRepeat(value, image);
</del><ins>+ styleResolver->styleMap()->mapNinePieceImageRepeat(*value, image);
</ins><span class="cx"> break;
</span><span class="cx"> case Slice:
</span><del>- styleResolver->styleMap()->mapNinePieceImageSlice(value, image);
</del><ins>+ styleResolver->styleMap()->mapNinePieceImageSlice(*value, image);
</ins><span class="cx"> break;
</span><span class="cx"> case Width:
</span><del>- image.setBorderSlices(styleResolver->styleMap()->mapNinePieceImageQuad(value));
</del><ins>+ image.setBorderSlices(styleResolver->styleMap()->mapNinePieceImageQuad(*value));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> setValue(styleResolver->style(), image);
</span><span class="lines">@@ -961,7 +962,7 @@
</span><span class="cx"> CSSCursorImageValue& image = downcast<CSSCursorImageValue>(*item);
</span><span class="cx"> if (image.updateIfSVGCursorIsUsed(styleResolver->element())) // Elements with SVG cursors are not allowed to share style.
</span><span class="cx"> styleResolver->style()->setUnique();
</span><del>- styleResolver->style()->addCursor(styleResolver->styleImage(CSSPropertyCursor, &image), image.hotSpot());
</del><ins>+ styleResolver->style()->addCursor(styleResolver->styleImage(CSSPropertyCursor, image), image.hotSpot());
</ins><span class="cx"> } else if (is<CSSPrimitiveValue>(*item)) {
</span><span class="cx"> CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*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<CSSPrimitiveValue>(*i.value()));
</del><ins>+ if (is<CSSValueList>(*value)) {
+ for (auto& currentValue : downcast<CSSValueList>(*value))
+ skip |= valueToDecorationSkip(downcast<CSSPrimitiveValue>(currentValue.get()));
+ }
</ins><span class="cx"> styleResolver->style()->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<CSSPrimitiveValue>(*item);
- t |= t2;
</del><ins>+ if (is<CSSValueList>(*value)) {
+ for (auto& currentValue : downcast<CSSValueList>(*value)) {
+ TextUnderlinePosition t2 = downcast<CSSPrimitiveValue>(currentValue.get());
+ t |= t2;
+ }
</ins><span class="cx"> }
</span><span class="cx"> styleResolver->style()->setTextUnderlinePosition(static_cast<TextUnderlinePosition>(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<CSSValueList>(value))
+ return;
+
+ auto& valueList = downcast<CSSValueList>(*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"> // <length>{2} | <page-size> <orientation>
</span><del>- if (!is<CSSPrimitiveValue>(*inspector.first()) || !is<CSSPrimitiveValue>(*inspector.second()))
</del><ins>+ if (!is<CSSPrimitiveValue>(*firstValue) || !is<CSSPrimitiveValue>(*secondValue))
</ins><span class="cx"> return;
</span><del>- CSSPrimitiveValue& first = downcast<CSSPrimitiveValue>(*inspector.first());
- CSSPrimitiveValue& second = downcast<CSSPrimitiveValue>(*inspector.second());
- if (first.isLength()) {
</del><ins>+ auto& firstPrimitiveValue = downcast<CSSPrimitiveValue>(*firstValue);
+ auto& secondPrimitiveValue = downcast<CSSPrimitiveValue>(*secondValue);
+ if (firstPrimitiveValue.isLength()) {
</ins><span class="cx"> // <length>{2}
</span><del>- if (!second.isLength())
</del><ins>+ if (!secondPrimitiveValue.isLength())
</ins><span class="cx"> return;
</span><span class="cx"> CSSToLengthConversionData conversionData = styleResolver->state().cssToLengthConversionData().copyWithAdjustedZoom(1.0f);
</span><del>- width = first.computeLength<Length>(conversionData);
- height = second.computeLength<Length>(conversionData);
</del><ins>+ width = firstPrimitiveValue.computeLength<Length>(conversionData);
+ height = secondPrimitiveValue.computeLength<Length>(conversionData);
</ins><span class="cx"> } else {
</span><span class="cx"> // <page-size> <orientation>
</span><span class="cx"> // The value order is guaranteed. See CSSParser::parseSizeParameter.
</span><del>- if (!getPageSizeFromName(&first, &second, width, height))
</del><ins>+ if (!getPageSizeFromName(&firstPrimitiveValue, &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"> // <length> | auto | <page-size> | [ portrait | landscape]
</span><del>- if (!is<CSSPrimitiveValue>(*inspector.first()))
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><del>- CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*inspector.first());
</del><ins>+ auto& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx"> if (primitiveValue.isLength()) {
</span><span class="cx"> // <length>
</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<CSSPrimitiveValue>(*i.value()));
</del><ins>+ if (is<CSSValueList>(*value)) {
+ for (auto& currentValue : downcast<CSSValueList>(*value))
+ position |= valueToEmphasisPosition(downcast<CSSPrimitiveValue>(currentValue.get()));
+ }
</ins><span class="cx"> styleResolver->style()->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&),
</ins><span class="cx"> AnimationList* (RenderStyle::*animationGetterFunction)(),
</span><span class="cx"> const AnimationList* (RenderStyle::*immutableAnimationGetterFunction)() const>
</span><span class="cx"> class ApplyPropertyAnimation {
</span><span class="lines">@@ -1525,7 +1537,7 @@
</span><span class="cx"> static bool test(const Animation& animation) { return (animation.*testFunction)(); }
</span><span class="cx"> static void clear(Animation& animation) { (animation.*clearFunction)(); }
</span><span class="cx"> static T initial() { return (*initialFunction)(); }
</span><del>- static void map(StyleResolver* styleResolver, Animation& animation, CSSValue* value) { (styleResolver->styleMap()->*mapFunction)(&animation, value); }
</del><ins>+ static void map(StyleResolver* styleResolver, Animation& animation, CSSValue& value) { (styleResolver->styleMap()->*mapFunction)(&animation, value); }
</ins><span class="cx"> static AnimationList* accessAnimations(RenderStyle* style) { return (style->*animationGetterFunction)(); }
</span><span class="cx"> static const AnimationList* animations(RenderStyle* style) { return (style->*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->style());
</span><span class="cx"> size_t childIndex = 0;
</span><del>- if (value->isValueList()) {
</del><ins>+ if (is<CSSValueList>(*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& currentValue : downcast<CSSValueList>(*value)) {
</ins><span class="cx"> if (childIndex <= list->size())
</span><span class="cx"> list->append(Animation::create());
</span><del>- map(styleResolver, list->animation(childIndex), i.value());
</del><ins>+ map(styleResolver, list->animation(childIndex), currentValue.get());
</ins><span class="cx"> ++childIndex;
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="cx"> if (list->isEmpty())
</span><span class="cx"> list->append(Animation::create());
</span><del>- map(styleResolver, list->animation(childIndex), value);
</del><ins>+ map(styleResolver, list->animation(childIndex), *value);
</ins><span class="cx"> childIndex = 1;
</span><span class="cx"> }
</span><span class="cx"> for ( ; childIndex < list->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&, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> TextDecoration result = RenderStyle::initialTextDecoration();
</span><del>- for (CSSValueListIterator it(&value); it.hasMore(); it.advance())
- result |= downcast<CSSPrimitiveValue>(*it.value());
</del><ins>+ if (is<CSSValueList>(value)) {
+ for (auto& currentValue : downcast<CSSValueList>(value))
+ result |= downcast<CSSPrimitiveValue>(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 <CSSPropertyID property>
</span><span class="cx"> inline PassRefPtr<StyleImage> StyleBuilderConverter::convertBorderImageSource(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><del>- return styleResolver.styleImage(property, &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& styleResolver, CSSValue& 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<CSSPrimitiveValue>(value).getValueID() == CSSValueAuto)
</span><span class="cx"> styleResolver.style()->setShapeOutside(nullptr);
</span><span class="cx"> } if (is<CSSImageValue>(value) || is<CSSImageGeneratorValue>(value) || is<CSSImageSetValue>(value)) {
</span><del>- RefPtr<ShapeValue> shape = ShapeValue::createImageValue(styleResolver.styleImage(CSSPropertyWebkitShapeOutside, &value));
</del><ins>+ RefPtr<ShapeValue> shape = ShapeValue::createImageValue(styleResolver.styleImage(CSSPropertyWebkitShapeOutside, value));
</ins><span class="cx"> styleResolver.style()->setShapeOutside(shape.release());
</span><span class="cx"> } else if (is<CSSValueList>(value)) {
</span><span class="cx"> RefPtr<BasicShape> shape;
</span><span class="cx"> CSSBoxType referenceBox = BoxMissing;
</span><del>- auto& valueList = downcast<CSSValueList>(value);
- for (unsigned i = 0; i < valueList.length(); ++i) {
- CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*valueList.itemWithoutBoundsCheck(i));
</del><ins>+ for (auto& currentValue : downcast<CSSValueList>(value)) {
+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(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& trackSize, const StyleResolver::State& state)
</del><ins>+static bool createGridTrackSize(CSSValue& value, GridTrackSize& trackSize, const StyleResolver::State& state)
</ins><span class="cx"> {
</span><del>- if (is<CSSPrimitiveValue>(*value)) {
- CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</del><ins>+ if (is<CSSPrimitiveValue>(value)) {
+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(value);
</ins><span class="cx"> GridLength workingLength;
</span><span class="cx"> if (!createGridTrackBreadth(&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& minmaxFunction = downcast<CSSFunctionValue>(*value);
</del><ins>+ CSSFunctionValue& minmaxFunction = downcast<CSSFunctionValue>(value);
</ins><span class="cx"> CSSValueList* arguments = minmaxFunction.arguments();
</span><span class="cx"> ASSERT_WITH_SECURITY_IMPLICATION(arguments->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->isValueList())
</del><ins>+ if (!is<CSSValueList>(*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<CSSGridLineNamesValue>(*currValue)) {
- CSSGridLineNamesValue& lineNamesValue = downcast<CSSGridLineNamesValue>(*currValue);
- for (CSSValueListIterator j = &lineNamesValue; j.hasMore(); j.advance()) {
- String namedGridLine = downcast<CSSPrimitiveValue>(j.value())->getStringValue();
</del><ins>+ for (auto& currentValue : downcast<CSSValueList>(*value)) {
+ if (is<CSSGridLineNamesValue>(currentValue.get())) {
+ for (auto& currentGridLineName : downcast<CSSGridLineNamesValue>(currentValue.get())) {
+ String namedGridLine = downcast<CSSPrimitiveValue>(currentGridLineName.get()).getStringValue();
</ins><span class="cx"> NamedGridLinesMap::AddResult result = namedGridLines.add(namedGridLine, Vector<size_t>());
</span><span class="cx"> result.iterator->value.append(currentNamedGridLine);
</span><span class="cx"> OrderedNamedGridLinesMap::AddResult orderedResult = orderedNamedGridLines.add(currentNamedGridLine, Vector<String>());
</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& values = downcast<CSSValueList>(*value);
</del><ins>+ auto& values = downcast<CSSValueList>(*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 = &values;
- CSSPrimitiveValue* currentValue = downcast<CSSPrimitiveValue>(it.value());
</del><ins>+ auto it = values.begin();
+ CSSPrimitiveValue* currentValue = &downcast<CSSPrimitiveValue>(it->get());
</ins><span class="cx"> if (currentValue->getValueID() == CSSValueSpan) {
</span><span class="cx"> isSpanPosition = true;
</span><del>- it.advance();
- currentValue = it.hasMore() ? downcast<CSSPrimitiveValue>(it.value()) : nullptr;
</del><ins>+ ++it;
+ currentValue = it != values.end() ? &downcast<CSSPrimitiveValue>(it->get()) : nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (currentValue && currentValue->isNumber()) {
</span><span class="cx"> gridLineNumber = currentValue->getIntValue();
</span><del>- it.advance();
- currentValue = it.hasMore() ? downcast<CSSPrimitiveValue>(it.value()) : nullptr;
</del><ins>+ ++it;
+ currentValue = it != values.end() ? &downcast<CSSPrimitiveValue>(it->get()) : nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (currentValue && currentValue->isString()) {
</span><span class="cx"> gridLineName = currentValue->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(&value); it.hasMore(); it.advance()) {
- auto& itemValue = downcast<CSSPrimitiveValue>(*it.value());
- if (auto* lengthRepeat = itemValue.getLengthRepeatValue()) {
- if (auto* interval = lengthRepeat->interval()) {
- points.repeatOffset = parseSnapCoordinate(*interval);
- points.hasRepeat = true;
- break;
</del><ins>+ if (is<CSSValueList>(value)) {
+ for (auto& currentValue : downcast<CSSValueList>(value)) {
+ auto& itemValue = downcast<CSSPrimitiveValue>(currentValue.get());
+ if (auto* lengthRepeat = itemValue.getLengthRepeatValue()) {
+ if (auto* interval = lengthRepeat->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->isValueList())
</del><ins>+ if (!is<CSSValueList>(*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<CSSImageGeneratorValue>(*item)) {
- if (is<CSSGradientValue>(*item))
- state.style()->setContent(StyleGeneratedImage::create(*downcast<CSSGradientValue>(*item).gradientWithStylesResolved(this)), didSet);
</del><ins>+ for (auto& item : downcast<CSSValueList>(*value)) {
+ if (is<CSSImageGeneratorValue>(item.get())) {
+ if (is<CSSGradientValue>(item.get()))
+ state.style()->setContent(StyleGeneratedImage::create(*downcast<CSSGradientValue>(item.get()).gradientWithStylesResolved(this)), didSet);
</ins><span class="cx"> else
</span><del>- state.style()->setContent(StyleGeneratedImage::create(downcast<CSSImageGeneratorValue>(*item)), didSet);
</del><ins>+ state.style()->setContent(StyleGeneratedImage::create(downcast<CSSImageGeneratorValue>(item.get())), didSet);
</ins><span class="cx"> didSet = true;
</span><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><del>- } else if (is<CSSImageSetValue>(*item)) {
- state.style()->setContent(setOrPendingFromValue(CSSPropertyContent, downcast<CSSImageSetValue>(item)), didSet);
</del><ins>+ } else if (is<CSSImageSetValue>(item.get())) {
+ state.style()->setContent(setOrPendingFromValue(CSSPropertyContent, downcast<CSSImageSetValue>(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<CSSImageValue>(*item)) {
- state.style()->setContent(cachedOrPendingFromValue(CSSPropertyContent, downcast<CSSImageValue>(item)), didSet);
</del><ins>+ if (is<CSSImageValue>(item.get())) {
+ state.style()->setContent(cachedOrPendingFromValue(CSSPropertyContent, downcast<CSSImageValue>(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<CSSPrimitiveValue>(*item))
</del><ins>+ if (!is<CSSPrimitiveValue>(item.get()))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- CSSPrimitiveValue& contentValue = downcast<CSSPrimitiveValue>(*item);
</del><ins>+ auto& contentValue = downcast<CSSPrimitiveValue>(item.get());
</ins><span class="cx">
</span><span class="cx"> if (contentValue.isString()) {
</span><span class="cx"> state.style()->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()->setTextShadow(nullptr) : state.style()->setBoxShadow(nullptr);
</span><span class="cx">
</span><del>- if (!value->isValueList())
</del><ins>+ if (!is<CSSValueList>(*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<CSSShadowValue>(*currValue))
</del><ins>+ bool isFirstEntry = true;
+ for (auto& currentValue : downcast<CSSValueList>(*value)) {
+ if (!is<CSSShadowValue>(currentValue.get()))
</ins><span class="cx"> continue;
</span><del>- CSSShadowValue& item = downcast<CSSShadowValue>(*currValue);
</del><ins>+ auto& item = downcast<CSSShadowValue>(currentValue.get());
</ins><span class="cx"> int x = item.x->computeLength<int>(state.cssToLengthConversionData());
</span><span class="cx"> int y = item.y->computeLength<int>(state.cssToLengthConversionData());
</span><span class="cx"> int blur = item.blur ? item.blur->computeLength<int>(state.cssToLengthConversionData()) : 0;
</span><span class="lines">@@ -2423,9 +2422,11 @@
</span><span class="cx">
</span><span class="cx"> auto shadowData = std::make_unique<ShadowData>(IntPoint(x, y), blur, spread, shadowStyle, id == CSSPropertyWebkitBoxShadow, color.isValid() ? color : Color::transparent);
</span><span class="cx"> if (id == CSSPropertyTextShadow)
</span><del>- state.style()->setTextShadow(WTF::move(shadowData), i.index()); // add to the list if this is not the first entry
</del><ins>+ state.style()->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()->setBoxShadow(WTF::move(shadowData), i.index()); // add to the list if this is not the first entry
</del><ins>+ state.style()->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()->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()->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<StyleImage> StyleResolver::styleImage(CSSPropertyID property, CSSValue* value)
</del><ins>+PassRefPtr<StyleImage> StyleResolver::styleImage(CSSPropertyID property, CSSValue& value)
</ins><span class="cx"> {
</span><del>- if (is<CSSImageValue>(*value))
</del><ins>+ if (is<CSSImageValue>(value))
</ins><span class="cx"> return cachedOrPendingFromValue(property, downcast<CSSImageValue>(value));
</span><span class="cx">
</span><del>- if (is<CSSImageGeneratorValue>(*value)) {
- if (is<CSSGradientValue>(*value))
- return generatedOrPendingFromValue(property, *downcast<CSSGradientValue>(*value).gradientWithStylesResolved(this));
- return generatedOrPendingFromValue(property, downcast<CSSImageGeneratorValue>(*value));
</del><ins>+ if (is<CSSImageGeneratorValue>(value)) {
+ if (is<CSSGradientValue>(value))
+ return generatedOrPendingFromValue(property, *downcast<CSSGradientValue>(value).gradientWithStylesResolved(this));
+ return generatedOrPendingFromValue(property, downcast<CSSImageGeneratorValue>(value));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><del>- if (is<CSSImageSetValue>(*value))
</del><ins>+ if (is<CSSImageSetValue>(value))
</ins><span class="cx"> return setOrPendingFromValue(property, downcast<CSSImageSetValue>(value));
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- if (is<CSSCursorImageValue>(*value))
</del><ins>+ if (is<CSSCursorImageValue>(value))
</ins><span class="cx"> return cursorOrPendingFromValue(property, downcast<CSSCursorImageValue>(value));
</span><span class="cx">
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<StyleImage> StyleResolver::cachedOrPendingFromValue(CSSPropertyID property, CSSImageValue* value)
</del><ins>+PassRefPtr<StyleImage> StyleResolver::cachedOrPendingFromValue(CSSPropertyID property, CSSImageValue& value)
</ins><span class="cx"> {
</span><del>- RefPtr<StyleImage> image = value->cachedOrPendingImage();
</del><ins>+ RefPtr<StyleImage> image = value.cachedOrPendingImage();
</ins><span class="cx"> if (image && image->isPendingImage())
</span><del>- m_state.pendingImageProperties().set(property, value);
</del><ins>+ m_state.pendingImageProperties().set(property, &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<StyleImage> StyleResolver::setOrPendingFromValue(CSSPropertyID property, CSSImageSetValue* value)
</del><ins>+PassRefPtr<StyleImage> StyleResolver::setOrPendingFromValue(CSSPropertyID property, CSSImageSetValue& value)
</ins><span class="cx"> {
</span><del>- RefPtr<StyleImage> image = value->cachedOrPendingImageSet(document());
</del><ins>+ RefPtr<StyleImage> image = value.cachedOrPendingImageSet(document());
</ins><span class="cx"> if (image && image->isPendingImage())
</span><del>- m_state.pendingImageProperties().set(property, value);
</del><ins>+ m_state.pendingImageProperties().set(property, &value);
</ins><span class="cx"> return image.release();
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-PassRefPtr<StyleImage> StyleResolver::cursorOrPendingFromValue(CSSPropertyID property, CSSCursorImageValue* value)
</del><ins>+PassRefPtr<StyleImage> StyleResolver::cursorOrPendingFromValue(CSSPropertyID property, CSSCursorImageValue& value)
</ins><span class="cx"> {
</span><del>- RefPtr<StyleImage> image = value->cachedOrPendingImage(document());
</del><ins>+ RefPtr<StyleImage> image = value.cachedOrPendingImage(document());
</ins><span class="cx"> if (image && image->isPendingImage())
</span><del>- m_state.pendingImageProperties().set(property, value);
</del><ins>+ m_state.pendingImageProperties().set(property, &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->isValueList())
</del><ins>+ if (!is<CSSValueList>(*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<WebKitCSSFilterValue>(*currValue))
</del><ins>+ for (auto& currentValue : downcast<CSSValueList>(*inValue)) {
+ if (!is<WebKitCSSFilterValue>(currentValue.get()))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- WebKitCSSFilterValue& filterValue = downcast<WebKitCSSFilterValue>(*i.value());
</del><ins>+ auto& filterValue = downcast<WebKitCSSFilterValue>(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<StyleImage> styleImage(CSSPropertyID, CSSValue*);
- PassRefPtr<StyleImage> cachedOrPendingFromValue(CSSPropertyID, CSSImageValue*);
</del><ins>+ PassRefPtr<StyleImage> styleImage(CSSPropertyID, CSSValue&);
+ PassRefPtr<StyleImage> cachedOrPendingFromValue(CSSPropertyID, CSSImageValue&);
</ins><span class="cx"> PassRefPtr<StyleImage> generatedOrPendingFromValue(CSSPropertyID, CSSImageGeneratorValue&);
</span><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><del>- PassRefPtr<StyleImage> setOrPendingFromValue(CSSPropertyID, CSSImageSetValue*);
</del><ins>+ PassRefPtr<StyleImage> setOrPendingFromValue(CSSPropertyID, CSSImageSetValue&);
</ins><span class="cx"> #endif
</span><del>- PassRefPtr<StyleImage> cursorOrPendingFromValue(CSSPropertyID, CSSCursorImageValue*);
</del><ins>+ PassRefPtr<StyleImage> cursorOrPendingFromValue(CSSPropertyID, CSSCursorImageValue&);
</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& value, const CSSToLengthConversionData& conversionData, TransformOperations& outOperations)
</span><span class="cx"> {
</span><del>- if (!value.isValueList()) {
</del><ins>+ if (!is<CSSValueList>(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 = &value; i.hasMore(); i.advance()) {
- CSSValue& currValue = *i.value();
-
- if (!is<WebKitCSSTransformValue>(currValue))
</del><ins>+ for (auto& currentValue : downcast<CSSValueList>(value)) {
+ if (!is<WebKitCSSTransformValue>(currentValue.get()))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- WebKitCSSTransformValue& transformValue = downcast<WebKitCSSTransformValue>(currValue);
</del><ins>+ auto& transformValue = downcast<WebKitCSSTransformValue>(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>