<!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>[172536] 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/172536">172536</a></dd>
<dt>Author</dt> <dd>akling@apple.com</dd>
<dt>Date</dt> <dd>2014-08-13 14:06:23 -0700 (Wed, 13 Aug 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>CSSValueList should never contain null values.
<https://webkit.org/b/135887>
It's not legal for a CSSValueList to contain null CSSValues, so make
it store a Vector of Ref<CSSValue> internally instead.
This allows the compiler to avoid emitting a number of null checks.
It will also allow a future patch to make CSSValueList vend CSSValue&
instead of CSSValue*.
Most of the patch is fixing up things on their way into a CSSValueList
to not be null at the call site, now that append() and prepend() are
taking PassRef instead of PassRefPtr.
Reviewed by Sam Weinig.
* css/BasicShapeFunctions.cpp:
(WebCore::valueForBasicShape):
* css/BasicShapeFunctions.h:
* css/CSSBorderImage.cpp:
(WebCore::createBorderImageValue):
* css/CSSBorderImage.h:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForImageSliceSide):
(WebCore::valueForNinePieceImageSlice):
(WebCore::valueForNinePieceImageQuad):
(WebCore::valueForNinePieceImage):
(WebCore::getBorderRadiusShorthandValue):
(WebCore::ComputedStyleExtractor::valueForShadow):
(WebCore::ComputedStyleExtractor::valueForFilter):
(WebCore::specifiedValueForGridTrackSize):
(WebCore::addValuesForNamedGridLinesAtIndex):
(WebCore::scrollSnapCoordinates):
(WebCore::createTimingFunctionValue):
(WebCore::fillSourceTypeToCSSValue):
(WebCore::contentToCSSValue):
(WebCore::shapePropertyValue):
(WebCore::ComputedStyleExtractor::propertyValue):
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand):
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
(WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
* css/CSSComputedStyleDeclaration.h:
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule):
* css/CSSParser.cpp:
(WebCore::createPrimitiveValuePair):
(WebCore::parseTranslateTransformValue):
(WebCore::CSSParser::createPrimitiveNumericValue):
(WebCore::CSSParser::createPrimitiveStringValue):
(WebCore::CSSParser::addFillValue):
(WebCore::CSSParser::parseNonElementSnapPoints):
(WebCore::CSSParser::parseScrollSnapDestination):
(WebCore::CSSParser::parseFillShorthand):
(WebCore::CSSParser::addAnimationValue):
(WebCore::CSSParser::parseAnimationShorthand):
(WebCore::CSSParser::parseTransitionShorthand):
(WebCore::CSSParser::parseQuotes):
(WebCore::CSSParser::parseContent):
(WebCore::CSSParser::parseFillProperty):
(WebCore::CSSParser::parseAnimationProperty):
(WebCore::CSSParser::parseGridPosition):
(WebCore::CSSParser::parseGridTemplateRowsAndAreas):
(WebCore::CSSParser::parseGridLineNames):
(WebCore::CSSParser::parseGridTrackList):
(WebCore::CSSParser::parseGridTrackRepeatFunction):
(WebCore::CSSParser::parseGridTrackSize):
(WebCore::CSSParser::parseBasicShapeAndOrBox):
(WebCore::CSSParser::parseFontVariant):
(WebCore::CSSParser::parseTransform):
(WebCore::CSSParser::parseBuiltinFilterArguments):
(WebCore::CSSParser::parseFilter):
(WebCore::CSSParser::parseTextEmphasisStyle):
* css/CSSParser.h:
* css/CSSProperty.cpp:
(WebCore::CSSProperty::wrapValueInCommaSeparatedList):
* css/CSSValueList.cpp:
(WebCore::CSSValueList::CSSValueList):
(WebCore::CSSValueList::removeAll):
(WebCore::CSSValueList::hasValue):
(WebCore::CSSValueList::copy):
(WebCore::CSSValueList::customCSSText):
(WebCore::CSSValueList::equals):
(WebCore::CSSValueList::addSubresourceStyleURLs):
(WebCore::CSSValueList::hasFailedOrCanceledSubresources):
* css/CSSValueList.h:
(WebCore::CSSValueList::item):
(WebCore::CSSValueList::itemWithoutBoundsCheck):
(WebCore::CSSValueList::append):
(WebCore::CSSValueList::prepend):
* css/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::paintOrder):
* css/SVGCSSParser.cpp:
(WebCore::CSSParser::parsePaintOrder):
* editing/EditingStyle.cpp:
(WebCore::mergeTextDecorationValues):
* editing/EditorCommand.cpp:
(WebCore::executeToggleStyleInList):
* svg/SVGFontFaceSrcElement.cpp:
(WebCore::SVGFontFaceSrcElement::srcValue):
* svg/SVGLength.cpp:
(WebCore::SVGLength::toCSSPrimitiveValue):
* svg/SVGLength.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssBasicShapeFunctionscpp">trunk/Source/WebCore/css/BasicShapeFunctions.cpp</a></li>
<li><a href="#trunkSourceWebCorecssBasicShapeFunctionsh">trunk/Source/WebCore/css/BasicShapeFunctions.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSBorderImagecpp">trunk/Source/WebCore/css/CSSBorderImage.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSBorderImageh">trunk/Source/WebCore/css/CSSBorderImage.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationh">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontSelectorcpp">trunk/Source/WebCore/css/CSSFontSelector.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParserh">trunk/Source/WebCore/css/CSSParser.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSPropertycpp">trunk/Source/WebCore/css/CSSProperty.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueListcpp">trunk/Source/WebCore/css/CSSValueList.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueListh">trunk/Source/WebCore/css/CSSValueList.h</a></li>
<li><a href="#trunkSourceWebCorecssSVGCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssSVGCSSParsercpp">trunk/Source/WebCore/css/SVGCSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditingStylecpp">trunk/Source/WebCore/editing/EditingStyle.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorCommandcpp">trunk/Source/WebCore/editing/EditorCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFontFaceSrcElementcpp">trunk/Source/WebCore/svg/SVGFontFaceSrcElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGLengthcpp">trunk/Source/WebCore/svg/SVGLength.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGLengthh">trunk/Source/WebCore/svg/SVGLength.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (172535 => 172536)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-08-13 20:31:34 UTC (rev 172535)
+++ trunk/Source/WebCore/ChangeLog        2014-08-13 21:06:23 UTC (rev 172536)
</span><span class="lines">@@ -1,3 +1,109 @@
</span><ins>+2014-08-13 Andreas Kling <akling@apple.com>
+
+ CSSValueList should never contain null values.
+ <https://webkit.org/b/135887>
+
+ It's not legal for a CSSValueList to contain null CSSValues, so make
+ it store a Vector of Ref<CSSValue> internally instead.
+
+ This allows the compiler to avoid emitting a number of null checks.
+ It will also allow a future patch to make CSSValueList vend CSSValue&
+ instead of CSSValue*.
+
+ Most of the patch is fixing up things on their way into a CSSValueList
+ to not be null at the call site, now that append() and prepend() are
+ taking PassRef instead of PassRefPtr.
+
+ Reviewed by Sam Weinig.
+
+ * css/BasicShapeFunctions.cpp:
+ (WebCore::valueForBasicShape):
+ * css/BasicShapeFunctions.h:
+ * css/CSSBorderImage.cpp:
+ (WebCore::createBorderImageValue):
+ * css/CSSBorderImage.h:
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::valueForImageSliceSide):
+ (WebCore::valueForNinePieceImageSlice):
+ (WebCore::valueForNinePieceImageQuad):
+ (WebCore::valueForNinePieceImage):
+ (WebCore::getBorderRadiusShorthandValue):
+ (WebCore::ComputedStyleExtractor::valueForShadow):
+ (WebCore::ComputedStyleExtractor::valueForFilter):
+ (WebCore::specifiedValueForGridTrackSize):
+ (WebCore::addValuesForNamedGridLinesAtIndex):
+ (WebCore::scrollSnapCoordinates):
+ (WebCore::createTimingFunctionValue):
+ (WebCore::fillSourceTypeToCSSValue):
+ (WebCore::contentToCSSValue):
+ (WebCore::shapePropertyValue):
+ (WebCore::ComputedStyleExtractor::propertyValue):
+ (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
+ (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand):
+ (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
+ (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
+ * css/CSSComputedStyleDeclaration.h:
+ * css/CSSFontSelector.cpp:
+ (WebCore::CSSFontSelector::addFontFaceRule):
+ * css/CSSParser.cpp:
+ (WebCore::createPrimitiveValuePair):
+ (WebCore::parseTranslateTransformValue):
+ (WebCore::CSSParser::createPrimitiveNumericValue):
+ (WebCore::CSSParser::createPrimitiveStringValue):
+ (WebCore::CSSParser::addFillValue):
+ (WebCore::CSSParser::parseNonElementSnapPoints):
+ (WebCore::CSSParser::parseScrollSnapDestination):
+ (WebCore::CSSParser::parseFillShorthand):
+ (WebCore::CSSParser::addAnimationValue):
+ (WebCore::CSSParser::parseAnimationShorthand):
+ (WebCore::CSSParser::parseTransitionShorthand):
+ (WebCore::CSSParser::parseQuotes):
+ (WebCore::CSSParser::parseContent):
+ (WebCore::CSSParser::parseFillProperty):
+ (WebCore::CSSParser::parseAnimationProperty):
+ (WebCore::CSSParser::parseGridPosition):
+ (WebCore::CSSParser::parseGridTemplateRowsAndAreas):
+ (WebCore::CSSParser::parseGridLineNames):
+ (WebCore::CSSParser::parseGridTrackList):
+ (WebCore::CSSParser::parseGridTrackRepeatFunction):
+ (WebCore::CSSParser::parseGridTrackSize):
+ (WebCore::CSSParser::parseBasicShapeAndOrBox):
+ (WebCore::CSSParser::parseFontVariant):
+ (WebCore::CSSParser::parseTransform):
+ (WebCore::CSSParser::parseBuiltinFilterArguments):
+ (WebCore::CSSParser::parseFilter):
+ (WebCore::CSSParser::parseTextEmphasisStyle):
+ * css/CSSParser.h:
+ * css/CSSProperty.cpp:
+ (WebCore::CSSProperty::wrapValueInCommaSeparatedList):
+ * css/CSSValueList.cpp:
+ (WebCore::CSSValueList::CSSValueList):
+ (WebCore::CSSValueList::removeAll):
+ (WebCore::CSSValueList::hasValue):
+ (WebCore::CSSValueList::copy):
+ (WebCore::CSSValueList::customCSSText):
+ (WebCore::CSSValueList::equals):
+ (WebCore::CSSValueList::addSubresourceStyleURLs):
+ (WebCore::CSSValueList::hasFailedOrCanceledSubresources):
+ * css/CSSValueList.h:
+ (WebCore::CSSValueList::item):
+ (WebCore::CSSValueList::itemWithoutBoundsCheck):
+ (WebCore::CSSValueList::append):
+ (WebCore::CSSValueList::prepend):
+ * css/SVGCSSComputedStyleDeclaration.cpp:
+ (WebCore::paintOrder):
+ * css/SVGCSSParser.cpp:
+ (WebCore::CSSParser::parsePaintOrder):
+ * editing/EditingStyle.cpp:
+ (WebCore::mergeTextDecorationValues):
+ * editing/EditorCommand.cpp:
+ (WebCore::executeToggleStyleInList):
+ * svg/SVGFontFaceSrcElement.cpp:
+ (WebCore::SVGFontFaceSrcElement::srcValue):
+ * svg/SVGLength.cpp:
+ (WebCore::SVGLength::toCSSPrimitiveValue):
+ * svg/SVGLength.h:
+
</ins><span class="cx"> 2014-08-13 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Removed dead plugins code.
</span></span></pre></div>
<a id="trunkSourceWebCorecssBasicShapeFunctionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/BasicShapeFunctions.cpp (172535 => 172536)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/BasicShapeFunctions.cpp        2014-08-13 20:31:34 UTC (rev 172535)
+++ trunk/Source/WebCore/css/BasicShapeFunctions.cpp        2014-08-13 21:06:23 UTC (rev 172536)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<CSSValue> valueForBasicShape(const RenderStyle* style, const BasicShape* basicShape)
</del><ins>+PassRef<CSSValue> valueForBasicShape(const RenderStyle* style, const BasicShape* basicShape)
</ins><span class="cx"> {
</span><span class="cx"> CSSValuePool& pool = cssValuePool();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssBasicShapeFunctionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/BasicShapeFunctions.h (172535 => 172536)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/BasicShapeFunctions.h        2014-08-13 20:31:34 UTC (rev 172535)
+++ trunk/Source/WebCore/css/BasicShapeFunctions.h        2014-08-13 21:06:23 UTC (rev 172536)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> class CSSValue;
</span><span class="cx"> class RenderStyle;
</span><span class="cx">
</span><del>-PassRefPtr<CSSValue> valueForBasicShape(const RenderStyle*, const BasicShape*);
</del><ins>+PassRef<CSSValue> valueForBasicShape(const RenderStyle*, const BasicShape*);
</ins><span class="cx"> PassRefPtr<BasicShape> basicShapeForValue(const CSSToLengthConversionData&, const CSSBasicShape*);
</span><span class="cx">
</span><span class="cx"> float floatValueForCenterCoordinate(const BasicShapeCenterCoordinate&, float);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSBorderImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSBorderImage.cpp (172535 => 172536)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSBorderImage.cpp        2014-08-13 20:31:34 UTC (rev 172535)
+++ trunk/Source/WebCore/css/CSSBorderImage.cpp        2014-08-13 21:06:23 UTC (rev 172536)
</span><span class="lines">@@ -22,30 +22,29 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-PassRefPtr<CSSValueList> createBorderImageValue(PassRefPtr<CSSValue> image, PassRefPtr<CSSValue> imageSlice, PassRefPtr<CSSValue> borderSlice,
- PassRefPtr<CSSValue> outset, PassRefPtr<CSSValue> repeat)
</del><ins>+PassRef<CSSValueList> createBorderImageValue(PassRefPtr<CSSValue> image, PassRefPtr<CSSValue> imageSlice, PassRefPtr<CSSValue> borderSlice, PassRefPtr<CSSValue> outset, PassRefPtr<CSSValue> repeat)
</ins><span class="cx"> {
</span><del>- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
</del><ins>+ auto list = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> if (image)
</span><del>- list->append(image);
</del><ins>+ list.get().append(*image);
</ins><span class="cx">
</span><span class="cx"> if (borderSlice || outset) {
</span><del>- RefPtr<CSSValueList> listSlash = CSSValueList::createSlashSeparated();
</del><ins>+ auto listSlash = CSSValueList::createSlashSeparated();
</ins><span class="cx"> if (imageSlice)
</span><del>- listSlash->append(imageSlice);
</del><ins>+ listSlash.get().append(*imageSlice);
</ins><span class="cx">
</span><span class="cx"> if (borderSlice)
</span><del>- listSlash->append(borderSlice);
</del><ins>+ listSlash.get().append(*borderSlice);
</ins><span class="cx">
</span><span class="cx"> if (outset)
</span><del>- listSlash->append(outset);
</del><ins>+ listSlash.get().append(*outset);
</ins><span class="cx">
</span><del>- list->append(listSlash);
</del><ins>+ list.get().append(WTF::move(listSlash));
</ins><span class="cx"> } else if (imageSlice)
</span><del>- list->append(imageSlice);
</del><ins>+ list.get().append(*imageSlice);
</ins><span class="cx"> if (repeat)
</span><del>- list->append(repeat);
- return list.release();
</del><ins>+ list.get().append(*repeat);
+ return list;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSBorderImageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSBorderImage.h (172535 => 172536)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSBorderImage.h        2014-08-13 20:31:34 UTC (rev 172535)
+++ trunk/Source/WebCore/css/CSSBorderImage.h        2014-08-13 21:06:23 UTC (rev 172536)
</span><span class="lines">@@ -27,8 +27,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-PassRefPtr<CSSValueList> createBorderImageValue(PassRefPtr<CSSValue> image, PassRefPtr<CSSValue> imageSlice, PassRefPtr<CSSValue> borderSlice,
- PassRefPtr<CSSValue> outset, PassRefPtr<CSSValue> repeat);
</del><ins>+PassRef<CSSValueList> createBorderImageValue(PassRefPtr<CSSValue> image, PassRefPtr<CSSValue> imageSlice, PassRefPtr<CSSValue> borderSlice, PassRefPtr<CSSValue> outset, PassRefPtr<CSSValue> repeat);
</ins><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (172535 => 172536)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-08-13 20:31:34 UTC (rev 172535)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-08-13 21:06:23 UTC (rev 172536)
</span><span class="lines">@@ -461,7 +461,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static PassRefPtr<CSSPrimitiveValue> valueForImageSliceSide(const Length& length)
</del><ins>+static PassRef<CSSPrimitiveValue> valueForImageSliceSide(const Length& length)
</ins><span class="cx"> {
</span><span class="cx"> // These values can be percentages, numbers, or while an animation of mixed types is in progress,
</span><span class="cx"> // a calculation that combines a percentage and a number.
</span><span class="lines">@@ -477,7 +477,7 @@
</span><span class="cx"> return cssValuePool().createValue(0, CSSPrimitiveValue::CSS_NUMBER);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static PassRefPtr<CSSBorderImageSliceValue> valueForNinePieceImageSlice(const NinePieceImage& image)
</del><ins>+static PassRef<CSSBorderImageSliceValue> valueForNinePieceImageSlice(const NinePieceImage& image)
</ins><span class="cx"> {
</span><span class="cx"> auto& slices = image.imageSlices();
</span><span class="cx">
</span><span class="lines">@@ -516,7 +516,7 @@
</span><span class="cx"> return CSSBorderImageSliceValue::create(cssValuePool().createValue(quad.release()), image.fill());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static PassRefPtr<CSSPrimitiveValue> valueForNinePieceImageQuad(const LengthBox& box)
</del><ins>+static PassRef<CSSPrimitiveValue> valueForNinePieceImageQuad(const LengthBox& box)
</ins><span class="cx"> {
</span><span class="cx"> RefPtr<CSSPrimitiveValue> top;
</span><span class="cx"> RefPtr<CSSPrimitiveValue> right;
</span><span class="lines">@@ -580,7 +580,7 @@
</span><span class="cx"> return cssValuePool().createValue(Pair::create(horizontalRepeat.release(), verticalRepeat.release()));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static PassRefPtr<CSSValue> valueForNinePieceImage(const NinePieceImage& image)
</del><ins>+static PassRef<CSSValue> valueForNinePieceImage(const NinePieceImage& image)
</ins><span class="cx"> {
</span><span class="cx"> if (!image.hasImage())
</span><span class="cx"> return cssValuePool().createIdentifierValue(CSSValueNone);
</span><span class="lines">@@ -757,27 +757,27 @@
</span><span class="cx"> RefPtr<CSSValueList> bottomLeftRadius = getBorderRadiusCornerValues(style->borderBottomLeftRadius(), style);
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValueList> horizontalRadii = CSSValueList::createSpaceSeparated();
</span><del>- horizontalRadii->append(topLeftRadius->item(0));
</del><ins>+ horizontalRadii->append(*topLeftRadius->item(0));
</ins><span class="cx"> if (showHorizontalTopRight)
</span><del>- horizontalRadii->append(topRightRadius->item(0));
</del><ins>+ horizontalRadii->append(*topRightRadius->item(0));
</ins><span class="cx"> if (showHorizontalBottomRight)
</span><del>- horizontalRadii->append(bottomRightRadius->item(0));
</del><ins>+ horizontalRadii->append(*bottomRightRadius->item(0));
</ins><span class="cx"> if (showHorizontalBottomLeft)
</span><del>- horizontalRadii->append(bottomLeftRadius->item(0));
</del><ins>+ horizontalRadii->append(*bottomLeftRadius->item(0));
</ins><span class="cx">
</span><del>- list.get().append(horizontalRadii.release());
</del><ins>+ list.get().append(horizontalRadii.releaseNonNull());
</ins><span class="cx">
</span><span class="cx"> RefPtr<CSSValueList> verticalRadiiList = CSSValueList::createSpaceSeparated();
</span><del>- verticalRadiiList->append(topLeftRadius->item(1));
</del><ins>+ verticalRadiiList->append(*topLeftRadius->item(1));
</ins><span class="cx"> if (showVerticalTopRight)
</span><del>- verticalRadiiList->append(topRightRadius->item(1));
</del><ins>+ verticalRadiiList->append(*topRightRadius->item(1));
</ins><span class="cx"> if (showVerticalBottomRight)
</span><del>- verticalRadiiList->append(bottomRightRadius->item(1));
</del><ins>+ verticalRadiiList->append(*bottomRightRadius->item(1));
</ins><span class="cx"> if (showVerticalBottomLeft)
</span><del>- verticalRadiiList->append(bottomLeftRadius->item(1));
</del><ins>+ verticalRadiiList->append(*bottomLeftRadius->item(1));
</ins><span class="cx">
</span><span class="cx"> if (!verticalRadiiList->equals(*toCSSValueList(list.get().item(0))))
</span><del>- list.get().append(verticalRadiiList.release());
</del><ins>+ list.get().append(verticalRadiiList.releaseNonNull());
</ins><span class="cx">
</span><span class="cx"> return list;
</span><span class="cx"> }
</span><span class="lines">@@ -859,12 +859,12 @@
</span><span class="cx"> return adjust == AdjustPixelValues ? zoomAdjustedPixelValue(length.value(), style) : cssValuePool().createValue(length);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<CSSValue> ComputedStyleExtractor::valueForShadow(const ShadowData* shadow, CSSPropertyID propertyID, const RenderStyle* style, AdjustPixelValuesForComputedStyle adjust)
</del><ins>+PassRef<CSSValue> ComputedStyleExtractor::valueForShadow(const ShadowData* shadow, CSSPropertyID propertyID, const RenderStyle* style, AdjustPixelValuesForComputedStyle adjust)
</ins><span class="cx"> {
</span><span class="cx"> if (!shadow)
</span><span class="cx"> return cssValuePool().createIdentifierValue(CSSValueNone);
</span><span class="cx">
</span><del>- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
</del><ins>+ auto list = CSSValueList::createCommaSeparated();
</ins><span class="cx"> for (const ShadowData* currShadowData = shadow; currShadowData; currShadowData = currShadowData->next()) {
</span><span class="cx"> RefPtr<CSSPrimitiveValue> x = adjustLengthForZoom(currShadowData->x(), style, adjust);
</span><span class="cx"> RefPtr<CSSPrimitiveValue> y = adjustLengthForZoom(currShadowData->y(), style, adjust);
</span><span class="lines">@@ -872,9 +872,9 @@
</span><span class="cx"> RefPtr<CSSPrimitiveValue> spread = propertyID == CSSPropertyTextShadow ? PassRefPtr<CSSPrimitiveValue>() : adjustLengthForZoom(currShadowData->spread(), style, adjust);
</span><span class="cx"> RefPtr<CSSPrimitiveValue> style = propertyID == CSSPropertyTextShadow || currShadowData->style() == Normal ? PassRefPtr<CSSPrimitiveValue>() : cssValuePool().createIdentifierValue(CSSValueInset);
</span><span class="cx"> RefPtr<CSSPrimitiveValue> color = cssValuePool().createColorValue(currShadowData->color().rgb());
</span><del>- list->prepend(CSSShadowValue::create(x.release(), y.release(), blur.release(), spread.release(), style.release(), color.release()));
</del><ins>+ list.get().prepend(CSSShadowValue::create(x.release(), y.release(), blur.release(), spread.release(), style.release(), color.release()));
</ins><span class="cx"> }
</span><del>- return list.release();
</del><ins>+ return WTF::move(list);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_FILTERS)
</span><span class="lines">@@ -963,7 +963,7 @@
</span><span class="cx"> filterValue = WebKitCSSFilterValue::create(WebKitCSSFilterValue::UnknownFilterOperation);
</span><span class="cx"> break;
</span><span class="cx"> }
</span><del>- list.get().append(filterValue.release());
</del><ins>+ list.get().append(filterValue.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return WTF::move(list);
</span><span class="lines">@@ -982,19 +982,18 @@
</span><span class="cx"> return zoomAdjustedPixelValueForLength(trackBreadthLength, style);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static PassRefPtr<CSSValue> specifiedValueForGridTrackSize(const GridTrackSize& trackSize, const RenderStyle* style)
</del><ins>+static PassRef<CSSValue> specifiedValueForGridTrackSize(const GridTrackSize& trackSize, const RenderStyle* style)
</ins><span class="cx"> {
</span><span class="cx"> switch (trackSize.type()) {
</span><span class="cx"> case LengthTrackSizing:
</span><span class="cx"> return specifiedValueForGridTrackBreadth(trackSize.length(), style);
</span><del>- case MinMaxTrackSizing:
</del><ins>+ default:
+ ASSERT(trackSize.type() == MinMaxTrackSizing);
</ins><span class="cx"> RefPtr<CSSValueList> minMaxTrackBreadths = CSSValueList::createCommaSeparated();
</span><span class="cx"> minMaxTrackBreadths->append(specifiedValueForGridTrackBreadth(trackSize.minTrackBreadth(), style));
</span><span class="cx"> minMaxTrackBreadths->append(specifiedValueForGridTrackBreadth(trackSize.maxTrackBreadth(), style));
</span><span class="cx"> return CSSFunctionValue::create("minmax(", minMaxTrackBreadths);
</span><span class="cx"> }
</span><del>- ASSERT_NOT_REACHED();
- return 0;
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static void addValuesForNamedGridLinesAtIndex(const OrderedNamedGridLinesMap& orderedNamedGridLines, size_t i, CSSValueList& list)
</span><span class="lines">@@ -1006,7 +1005,7 @@
</span><span class="cx"> RefPtr<CSSGridLineNamesValue> lineNames = CSSGridLineNamesValue::create();
</span><span class="cx"> for (size_t i = 0; i < namedGridLines.size(); ++i)
</span><span class="cx"> lineNames->append(cssValuePool().createValue(namedGridLines[i], CSSPrimitiveValue::CSS_STRING));
</span><del>- list.append(lineNames.release());
</del><ins>+ list.append(lineNames.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static PassRef<CSSValue> valueForGridTrackList(GridTrackSizingDirection direction, RenderObject* renderer, const RenderStyle* style)
</span><span class="lines">@@ -1136,7 +1135,7 @@
</span><span class="cx"> else
</span><span class="cx"> currentCoordinate->append(zoomAdjustedPixelValue(valueForLength(point, 0), style));
</span><span class="cx">
</span><del>- snapCoordinatesValue->append(PassRefPtr<CSSValueList>(WTF::move(currentCoordinate)));
</del><ins>+ snapCoordinatesValue->append(currentCoordinate.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx"> return snapCoordinatesValue.releaseNonNull();
</span><span class="cx"> }
</span><span class="lines">@@ -1168,7 +1167,7 @@
</span><span class="cx"> return list;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static PassRefPtr<CSSValue> createTimingFunctionValue(const TimingFunction* timingFunction)
</del><ins>+static PassRef<CSSValue> createTimingFunctionValue(const TimingFunction* timingFunction)
</ins><span class="cx"> {
</span><span class="cx"> switch (timingFunction->type()) {
</span><span class="cx"> case TimingFunction::CubicBezierFunction: {
</span><span class="lines">@@ -1185,12 +1184,10 @@
</span><span class="cx"> case CubicBezierTimingFunction::EaseOut:
</span><span class="cx"> valueId = CSSValueEaseOut;
</span><span class="cx"> break;
</span><del>- case CubicBezierTimingFunction::EaseInOut:
</del><ins>+ default:
+ ASSERT(bezierTimingFunction->timingFunctionPreset() == CubicBezierTimingFunction::EaseInOut);
</ins><span class="cx"> valueId = CSSValueEaseInOut;
</span><span class="cx"> break;
</span><del>- default:
- ASSERT_NOT_REACHED();
- return 0;
</del><span class="cx"> }
</span><span class="cx"> return cssValuePool().createIdentifierValue(valueId);
</span><span class="cx"> }
</span><span class="lines">@@ -1200,11 +1197,10 @@
</span><span class="cx"> const StepsTimingFunction* stepsTimingFunction = static_cast<const StepsTimingFunction*>(timingFunction);
</span><span class="cx"> return CSSStepsTimingFunctionValue::create(stepsTimingFunction->numberOfSteps(), stepsTimingFunction->stepAtStart());
</span><span class="cx"> }
</span><del>- case TimingFunction::LinearFunction:
</del><ins>+ default:
+ ASSERT(timingFunction->type() == TimingFunction::LinearFunction);
</ins><span class="cx"> return cssValuePool().createIdentifierValue(CSSValueLinear);
</span><span class="cx"> }
</span><del>- ASSERT_NOT_REACHED();
- return 0;
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static PassRef<CSSValueList> getTimingFunctionValue(const AnimationList* animList)
</span><span class="lines">@@ -1434,18 +1430,15 @@
</span><span class="cx"> return WTF::move(list);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static PassRefPtr<CSSValue> fillSourceTypeToCSSValue(EMaskSourceType type)
</del><ins>+static PassRef<CSSValue> fillSourceTypeToCSSValue(EMaskSourceType type)
</ins><span class="cx"> {
</span><span class="cx"> switch (type) {
</span><span class="cx"> case MaskAlpha:
</span><span class="cx"> return cssValuePool().createValue(CSSValueAlpha);
</span><del>- case MaskLuminance:
</del><ins>+ default:
+ ASSERT(type == MaskLuminance);
</ins><span class="cx"> return cssValuePool().createValue(CSSValueLuminance);
</span><span class="cx"> }
</span><del>-
- ASSERT_NOT_REACHED();
-
- return 0;
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static PassRef<CSSValue> fillSizeToCSSValue(const FillSize& fillSize, const RenderStyle* style)
</span><span class="lines">@@ -1477,7 +1470,7 @@
</span><span class="cx"> if (contentData->isCounter())
</span><span class="cx"> list.get().append(cssValuePool().createValue(toCounterContentData(contentData)->counter().identifier(), CSSPrimitiveValue::CSS_COUNTER_NAME));
</span><span class="cx"> else if (contentData->isImage())
</span><del>- list.get().append(toImageContentData(contentData)->image().cssValue());
</del><ins>+ list.get().append(*toImageContentData(contentData)->image().cssValue());
</ins><span class="cx"> else if (contentData->isText())
</span><span class="cx"> list.get().append(cssValuePool().createValue(toTextContentData(contentData)->text(), CSSPrimitiveValue::CSS_STRING));
</span><span class="cx"> }
</span><span class="lines">@@ -1690,7 +1683,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><del>-static PassRefPtr<CSSValue> shapePropertyValue(const RenderStyle* style, const ShapeValue* shapeValue)
</del><ins>+static PassRef<CSSValue> shapePropertyValue(const RenderStyle* style, const ShapeValue* shapeValue)
</ins><span class="cx"> {
</span><span class="cx"> if (!shapeValue)
</span><span class="cx"> return cssValuePool().createIdentifierValue(CSSValueNone);
</span><span class="lines">@@ -1698,8 +1691,11 @@
</span><span class="cx"> if (shapeValue->type() == ShapeValue::Type::Box)
</span><span class="cx"> return cssValuePool().createValue(shapeValue->cssBox());
</span><span class="cx">
</span><del>- if (shapeValue->type() == ShapeValue::Type::Image)
- return shapeValue->image() ? shapeValue->image()->cssValue() : cssValuePool().createIdentifierValue(CSSValueNone);
</del><ins>+ if (shapeValue->type() == ShapeValue::Type::Image) {
+ if (shapeValue->image())
+ return *shapeValue->image()->cssValue();
+ return cssValuePool().createIdentifierValue(CSSValueNone);
+ }
</ins><span class="cx">
</span><span class="cx"> ASSERT(shapeValue->type() == ShapeValue::Type::Shape);
</span><span class="cx">
</span><span class="lines">@@ -1707,7 +1703,7 @@
</span><span class="cx"> list->append(valueForBasicShape(style, shapeValue->shape()));
</span><span class="cx"> if (shapeValue->cssBox() != BoxMissing)
</span><span class="cx"> list->append(cssValuePool().createValue(shapeValue->cssBox()));
</span><del>- return list.release();
</del><ins>+ return list.releaseNonNull();
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -1779,7 +1775,7 @@
</span><span class="cx"> RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
</span><span class="cx"> for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next()) {
</span><span class="cx"> if (currLayer->image())
</span><del>- list->append(currLayer->image()->cssValue());
</del><ins>+ list->append(*currLayer->image()->cssValue());
</ins><span class="cx"> else
</span><span class="cx"> list->append(cssValuePool().createIdentifierValue(CSSValueNone));
</span><span class="cx"> }
</span><span class="lines">@@ -2032,14 +2028,14 @@
</span><span class="cx"> list = CSSValueList::createCommaSeparated();
</span><span class="cx"> for (unsigned i = 0; i < cursors->size(); ++i)
</span><span class="cx"> if (StyleImage* image = cursors->at(i).image())
</span><del>- list->append(image->cssValue());
</del><ins>+ list->append(*image->cssValue());
</ins><span class="cx"> }
</span><del>- RefPtr<CSSValue> value = cssValuePool().createValue(style->cursor());
</del><ins>+ auto value = cssValuePool().createValue(style->cursor());
</ins><span class="cx"> if (list) {
</span><del>- list->append(value.release());
</del><ins>+ list->append(WTF::move(value));
</ins><span class="cx"> return list.release();
</span><span class="cx"> }
</span><del>- return value.release();
</del><ins>+ return WTF::move(value);
</ins><span class="cx"> }
</span><span class="cx"> #if ENABLE(CURSOR_VISIBILITY)
</span><span class="cx"> case CSSPropertyWebkitCursorVisibility:
</span><span class="lines">@@ -2421,7 +2417,7 @@
</span><span class="cx"> // getPropertyCSSValue() returns CSSValueList.
</span><span class="cx"> if (style->textIndentLine() == TextIndentEachLine || style->textIndentType() == TextIndentHanging) {
</span><span class="cx"> RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
</span><del>- list->append(textIndent.release());
</del><ins>+ list->append(textIndent.releaseNonNull());
</ins><span class="cx"> if (style->textIndentLine() == TextIndentEachLine)
</span><span class="cx"> list->append(cssValuePool().createIdentifierValue(CSSValueWebkitEachLine));
</span><span class="cx"> if (style->textIndentType() == TextIndentHanging)
</span><span class="lines">@@ -2819,7 +2815,7 @@
</span><span class="cx"> list->append(cssValuePool().createValue(animation.duration(), CSSPrimitiveValue::CSS_S));
</span><span class="cx"> list->append(createTimingFunctionValue(animation.timingFunction().get()));
</span><span class="cx"> list->append(cssValuePool().createValue(animation.delay(), CSSPrimitiveValue::CSS_S));
</span><del>- transitionsList->append(list);
</del><ins>+ transitionsList->append(list.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx"> return transitionsList.release();
</span><span class="cx"> }
</span><span class="lines">@@ -3190,7 +3186,7 @@
</span><span class="cx"> RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
</span><span class="cx"> for (size_t i = 0; i < shorthand.length(); ++i) {
</span><span class="cx"> RefPtr<CSSValue> value = propertyValue(shorthand.properties()[i], DoNotUpdateLayout);
</span><del>- list->append(value);
</del><ins>+ list->append(value.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx"> return list.release();
</span><span class="cx"> }
</span><span class="lines">@@ -3212,13 +3208,13 @@
</span><span class="cx"> bool showBottom = !compareCSSValuePtr(topValue, bottomValue) || showLeft;
</span><span class="cx"> bool showRight = !compareCSSValuePtr(topValue, rightValue) || showBottom;
</span><span class="cx">
</span><del>- list->append(topValue.release());
</del><ins>+ list->append(topValue.releaseNonNull());
</ins><span class="cx"> if (showRight)
</span><del>- list->append(rightValue.release());
</del><ins>+ list->append(rightValue.releaseNonNull());
</ins><span class="cx"> if (showBottom)
</span><del>- list->append(bottomValue.release());
</del><ins>+ list->append(bottomValue.releaseNonNull());
</ins><span class="cx"> if (showLeft)
</span><del>- list->append(leftValue.release());
</del><ins>+ list->append(leftValue.releaseNonNull());
</ins><span class="cx">
</span><span class="cx"> return list.release();
</span><span class="cx"> }
</span><span class="lines">@@ -3228,7 +3224,7 @@
</span><span class="cx"> RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
</span><span class="cx"> for (size_t i = 0; i < shorthand.length(); ++i) {
</span><span class="cx"> RefPtr<CSSValue> value = propertyValue(shorthand.properties()[i], DoNotUpdateLayout);
</span><del>- list->append(value.release());
</del><ins>+ list->append(value.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx"> return list.release();
</span><span class="cx"> }
</span><span class="lines">@@ -3318,8 +3314,8 @@
</span><span class="cx"> CSSPropertyBackgroundClip };
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
</span><del>- list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShorthand(CSSPropertyBackground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlashSeperator))));
- list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShorthand(CSSPropertyBackground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSeperator))));
</del><ins>+ list->append(*getCSSPropertyValuesForShorthandProperties(StylePropertyShorthand(CSSPropertyBackground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlashSeperator))));
+ list->append(*getCSSPropertyValuesForShorthandProperties(StylePropertyShorthand(CSSPropertyBackground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSeperator))));
</ins><span class="cx"> return list.release();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h (172535 => 172536)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h        2014-08-13 20:31:34 UTC (rev 172535)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h        2014-08-13 21:06:23 UTC (rev 172536)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx"> PassRefPtr<CSSValue> svgPropertyValue(CSSPropertyID, EUpdateLayout) const;
</span><span class="cx"> PassRefPtr<SVGPaint> adjustSVGPaintForCurrentColor(PassRefPtr<SVGPaint>, RenderStyle*) const;
</span><span class="cx">
</span><del>- static PassRefPtr<CSSValue> valueForShadow(const ShadowData*, CSSPropertyID, const RenderStyle*, AdjustPixelValuesForComputedStyle = AdjustPixelValues);
</del><ins>+ static PassRef<CSSValue> valueForShadow(const ShadowData*, CSSPropertyID, const RenderStyle*, AdjustPixelValuesForComputedStyle = AdjustPixelValues);
</ins><span class="cx"> PassRefPtr<CSSPrimitiveValue> currentColorOrValidColor(RenderStyle*, const Color&) const;
</span><span class="cx">
</span><span class="cx"> PassRefPtr<CSSValueList> getCSSPropertyValuesForShorthandProperties(const StylePropertyShorthand&) const;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontSelectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontSelector.cpp (172535 => 172536)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontSelector.cpp        2014-08-13 20:31:34 UTC (rev 172535)
+++ trunk/Source/WebCore/css/CSSFontSelector.cpp        2014-08-13 21:06:23 UTC (rev 172536)
</span><span class="lines">@@ -168,8 +168,8 @@
</span><span class="cx"> // font-variant descriptor can be a value list.
</span><span class="cx"> if (fontVariant->isPrimitiveValue()) {
</span><span class="cx"> RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
</span><del>- list->append(fontVariant);
- fontVariant = list;
</del><ins>+ list->append(fontVariant.releaseNonNull());
+ fontVariant = list.releaseNonNull();
</ins><span class="cx"> } else if (!fontVariant->isValueList())
</span><span class="cx"> return;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (172535 => 172536)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2014-08-13 20:31:34 UTC (rev 172535)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2014-08-13 21:06:23 UTC (rev 172536)
</span><span class="lines">@@ -195,7 +195,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static PassRefPtr<CSSPrimitiveValue> createPrimitiveValuePair(PassRefPtr<CSSPrimitiveValue> first, PassRefPtr<CSSPrimitiveValue> second)
</del><ins>+static PassRef<CSSPrimitiveValue> createPrimitiveValuePair(PassRefPtr<CSSPrimitiveValue> first, PassRefPtr<CSSPrimitiveValue> second)
</ins><span class="cx"> {
</span><span class="cx"> return cssValuePool().createValue(Pair::create(first, second));
</span><span class="cx"> }
</span><span class="lines">@@ -1256,7 +1256,7 @@
</span><span class="cx"> if (!success)
</span><span class="cx"> return false;
</span><span class="cx"> RefPtr<CSSValueList> result = CSSValueList::createSpaceSeparated();
</span><del>- result->append(transformValue.release());
</del><ins>+ result->append(transformValue.releaseNonNull());
</ins><span class="cx"> properties->addParsedProperty(CSSProperty(CSSPropertyWebkitTransform, result.release(), important));
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -1697,7 +1697,7 @@
</span><span class="cx"> return b;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline PassRefPtr<CSSPrimitiveValue> CSSParser::createPrimitiveNumericValue(CSSParserValue* value)
</del><ins>+inline PassRef<CSSPrimitiveValue> CSSParser::createPrimitiveNumericValue(CSSParserValue* value)
</ins><span class="cx"> {
</span><span class="cx"> if (m_parsedCalculation) {
</span><span class="cx"> ASSERT(isCalculation(value));
</span><span class="lines">@@ -1717,7 +1717,7 @@
</span><span class="cx"> return cssValuePool().createValue(value->fValue, static_cast<CSSPrimitiveValue::UnitTypes>(value->unit));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline PassRefPtr<CSSPrimitiveValue> CSSParser::createPrimitiveStringValue(CSSParserValue* value)
</del><ins>+inline PassRef<CSSPrimitiveValue> CSSParser::createPrimitiveStringValue(CSSParserValue* value)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(value->unit == CSSPrimitiveValue::CSS_STRING || value->unit == CSSPrimitiveValue::CSS_IDENT);
</span><span class="cx"> return cssValuePool().createValue(value->string, CSSPrimitiveValue::CSS_STRING);
</span><span class="lines">@@ -3093,21 +3093,22 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void CSSParser::addFillValue(RefPtr<CSSValue>& lval, PassRefPtr<CSSValue> rval)
</del><ins>+void CSSParser::addFillValue(RefPtr<CSSValue>& lval, PassRef<CSSValue> rval)
</ins><span class="cx"> {
</span><del>- if (lval) {
- if (lval->isBaseValueList())
- toCSSValueList(lval.get())->append(rval);
- else {
- PassRefPtr<CSSValue> oldlVal(lval.release());
- PassRefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
- list->append(oldlVal);
- list->append(rval);
- lval = list;
- }
</del><ins>+ if (!lval) {
+ lval = WTF::move(rval);
+ return;
</ins><span class="cx"> }
</span><del>- else
- lval = rval;
</del><ins>+
+ if (lval->isBaseValueList()) {
+ toCSSValueList(*lval).append(WTF::move(rval));
+ return;
+ }
+
+ auto list = CSSValueList::createCommaSeparated();
+ list.get().append(lval.releaseNonNull());
+ list.get().append(WTF::move(rval));
+ lval = WTF::move(list);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static bool isItemPositionKeyword(CSSValueID id)
</span><span class="lines">@@ -3187,11 +3188,9 @@
</span><span class="cx"> {
</span><span class="cx"> RefPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
</span><span class="cx"> while (CSSParserValue* val = m_valueList->current()) {
</span><del>- RefPtr<CSSValue> parsedValue;
- if (validUnit(val, FPercent | FLength)) {
- parsedValue = createPrimitiveNumericValue(val);
- values->append(parsedValue.release());
- } else if (val->unit == CSSParserValue::Function
</del><ins>+ if (validUnit(val, FPercent | FLength))
+ values->append(createPrimitiveNumericValue(val));
+ else if (val->unit == CSSParserValue::Function
</ins><span class="cx"> && val->function->args != 0
</span><span class="cx"> && val->function->args->size() == 1
</span><span class="cx"> && equalIgnoringCase(val->function->name, "repeat(")) {
</span><span class="lines">@@ -3229,8 +3228,8 @@
</span><span class="cx"> if (!validUnit(curParserVal, FPercent | FLength))
</span><span class="cx"> return false;
</span><span class="cx"> RefPtr<CSSValue> cssValueY = createPrimitiveNumericValue(curParserVal);
</span><del>- position->append(cssValueX.release());
- position->append(cssValueY.release());
</del><ins>+ position->append(cssValueX.releaseNonNull());
+ position->append(cssValueY.releaseNonNull());
</ins><span class="cx"> addProperty(propId, position, important);
</span><span class="cx"> m_valueList->next();
</span><span class="cx"> return true;
</span><span class="lines">@@ -3328,15 +3327,15 @@
</span><span class="cx"> CSSParserValue* parserValue = m_valueList->current();
</span><span class="cx"> if (parseFillProperty(properties[i], propId1, propId2, val1, val2)) {
</span><span class="cx"> parsedProperty[i] = found = true;
</span><del>- addFillValue(values[i], val1.release());
</del><ins>+ addFillValue(values[i], val1.releaseNonNull());
</ins><span class="cx"> if (properties[i] == CSSPropertyBackgroundPosition || properties[i] == CSSPropertyWebkitMaskPosition)
</span><del>- addFillValue(positionYValue, val2.release());
</del><ins>+ addFillValue(positionYValue, val2.releaseNonNull());
</ins><span class="cx"> if (properties[i] == CSSPropertyBackgroundRepeat || properties[i] == CSSPropertyWebkitMaskRepeat)
</span><del>- addFillValue(repeatYValue, val2.release());
</del><ins>+ addFillValue(repeatYValue, val2.releaseNonNull());
</ins><span class="cx"> if (properties[i] == CSSPropertyBackgroundOrigin || properties[i] == CSSPropertyWebkitMaskOrigin) {
</span><span class="cx"> // Reparse the value as a clip, and see if we succeed.
</span><span class="cx"> if (parseBackgroundClip(parserValue, val1))
</span><del>- addFillValue(clipValue, val1.release()); // The property parsed successfully.
</del><ins>+ addFillValue(clipValue, val1.releaseNonNull()); // The property parsed successfully.
</ins><span class="cx"> else
</span><span class="cx"> addFillValue(clipValue, cssValuePool().createImplicitInitialValue()); // Some value was used for origin that is not supported by clip. Just reset clip instead.
</span><span class="cx"> }
</span><span class="lines">@@ -3402,21 +3401,22 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void CSSParser::addAnimationValue(RefPtr<CSSValue>& lval, PassRefPtr<CSSValue> rval)
</del><ins>+void CSSParser::addAnimationValue(RefPtr<CSSValue>& lval, PassRef<CSSValue> rval)
</ins><span class="cx"> {
</span><del>- if (lval) {
- if (lval->isValueList())
- toCSSValueList(lval.get())->append(rval);
- else {
- PassRefPtr<CSSValue> oldVal(lval.release());
- PassRefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
- list->append(oldVal);
- list->append(rval);
- lval = list;
- }
</del><ins>+ if (!lval) {
+ lval = WTF::move(rval);
+ return;
</ins><span class="cx"> }
</span><del>- else
- lval = rval;
</del><ins>+
+ if (lval->isValueList()) {
+ toCSSValueList(*lval).append(WTF::move(rval));
+ return;
+ }
+
+ auto list = CSSValueList::createCommaSeparated();
+ list.get().append(lval.releaseNonNull());
+ list.get().append(WTF::move(rval));
+ lval = WTF::move(list);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseAnimationShorthand(bool important)
</span><span class="lines">@@ -3458,7 +3458,7 @@
</span><span class="cx"> RefPtr<CSSValue> val;
</span><span class="cx"> if (parseAnimationProperty(animationProperties.properties()[i], val, context)) {
</span><span class="cx"> parsedProperty[i] = found = true;
</span><del>- addAnimationValue(values[i], val.release());
</del><ins>+ addAnimationValue(values[i], val.releaseNonNull());
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -3519,7 +3519,7 @@
</span><span class="cx"> RefPtr<CSSValue> val;
</span><span class="cx"> if (parseAnimationProperty(shorthand.properties()[i], val, context)) {
</span><span class="cx"> parsedProperty[i] = found = true;
</span><del>- addAnimationValue(values[i], val.release());
</del><ins>+ addAnimationValue(values[i], val.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // There are more values to process but 'none' or 'all' were already defined as the animation property, the declaration becomes invalid.
</span><span class="lines">@@ -3753,12 +3753,9 @@
</span><span class="cx"> {
</span><span class="cx"> RefPtr<CSSValueList> values = CSSValueList::createCommaSeparated();
</span><span class="cx"> while (CSSParserValue* val = m_valueList->current()) {
</span><del>- RefPtr<CSSValue> parsedValue;
- if (val->unit == CSSPrimitiveValue::CSS_STRING)
- parsedValue = CSSPrimitiveValue::create(val->string, CSSPrimitiveValue::CSS_STRING);
- else
</del><ins>+ if (val->unit != CSSPrimitiveValue::CSS_STRING)
</ins><span class="cx"> break;
</span><del>- values->append(parsedValue.release());
</del><ins>+ values->append(CSSPrimitiveValue::create(val->string, CSSPrimitiveValue::CSS_STRING));
</ins><span class="cx"> m_valueList->next();
</span><span class="cx"> }
</span><span class="cx"> if (values->length()) {
</span><span class="lines">@@ -3859,7 +3856,7 @@
</span><span class="cx"> }
</span><span class="cx"> if (!parsedValue)
</span><span class="cx"> break;
</span><del>- values->append(parsedValue.release());
</del><ins>+ values->append(parsedValue.releaseNonNull());
</ins><span class="cx"> m_valueList->next();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4506,21 +4503,21 @@
</span><span class="cx">
</span><span class="cx"> if (value && !values) {
</span><span class="cx"> values = CSSValueList::createCommaSeparated();
</span><del>- values->append(value.release());
</del><ins>+ values->append(value.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (value2 && !values2) {
</span><span class="cx"> values2 = CSSValueList::createCommaSeparated();
</span><del>- values2->append(value2.release());
</del><ins>+ values2->append(value2.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (values)
</span><del>- values->append(currValue.release());
</del><ins>+ values->append(currValue.releaseNonNull());
</ins><span class="cx"> else
</span><span class="cx"> value = currValue.release();
</span><span class="cx"> if (currValue2) {
</span><span class="cx"> if (values2)
</span><del>- values2->append(currValue2.release());
</del><ins>+ values2->append(currValue2.releaseNonNull());
</ins><span class="cx"> else
</span><span class="cx"> value2 = currValue2.release();
</span><span class="cx"> }
</span><span class="lines">@@ -4815,11 +4812,11 @@
</span><span class="cx">
</span><span class="cx"> if (value && !values) {
</span><span class="cx"> values = CSSValueList::createCommaSeparated();
</span><del>- values->append(value.release());
</del><ins>+ values->append(value.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (values)
</span><del>- values->append(currValue.release());
</del><ins>+ values->append(currValue.releaseNonNull());
</ins><span class="cx"> else
</span><span class="cx"> value = currValue.release();
</span><span class="cx">
</span><span class="lines">@@ -4923,9 +4920,9 @@
</span><span class="cx"> if (hasSeenSpanKeyword)
</span><span class="cx"> values->append(cssValuePool().createIdentifierValue(CSSValueSpan));
</span><span class="cx"> if (numericValue)
</span><del>- values->append(numericValue.release());
</del><ins>+ values->append(numericValue.releaseNonNull());
</ins><span class="cx"> if (gridLineName)
</span><del>- values->append(gridLineName.release());
</del><ins>+ values->append(gridLineName.releaseNonNull());
</ins><span class="cx"> ASSERT(values->length());
</span><span class="cx"> return values.release();
</span><span class="cx"> }
</span><span class="lines">@@ -4999,7 +4996,7 @@
</span><span class="cx"> RefPtr<CSSValue> value = parseGridTrackSize(*m_valueList);
</span><span class="cx"> if (!value)
</span><span class="cx"> return false;
</span><del>- templateRows->append(value.release());
</del><ins>+ templateRows->append(value.releaseNonNull());
</ins><span class="cx"> } else
</span><span class="cx"> templateRows->append(cssValuePool().createIdentifierValue(CSSValueAuto));
</span><span class="cx">
</span><span class="lines">@@ -5204,7 +5201,7 @@
</span><span class="cx"> identList->next();
</span><span class="cx"> }
</span><span class="cx"> if (!previousNamedAreaTrailingLineNames)
</span><del>- valueList.append(lineNames.release());
</del><ins>+ valueList.append(lineNames.releaseNonNull());
</ins><span class="cx">
</span><span class="cx"> inputList.next();
</span><span class="cx"> }
</span><span class="lines">@@ -5234,7 +5231,7 @@
</span><span class="cx"> RefPtr<CSSValue> value = parseGridTrackSize(*m_valueList);
</span><span class="cx"> if (!value)
</span><span class="cx"> return nullptr;
</span><del>- values->append(value.release());
</del><ins>+ values->append(value.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx"> seenTrackSizeOrRepeatFunction = true;
</span><span class="cx">
</span><span class="lines">@@ -5276,7 +5273,7 @@
</span><span class="cx"> if (!trackSize)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- repeatedValues->append(trackSize.release());
</del><ins>+ repeatedValues->append(trackSize.releaseNonNull());
</ins><span class="cx">
</span><span class="cx"> // This takes care of any trailing <custom-ident>* in the grammar.
</span><span class="cx"> currentValue = arguments->current();
</span><span class="lines">@@ -5286,7 +5283,7 @@
</span><span class="cx">
</span><span class="cx"> for (size_t i = 0; i < repetitions; ++i) {
</span><span class="cx"> for (size_t j = 0; j < repeatedValues->length(); ++j)
</span><del>- list.append(repeatedValues->itemWithoutBoundsCheck(j));
</del><ins>+ list.append(*repeatedValues->itemWithoutBoundsCheck(j));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> m_valueList->next();
</span><span class="lines">@@ -5316,8 +5313,8 @@
</span><span class="cx"> return 0;
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValueList> parsedArguments = CSSValueList::createCommaSeparated();
</span><del>- parsedArguments->append(minTrackBreadth);
- parsedArguments->append(maxTrackBreadth);
</del><ins>+ parsedArguments->append(minTrackBreadth.releaseNonNull());
+ parsedArguments->append(maxTrackBreadth.releaseNonNull());
</ins><span class="cx"> return CSSFunctionValue::create("minmax(", parsedArguments);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -6046,10 +6043,11 @@
</span><span class="cx"> RefPtr<CSSPrimitiveValue> shapeValue = parseBasicShape();
</span><span class="cx"> if (!shapeValue)
</span><span class="cx"> return nullptr;
</span><del>- list->append(shapeValue.release());
</del><ins>+ list->append(shapeValue.releaseNonNull());
</ins><span class="cx"> shapeFound = true;
</span><span class="cx"> } else if (isBoxValue(valueId, propId) && !boxFound) {
</span><del>- list->append(parseValidPrimitive(valueId, value));
</del><ins>+ RefPtr<CSSPrimitiveValue> parsedValue = parseValidPrimitive(valueId, value);
+ list->append(parsedValue.releaseNonNull());
</ins><span class="cx"> boxFound = true;
</span><span class="cx"> m_valueList->next();
</span><span class="cx"> } else
</span><span class="lines">@@ -6375,7 +6373,7 @@
</span><span class="cx"> m_valueList->next();
</span><span class="cx">
</span><span class="cx"> if (values)
</span><del>- values->append(parsedValue.release());
</del><ins>+ values->append(parsedValue.releaseNonNull());
</ins><span class="cx"> else {
</span><span class="cx"> addProperty(CSSPropertyFontVariant, parsedValue.release(), important);
</span><span class="cx"> return true;
</span><span class="lines">@@ -9148,7 +9146,7 @@
</span><span class="cx"> if (!parsedTransformValue)
</span><span class="cx"> return 0;
</span><span class="cx">
</span><del>- list->append(parsedTransformValue.release());
</del><ins>+ list->append(parsedTransformValue.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return list.release();
</span><span class="lines">@@ -9343,7 +9341,7 @@
</span><span class="cx"> if (!shadowValueList || shadowValueList->length() != 1)
</span><span class="cx"> return 0;
</span><span class="cx">
</span><del>- filterValue->append((shadowValueList.release())->itemWithoutBoundsCheck(0));
</del><ins>+ filterValue->append(*shadowValueList->itemWithoutBoundsCheck(0));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> default:
</span><span class="lines">@@ -9369,7 +9367,7 @@
</span><span class="cx"> if (value->unit == CSSPrimitiveValue::CSS_URI) {
</span><span class="cx"> RefPtr<WebKitCSSFilterValue> referenceFilterValue = WebKitCSSFilterValue::create(WebKitCSSFilterValue::ReferenceFilterOperation);
</span><span class="cx"> referenceFilterValue->append(CSSPrimitiveValue::create(value->string, CSSPrimitiveValue::CSS_URI));
</span><del>- list->append(referenceFilterValue.release());
</del><ins>+ list->append(referenceFilterValue.releaseNonNull());
</ins><span class="cx"> } else {
</span><span class="cx"> const CSSParserString name = value->function->name;
</span><span class="cx"> unsigned maximumArgumentCount = 1;
</span><span class="lines">@@ -9387,7 +9385,7 @@
</span><span class="cx"> if (!filterValue)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- list->append(filterValue.release());
</del><ins>+ list->append(filterValue.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -9695,8 +9693,8 @@
</span><span class="cx">
</span><span class="cx"> if (fill && shape) {
</span><span class="cx"> RefPtr<CSSValueList> parsedValues = CSSValueList::createSpaceSeparated();
</span><del>- parsedValues->append(fill.release());
- parsedValues->append(shape.release());
</del><ins>+ parsedValues->append(fill.releaseNonNull());
+ parsedValues->append(shape.releaseNonNull());
</ins><span class="cx"> addProperty(CSSPropertyWebkitTextEmphasisStyle, parsedValues.release(), important);
</span><span class="cx"> return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (172535 => 172536)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h        2014-08-13 20:31:34 UTC (rev 172535)
+++ trunk/Source/WebCore/css/CSSParser.h        2014-08-13 21:06:23 UTC (rev 172536)
</span><span class="lines">@@ -141,10 +141,9 @@
</span><span class="cx"> bool parseFillProperty(CSSPropertyID propId, CSSPropertyID& propId1, CSSPropertyID& propId2, RefPtr<CSSValue>&, RefPtr<CSSValue>&);
</span><span class="cx"> bool parseFillShorthand(CSSPropertyID, const CSSPropertyID* properties, int numProperties, bool important);
</span><span class="cx">
</span><del>- void addFillValue(RefPtr<CSSValue>& lval, PassRefPtr<CSSValue> rval);
</del><ins>+ void addFillValue(RefPtr<CSSValue>& lval, PassRef<CSSValue> rval);
+ void addAnimationValue(RefPtr<CSSValue>& lval, PassRef<CSSValue> rval);
</ins><span class="cx">
</span><del>- void addAnimationValue(RefPtr<CSSValue>& lval, PassRefPtr<CSSValue> rval);
-
</del><span class="cx"> PassRefPtr<CSSValue> parseAnimationDelay();
</span><span class="cx"> PassRefPtr<CSSValue> parseAnimationDirection();
</span><span class="cx"> PassRefPtr<CSSValue> parseAnimationDuration();
</span><span class="lines">@@ -413,8 +412,8 @@
</span><span class="cx"> PassRefPtr<StyleRuleBase> createViewportRule();
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- PassRefPtr<CSSPrimitiveValue> createPrimitiveNumericValue(CSSParserValue*);
- PassRefPtr<CSSPrimitiveValue> createPrimitiveStringValue(CSSParserValue*);
</del><ins>+ PassRef<CSSPrimitiveValue> createPrimitiveNumericValue(CSSParserValue*);
+ PassRef<CSSPrimitiveValue> createPrimitiveStringValue(CSSParserValue*);
</ins><span class="cx">
</span><span class="cx"> static URL completeURL(const CSSParserContext&, const String& url);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSProperty.cpp (172535 => 172536)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSProperty.cpp        2014-08-13 20:31:34 UTC (rev 172535)
+++ trunk/Source/WebCore/css/CSSProperty.cpp        2014-08-13 21:06:23 UTC (rev 172536)
</span><span class="lines">@@ -49,9 +49,9 @@
</span><span class="cx">
</span><span class="cx"> void CSSProperty::wrapValueInCommaSeparatedList()
</span><span class="cx"> {
</span><del>- RefPtr<CSSValue> value = m_value.release();
- m_value = CSSValueList::createCommaSeparated();
- toCSSValueList(m_value.get())->append(value.release());
</del><ins>+ auto list = CSSValueList::createCommaSeparated();
+ list.get().append(m_value.releaseNonNull());
+ m_value = WTF::move(list);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> enum LogicalBoxSide { BeforeSide, EndSide, AfterSide, StartSide };
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueList.cpp (172535 => 172536)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValueList.cpp        2014-08-13 20:31:34 UTC (rev 172535)
+++ trunk/Source/WebCore/css/CSSValueList.cpp        2014-08-13 21:06:23 UTC (rev 172536)
</span><span class="lines">@@ -43,17 +43,23 @@
</span><span class="cx"> {
</span><span class="cx"> m_valueListSeparator = SpaceSeparator;
</span><span class="cx"> m_values.reserveInitialCapacity(parserValues.size());
</span><del>- for (unsigned i = 0, size = parserValues.size(); i < size; ++i)
- m_values.uncheckedAppend(parserValues.valueAt(i)->createCSSValue());
</del><ins>+ for (unsigned i = 0, size = parserValues.size(); i < size; ++i) {
+ RefPtr<CSSValue> value = parserValues.valueAt(i)->createCSSValue();
+ ASSERT(value);
+ m_values.uncheckedAppend(value.releaseNonNull());
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSValueList::removeAll(CSSValue* val)
</span><span class="cx"> {
</span><ins>+ // FIXME: Why even take a pointer?
+ if (!val)
+ return false;
+
</ins><span class="cx"> bool found = false;
</span><del>- for (size_t index = 0; index < m_values.size(); index++) {
- RefPtr<CSSValue>& value = m_values.at(index);
- if (value && val && value->equals(*val)) {
- m_values.remove(index);
</del><ins>+ for (unsigned i = 0; i < m_values.size(); ++i) {
+ if (m_values[i].get().equals(*val)) {
+ m_values.remove(i);
</ins><span class="cx"> found = true;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -63,9 +69,12 @@
</span><span class="cx">
</span><span class="cx"> bool CSSValueList::hasValue(CSSValue* val) const
</span><span class="cx"> {
</span><del>- for (size_t index = 0; index < m_values.size(); index++) {
- const RefPtr<CSSValue>& value = m_values.at(index);
- if (value && val && value->equals(*val))
</del><ins>+ // FIXME: Why even take a pointer?
+ if (!val)
+ return false;
+
+ for (unsigned i = 0, size = m_values.size(); i < size; ++i) {
+ if (m_values[i].get().equals(*val))
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return false;
</span><span class="lines">@@ -87,8 +96,8 @@
</span><span class="cx"> default:
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><del>- for (size_t index = 0; index < m_values.size(); index++)
- newList->append(m_values[index]);
</del><ins>+ for (unsigned i = 0, size = m_values.size(); i < size; ++i)
+ newList->append(m_values[i].get());
</ins><span class="cx"> return newList.release();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -110,11 +119,10 @@
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- unsigned size = m_values.size();
- for (unsigned i = 0; i < size; i++) {
</del><ins>+ for (unsigned i = 0, size = m_values.size(); i < size; i++) {
</ins><span class="cx"> if (!result.isEmpty())
</span><span class="cx"> result.append(separator);
</span><del>- result.append(m_values[i]->cssText());
</del><ins>+ result.append(m_values[i].get().cssText());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return result.toString();
</span><span class="lines">@@ -122,7 +130,17 @@
</span><span class="cx">
</span><span class="cx"> bool CSSValueList::equals(const CSSValueList& other) const
</span><span class="cx"> {
</span><del>- return m_valueListSeparator == other.m_valueListSeparator && compareCSSValueVector<CSSValue>(m_values, other.m_values);
</del><ins>+ if (m_valueListSeparator != other.m_valueListSeparator)
+ return false;
+
+ if (m_values.size() != other.m_values.size())
+ return false;
+
+ for (unsigned i = 0, size = m_values.size(); i < size; ++i) {
+ if (!m_values[i].get().equals(other.m_values[i].get()))
+ return false;
+ }
+ return true;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSValueList::equals(const CSSValue& other) const
</span><span class="lines">@@ -130,21 +148,19 @@
</span><span class="cx"> if (m_values.size() != 1)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- const RefPtr<CSSValue>& value = m_values[0];
- return value && value->equals(other);
</del><ins>+ return m_values[0].get().equals(other);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSValueList::addSubresourceStyleURLs(ListHashSet<URL>& urls, const StyleSheetContents* styleSheet) const
</span><span class="cx"> {
</span><del>- size_t size = m_values.size();
- for (size_t i = 0; i < size; ++i)
- m_values[i]->addSubresourceStyleURLs(urls, styleSheet);
</del><ins>+ for (unsigned i = 0, size = m_values.size(); i < size; ++i)
+ m_values[i].get().addSubresourceStyleURLs(urls, styleSheet);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSValueList::hasFailedOrCanceledSubresources() const
</span><span class="cx"> {
</span><span class="cx"> for (unsigned i = 0; i < m_values.size(); ++i) {
</span><del>- if (m_values[i]->hasFailedOrCanceledSubresources())
</del><ins>+ if (m_values[i].get().hasFailedOrCanceledSubresources())
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return false;
</span><span class="lines">@@ -154,9 +170,9 @@
</span><span class="cx"> : CSSValue(cloneFrom.classType(), /* isCSSOMSafe */ true)
</span><span class="cx"> {
</span><span class="cx"> m_valueListSeparator = cloneFrom.m_valueListSeparator;
</span><del>- m_values.resize(cloneFrom.m_values.size());
- for (unsigned i = 0; i < m_values.size(); ++i)
- m_values[i] = cloneFrom.m_values[i]->cloneForCSSOM();
</del><ins>+ m_values.reserveInitialCapacity(cloneFrom.m_values.size());
+ for (unsigned i = 0, size = cloneFrom.m_values.size(); i < size; ++i)
+ m_values.uncheckedAppend(*cloneFrom.m_values[i]->cloneForCSSOM());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PassRefPtr<CSSValueList> CSSValueList::cloneForCSSOM() const
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueList.h (172535 => 172536)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValueList.h        2014-08-13 20:31:34 UTC (rev 172535)
+++ trunk/Source/WebCore/css/CSSValueList.h        2014-08-13 21:06:23 UTC (rev 172536)
</span><span class="lines">@@ -49,13 +49,13 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> size_t length() const { return m_values.size(); }
</span><del>- CSSValue* item(size_t index) { return index < m_values.size() ? m_values[index].get() : 0; }
- const CSSValue* item(size_t index) const { return index < m_values.size() ? m_values[index].get() : 0; }
- CSSValue* itemWithoutBoundsCheck(size_t index) { return m_values[index].get(); }
- const CSSValue* itemWithoutBoundsCheck(size_t index) const { ASSERT(index < m_values.size()); return m_values[index].get(); }
</del><ins>+ CSSValue* item(size_t index) { return index < m_values.size() ? &m_values[index].get() : nullptr; }
+ const CSSValue* item(size_t index) const { return index < m_values.size() ? &m_values[index].get() : nullptr; }
+ CSSValue* itemWithoutBoundsCheck(size_t index) { return &m_values[index].get(); }
+ const CSSValue* itemWithoutBoundsCheck(size_t index) const { ASSERT(index < m_values.size()); return &m_values[index].get(); }
</ins><span class="cx">
</span><del>- void append(PassRefPtr<CSSValue>);
- void prepend(PassRefPtr<CSSValue>);
</del><ins>+ void append(PassRef<CSSValue>);
+ void prepend(PassRef<CSSValue>);
</ins><span class="cx"> bool removeAll(CSSValue*);
</span><span class="cx"> bool hasValue(CSSValue*) const;
</span><span class="cx"> PassRefPtr<CSSValueList> copy();
</span><span class="lines">@@ -78,21 +78,19 @@
</span><span class="cx"> explicit CSSValueList(ValueListSeparator);
</span><span class="cx"> explicit CSSValueList(CSSParserValueList&);
</span><span class="cx">
</span><del>- Vector<RefPtr<CSSValue>, 4> m_values;
</del><ins>+ Vector<Ref<CSSValue>, 4> m_values;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> CSS_VALUE_TYPE_CASTS(CSSValueList, isValueList())
</span><span class="cx">
</span><del>-inline void CSSValueList::append(PassRefPtr<CSSValue> value)
</del><ins>+inline void CSSValueList::append(PassRef<CSSValue> value)
</ins><span class="cx"> {
</span><del>- ASSERT(value);
- m_values.append(value);
</del><ins>+ m_values.append(WTF::move(value));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-inline void CSSValueList::prepend(PassRefPtr<CSSValue> value)
</del><ins>+inline void CSSValueList::prepend(PassRef<CSSValue> value)
</ins><span class="cx"> {
</span><del>- ASSERT(value);
- m_values.insert(0, value);
</del><ins>+ m_values.insert(0, WTF::move(value));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Objects of this class are intended to be stack-allocated and scoped to a single function.
</span></span></pre></div>
<a id="trunkSourceWebCorecssSVGCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp (172535 => 172536)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp        2014-08-13 20:31:34 UTC (rev 172535)
+++ trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp        2014-08-13 21:06:23 UTC (rev 172536)
</span><span class="lines">@@ -40,25 +40,25 @@
</span><span class="cx"> case PaintOrderNormal:
</span><span class="cx"> return CSSPrimitiveValue::createIdentifier(CSSValueNormal);
</span><span class="cx"> case PaintOrderFill:
</span><del>- paintOrderList->append(fill.release());
</del><ins>+ paintOrderList->append(fill.releaseNonNull());
</ins><span class="cx"> break;
</span><span class="cx"> case PaintOrderFillMarkers:
</span><del>- paintOrderList->append(fill.release());
- paintOrderList->append(markers.release());
</del><ins>+ paintOrderList->append(fill.releaseNonNull());
+ paintOrderList->append(markers.releaseNonNull());
</ins><span class="cx"> break;
</span><span class="cx"> case PaintOrderStroke:
</span><del>- paintOrderList->append(stroke.release());
</del><ins>+ paintOrderList->append(stroke.releaseNonNull());
</ins><span class="cx"> break;
</span><span class="cx"> case PaintOrderStrokeMarkers:
</span><del>- paintOrderList->append(stroke.release());
- paintOrderList->append(markers.release());
</del><ins>+ paintOrderList->append(stroke.releaseNonNull());
+ paintOrderList->append(markers.releaseNonNull());
</ins><span class="cx"> break;
</span><span class="cx"> case PaintOrderMarkers:
</span><del>- paintOrderList->append(markers.release());
</del><ins>+ paintOrderList->append(markers.releaseNonNull());
</ins><span class="cx"> break;
</span><span class="cx"> case PaintOrderMarkersStroke:
</span><del>- paintOrderList->append(markers.release());
- paintOrderList->append(stroke.release());
</del><ins>+ paintOrderList->append(markers.releaseNonNull());
+ paintOrderList->append(stroke.releaseNonNull());
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> return paintOrderList.release();
</span></span></pre></div>
<a id="trunkSourceWebCorecssSVGCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SVGCSSParser.cpp (172535 => 172536)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SVGCSSParser.cpp        2014-08-13 20:31:34 UTC (rev 172535)
+++ trunk/Source/WebCore/css/SVGCSSParser.cpp        2014-08-13 21:06:23 UTC (rev 172536)
</span><span class="lines">@@ -402,17 +402,17 @@
</span><span class="cx"> case CSSValueFill:
</span><span class="cx"> FALLTHROUGH;
</span><span class="cx"> case CSSValueStroke:
</span><del>- paintOrderList->append(firstPaintOrderType == CSSValueFill ? fill.release() : stroke.release());
</del><ins>+ paintOrderList->append(firstPaintOrderType == CSSValueFill ? fill.releaseNonNull() : stroke.releaseNonNull());
</ins><span class="cx"> if (paintTypeList.size() > 1) {
</span><span class="cx"> if (paintTypeList.at(1) == CSSValueMarkers)
</span><del>- paintOrderList->append(markers.release());
</del><ins>+ paintOrderList->append(markers.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx"> break;
</span><span class="cx"> case CSSValueMarkers:
</span><del>- paintOrderList->append(markers.release());
</del><ins>+ paintOrderList->append(markers.releaseNonNull());
</ins><span class="cx"> if (paintTypeList.size() > 1) {
</span><span class="cx"> if (paintTypeList.at(1) == CSSValueStroke)
</span><del>- paintOrderList->append(stroke.release());
</del><ins>+ paintOrderList->append(stroke.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx"> break;
</span><span class="cx"> default:
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditingStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/EditingStyle.cpp (172535 => 172536)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/EditingStyle.cpp        2014-08-13 20:31:34 UTC (rev 172535)
+++ trunk/Source/WebCore/editing/EditingStyle.cpp        2014-08-13 21:06:23 UTC (rev 172536)
</span><span class="lines">@@ -1051,10 +1051,10 @@
</span><span class="cx"> RefPtr<CSSPrimitiveValue> lineThrough = cssValuePool().createIdentifierValue(CSSValueLineThrough);
</span><span class="cx">
</span><span class="cx"> if (valueToMerge->hasValue(underline.get()) && !mergedValue->hasValue(underline.get()))
</span><del>- mergedValue->append(underline.get());
</del><ins>+ mergedValue->append(underline.releaseNonNull());
</ins><span class="cx">
</span><span class="cx"> if (valueToMerge->hasValue(lineThrough.get()) && !mergedValue->hasValue(lineThrough.get()))
</span><del>- mergedValue->append(lineThrough.get());
</del><ins>+ mergedValue->append(lineThrough.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void EditingStyle::mergeStyle(const StyleProperties* style, CSSPropertyOverrideMode mode)
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/EditorCommand.cpp (172535 => 172536)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/EditorCommand.cpp        2014-08-13 20:31:34 UTC (rev 172535)
+++ trunk/Source/WebCore/editing/EditorCommand.cpp        2014-08-13 21:06:23 UTC (rev 172536)
</span><span class="lines">@@ -142,7 +142,7 @@
</span><span class="cx"> if (selectedCSSValue->isValueList()) {
</span><span class="cx"> RefPtr<CSSValueList> selectedCSSValueList = toCSSValueList(selectedCSSValue.get());
</span><span class="cx"> if (!selectedCSSValueList->removeAll(value))
</span><del>- selectedCSSValueList->append(value);
</del><ins>+ selectedCSSValueList->append(*value);
</ins><span class="cx"> if (selectedCSSValueList->length())
</span><span class="cx"> newStyle = selectedCSSValueList->cssText();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontFaceSrcElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontFaceSrcElement.cpp (172535 => 172536)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontFaceSrcElement.cpp        2014-08-13 20:31:34 UTC (rev 172535)
+++ trunk/Source/WebCore/svg/SVGFontFaceSrcElement.cpp        2014-08-13 21:06:23 UTC (rev 172536)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx"> else if (isSVGFontFaceNameElement(child))
</span><span class="cx"> srcValue = toSVGFontFaceNameElement(child).srcValue();
</span><span class="cx"> if (srcValue && srcValue->resource().length())
</span><del>- list->append(srcValue.release());
</del><ins>+ list->append(srcValue.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx"> return list;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGLengthcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGLength.cpp (172535 => 172536)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGLength.cpp        2014-08-13 20:31:34 UTC (rev 172535)
+++ trunk/Source/WebCore/svg/SVGLength.cpp        2014-08-13 21:06:23 UTC (rev 172536)
</span><span class="lines">@@ -335,7 +335,7 @@
</span><span class="cx"> return length;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<CSSPrimitiveValue> SVGLength::toCSSPrimitiveValue(const SVGLength& length)
</del><ins>+PassRef<CSSPrimitiveValue> SVGLength::toCSSPrimitiveValue(const SVGLength& length)
</ins><span class="cx"> {
</span><span class="cx"> CSSPrimitiveValue::UnitTypes cssType = CSSPrimitiveValue::CSS_UNKNOWN;
</span><span class="cx"> switch (length.unitType()) {
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGLengthh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGLength.h (172535 => 172536)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGLength.h        2014-08-13 20:31:34 UTC (rev 172535)
+++ trunk/Source/WebCore/svg/SVGLength.h        2014-08-13 21:06:23 UTC (rev 172536)
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static SVGLength fromCSSPrimitiveValue(CSSPrimitiveValue*);
</span><del>- static PassRefPtr<CSSPrimitiveValue> toCSSPrimitiveValue(const SVGLength&);
</del><ins>+ static PassRef<CSSPrimitiveValue> toCSSPrimitiveValue(const SVGLength&);
</ins><span class="cx"> static SVGLengthMode lengthModeForAnimatedLengthAttribute(const QualifiedName&);
</span><span class="cx">
</span><span class="cx"> SVGLength blend(const SVGLength& from, float progress) const
</span></span></pre>
</div>
</div>
</body>
</html>