<!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>[201290] trunk</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/201290">201290</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-05-23 10:40:36 -0700 (Mon, 23 May 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Clean up / Modernize the CSS Parser
https://bugs.webkit.org/show_bug.cgi?id=157961
Reviewed by Alex Christensen.
Clean up / Modernize the CSS Parser.
* WebCore.xcodeproj/project.pbxproj:
* css/BasicShapeFunctions.cpp:
(WebCore::valueForBasicShape):
(WebCore::convertToLength):
(WebCore::convertToLengthSize):
(WebCore::basicShapeForValue):
* css/BasicShapeFunctions.h:
* css/CSSBasicShapes.cpp:
(WebCore::CSSBasicShapePolygon::cssText):
(WebCore::CSSBasicShapePolygon::equals):
* css/CSSBasicShapes.h:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForReflection):
(WebCore::ComputedStyleExtractor::valueForShadow):
(WebCore::specifiedValueForGridTrackSize):
* css/CSSCrossfadeValue.cpp:
(WebCore::subimageKnownToBeOpaque):
(WebCore::CSSCrossfadeValue::fixedSize):
(WebCore::CSSCrossfadeValue::isPending):
(WebCore::CSSCrossfadeValue::knownToBeOpaque):
(WebCore::CSSCrossfadeValue::loadSubimages):
(WebCore::CSSCrossfadeValue::image):
(WebCore::CSSCrossfadeValue::blend):
(WebCore::CSSCrossfadeValue::equals):
(WebCore::CSSCrossfadeValue::equalInputImages):
* css/CSSCrossfadeValue.h:
(WebCore::CSSCrossfadeValue::create):
(WebCore::CSSCrossfadeValue::CSSCrossfadeValue):
* css/CSSCustomPropertyValue.h:
(WebCore::CSSCustomPropertyValue::create):
(WebCore::CSSCustomPropertyValue::CSSCustomPropertyValue):
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::fixedSize):
(WebCore::CSSFilterImageValue::isPending):
(WebCore::CSSFilterImageValue::loadSubimages):
(WebCore::CSSFilterImageValue::image):
(WebCore::CSSFilterImageValue::createFilterOperations):
(WebCore::CSSFilterImageValue::equals):
(WebCore::CSSFilterImageValue::equalInputImages):
* css/CSSFilterImageValue.h:
(WebCore::CSSFilterImageValue::CSSFilterImageValue):
* css/CSSFontFaceSet.cpp:
(WebCore::CSSFontFaceSet::matchingFaces):
* css/CSSFunctionValue.cpp:
(WebCore::CSSFunctionValue::CSSFunctionValue):
* css/CSSFunctionValue.h:
(WebCore::CSSFunctionValue::create):
* css/CSSGradientValue.h:
(WebCore::CSSLinearGradientValue::setAngle):
* css/CSSGrammar.y.in:
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::subimageIsPending):
(WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
* css/CSSImageGeneratorValue.h:
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::cachedOrPendingImage):
* css/CSSImageValue.h:
* css/CSSKeyframesRule.cpp:
(WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
(WebCore::StyleRuleKeyframes::parserAppendKeyframe):
(WebCore::StyleRuleKeyframes::wrapperAppendKeyframe):
(WebCore::CSSKeyframesRule::appendRule):
(WebCore::CSSKeyframesRule::findRule):
(WebCore::CSSKeyframesRule::item):
(WebCore::StyleRuleKeyframes::~StyleRuleKeyframes): Deleted.
* css/CSSKeyframesRule.h:
(WebCore::StyleRuleKeyframes::keyframes):
* css/CSSParser.cpp:
(WebCore::parseColorValue):
(WebCore::parseSimpleLengthValue):
(WebCore::parseKeywordValue):
(WebCore::parseTranslateTransformValue):
(WebCore::CSSParser::parseFontFaceValue):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseCustomPropertyValue):
(WebCore::CSSParser::parseDeclaration):
(WebCore::CSSParser::SourceSize::SourceSize):
(WebCore::filterProperties):
(WebCore::CSSParser::clearProperties):
(WebCore::CSSParser::addExpandedPropertyForValue):
(WebCore::CSSParser::parseVariableDependentValue):
(WebCore::CSSParser::parseContentDistributionOverflowPosition):
(WebCore::CSSParser::parseItemPositionOverflowPosition):
(WebCore::CSSParser::parseNonElementSnapPoints):
(WebCore::CSSParser::parseScrollSnapDestination):
(WebCore::CSSParser::parseScrollSnapCoordinate):
(WebCore::CSSParser::parseFillShorthand):
(WebCore::CSSParser::addAnimationValue):
(WebCore::CSSParser::parseAnimationShorthand):
(WebCore::CSSParser::parseColumnWidth):
(WebCore::CSSParser::parseColumnCount):
(WebCore::CSSParser::parseColumnsShorthand):
(WebCore::CSSParser::parseTransitionShorthand):
(WebCore::CSSParser::parseSize):
(WebCore::CSSParser::parseQuotes):
(WebCore::CSSParser::parseAlt):
(WebCore::CSSParser::parseCustomPropertyDeclaration):
(WebCore::CSSParser::parseContent):
(WebCore::CSSParser::parseAttr):
(WebCore::CSSParser::parseBackgroundColor):
(WebCore::CSSParser::parseFillPositionComponent):
(WebCore::CSSParser::parse4ValuesFillPosition):
(WebCore::CSSParser::parse3ValuesFillPosition):
(WebCore::CSSParser::parseFillPosition):
(WebCore::CSSParser::parseFillSize):
(WebCore::CSSParser::parseFillProperty):
(WebCore::CSSParser::parseAnimationDelay):
(WebCore::CSSParser::parseAnimationDirection):
(WebCore::CSSParser::parseAnimationDuration):
(WebCore::CSSParser::parseAnimationFillMode):
(WebCore::CSSParser::parseAnimationIterationCount):
(WebCore::CSSParser::parseAnimationName):
(WebCore::CSSParser::parseAnimationPlayState):
(WebCore::CSSParser::parseAnimationTrigger):
(WebCore::CSSParser::parseAnimationProperty):
(WebCore::CSSParser::parseKeyframeSelector):
(WebCore::CSSParser::parseGridPosition):
(WebCore::gridMissingGridPositionValue):
(WebCore::CSSParser::parseGridItemPositionShorthand):
(WebCore::CSSParser::parseGridGapShorthand):
(WebCore::CSSParser::parseGridTemplateRowsAndAreasAndColumns):
(WebCore::CSSParser::parseGridTemplateShorthand):
(WebCore::CSSParser::parseGridShorthand):
(WebCore::CSSParser::parseGridAreaShorthand):
(WebCore::CSSParser::parseGridLineNames):
(WebCore::CSSParser::parseGridTrackList):
(WebCore::CSSParser::parseGridTrackRepeatFunction):
(WebCore::CSSParser::parseGridTrackSize):
(WebCore::CSSParser::parseGridAutoFlow):
(WebCore::skipCommaInDashboardRegion):
(WebCore::CSSParser::parseDashboardRegions):
(WebCore::parseGridTemplateAreasColumnNames):
(WebCore::CSSParser::parseCounterContent):
(WebCore::CSSParser::parseClipShape):
(WebCore::CSSParser::parseInsetRoundedCorners):
(WebCore::CSSParser::parseBasicShapeInset):
(WebCore::CSSParser::parseBasicShapeCircle):
(WebCore::CSSParser::parseBasicShapeEllipse):
(WebCore::CSSParser::parseBasicShapePolygon):
(WebCore::CSSParser::parseBasicShapePath):
(WebCore::CSSParser::parseBasicShapeAndOrBox):
(WebCore::CSSParser::parseFont):
(WebCore::CSSParser::parseFontFamily):
(WebCore::CSSParser::parseFontSynthesis):
(WebCore::CSSParser::parseFontFaceSrcURI):
(WebCore::CSSParser::parseFontFaceSrc):
(WebCore::CSSParser::parseFontFaceUnicodeRange):
(WebCore::parseAlphaValue):
(WebCore::ShadowParseContext::commitValue):
(WebCore::CSSParser::parseShadow):
(WebCore::CSSParser::parseReflect):
(WebCore::CSSParser::parseFlex):
(WebCore::BorderImageParseContext::commitImage):
(WebCore::BorderImageParseContext::commitImageSlice):
(WebCore::BorderImageParseContext::commitBorderWidth):
(WebCore::BorderImageParseContext::commitBorderOutset):
(WebCore::BorderImageParseContext::commitRepeat):
(WebCore::BorderImageParseContext::commitWebKitBorderImage):
(WebCore::BorderImageParseContext::commitBorderImageProperty):
(WebCore::CSSParser::parseBorderImage):
(WebCore::CSSParser::parseBorderImageRepeat):
(WebCore::BorderImageQuadParseContext::setTop):
(WebCore::CSSParser::parseCounter):
(WebCore::CSSParser::parseDeprecatedGradient):
(WebCore::CSSParser::parseDeprecatedLinearGradient):
(WebCore::CSSParser::parseDeprecatedRadialGradient):
(WebCore::CSSParser::parseLinearGradient):
(WebCore::CSSParser::parseRadialGradient):
(WebCore::CSSParser::parseFilterImage):
(WebCore::CSSParser::parseCrossfade):
(WebCore::CSSParser::parseImageResolution):
(WebCore::CSSParser::parseImageSet):
(WebCore::CSSParser::parseTransform):
(WebCore::CSSParser::parseTransformValue):
(WebCore::CSSParser::parseFilter):
(WebCore::CSSParser::parseTextDecoration):
(WebCore::CSSParser::parseTextEmphasisStyle):
(WebCore::CSSParser::parseTextEmphasisPosition):
(WebCore::CSSParser::parseTextIndent):
(WebCore::CSSParser::parseHangingPunctuation):
(WebCore::CSSParser::parseFontFeatureSettings):
(WebCore::CSSParser::parseWillChange):
(WebCore::CSSParser::createImportRule):
(WebCore::CSSParser::createMediaRule):
(WebCore::CSSParser::createEmptyMediaRule):
(WebCore::CSSParser::createSupportsRule):
(WebCore::CSSParser::markSupportsRuleHeaderStart):
(WebCore::CSSParser::popSupportsRuleData):
(WebCore::CSSParser::processAndAddNewRuleToSourceTreeIfNeeded):
(WebCore::CSSParser::addNewRuleToSourceTree):
(WebCore::CSSParser::popRuleData):
(WebCore::CSSParser::createKeyframesRule):
(WebCore::CSSParser::createStyleRule):
(WebCore::CSSParser::createFontFaceRule):
(WebCore::CSSParser::createPageRule):
(WebCore::CSSParser::createRegionRule):
(WebCore::CSSParser::endDeclarationsForMarginBox):
(WebCore::CSSParser::createKeyframe):
(WebCore::CSSParser::updateLastMediaLine):
(WebCore::fixUnparsedProperties):
(WebCore::CSSParser::fixUnparsedPropertyRanges):
(WebCore::CSSParser::parseViewportProperty):
(WebCore::cssPropertyNameIOSAliasing):
(WebCore::isAppleLegacyCssValueKeyword):
(WebCore::quoteCSSString):
(WebCore::AnimationParseContext::commitFirstAnimation): Deleted.
(WebCore::strictCSSParserContext): Deleted.
(WebCore::CSSParser::~CSSParser): Deleted.
(WebCore::convertToASCIILowercaseInPlace): Deleted.
(WebCore::CSSParserString::convertToASCIILowercaseInPlace): Deleted.
(WebCore::CSSParser::setupParser): Deleted.
(WebCore::isSimpleLengthPropertyID): Deleted.
(WebCore::isValidKeywordPropertyAndValue): Deleted.
(WebCore::parseTransformTranslateArguments): Deleted.
(WebCore::CSSParser::parseColor): Deleted.
(WebCore::CSSParser::parseMediaQuery): Deleted.
(WebCore::CSSParser::parseSizesAttribute): Deleted.
(WebCore::CSSParser::addProperty): Deleted.
(WebCore::CSSParser::validateCalculationUnit): Deleted.
(WebCore::isItemPositionKeyword): Deleted.
(WebCore::CSSParser::parseShorthand): Deleted.
(WebCore::CSSParser::parseSizeParameter): Deleted.
(WebCore::CSSParser::parseFillImage): Deleted.
(WebCore::CSSParser::parsePositionY): Deleted.
(WebCore::CSSParser::parse2ValuesFillPosition): Deleted.
(WebCore::CSSParser::parseTransformOriginShorthand): Deleted.
(WebCore::CSSParser::parseAnimationTimingFunction): Deleted.
(WebCore::CSSParser::parseGridTemplateColumns): Deleted.
(WebCore::CSSParser::parseSingleGridAreaLonghand): Deleted.
(WebCore::allTracksAreFixedSized): Deleted.
(WebCore::CSSParser::parseGridBreadth): Deleted.
(WebCore::CSSParser::parseGridTemplateAreasRow): Deleted.
(WebCore::completeBorderRadii): Deleted.
(WebCore::CSSParser::parseShapeRadius): Deleted.
(WebCore::isBoxValue): Deleted.
(WebCore::CSSParser::parseShapeProperty): Deleted.
(WebCore::CSSParser::parseClipPath): Deleted.
(WebCore::CSSParser::parseBasicShape): Deleted.
(WebCore::FontFamilyValueBuilder::commit): Deleted.
(WebCore::CSSParser::parseFontWeight): Deleted.
(WebCore::CSSParser::parseFontFaceSrcLocal): Deleted.
(WebCore::parseDouble): Deleted.
(WebCore::mightBeRGBA): Deleted.
(WebCore::mightBeRGB): Deleted.
(WebCore::ShadowParseContext::commitColor): Deleted.
(WebCore::BorderImageParseContext::BorderImageParseContext): Deleted.
(WebCore::BorderImageParseContext::commitForwardSlashOperator): Deleted.
(WebCore::BorderImageParseContext::commitBorderImage): Deleted.
(WebCore::isBorderImageRepeatKeyword): Deleted.
(WebCore::BorderImageSliceParseContext::commitBorderImageSlice): Deleted.
(WebCore::CSSParser::parseBorderImageQuad): Deleted.
(WebCore::parseDeprecatedGradientColorStop): Deleted.
(WebCore::valueFromSideKeyword): Deleted.
(WebCore::CSSParser::isGeneratedImageValue): Deleted.
(WebCore::CSSParser::parseCanvas): Deleted.
(WebCore::CSSParser::parseNamedImage): Deleted.
(WebCore::TransformOperationInfo::TransformOperationInfo): Deleted.
(WebCore::CSSParser::isBlendMode): Deleted.
(WebCore::filterInfoForName): Deleted.
(WebCore::CSSParser::parseFlowThread): Deleted.
(WebCore::CSSParser::parseRegionThread): Deleted.
(WebCore::CSSParser::parseLineBoxContain): Deleted.
(WebCore::CSSParser::parseFontFeatureTag): Deleted.
(WebCore::CSSParser::parseFontVariantLigatures): Deleted.
(WebCore::isCSSLetter): Deleted.
(WebCore::CSSParser::markSupportsRuleHeaderEnd): Deleted.
(WebCore::CSSParser::syntaxError): Deleted.
(WebCore::CSSParser::logError): Deleted.
(WebCore::CSSParser::rewriteSpecifiersWithElementName): Deleted.
(WebCore::CSSParser::rewriteSpecifiers): Deleted.
(WebCore::CSSParser::invalidBlockHit): Deleted.
(WebCore::CSSParser::markRuleHeaderStart): Deleted.
(WebCore::CSSParser::setRuleHeaderEnd): Deleted.
(WebCore::CSSParser::markRuleHeaderEnd): Deleted.
(WebCore::CSSParser::markRuleBodyStart): Deleted.
(WebCore::cssPropertyID): Deleted.
(WebCore::isCSSTokenizerIdentifier): Deleted.
* css/CSSParser.h:
(WebCore::CSSParser::ValueWithCalculation::setCalculation): Deleted.
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::cloneForCSSOM):
* css/CSSPrimitiveValue.h:
* css/CSSPropertySourceData.h:
* css/CSSReflectValue.cpp:
(WebCore::CSSReflectValue::equals):
* css/CSSReflectValue.h:
(WebCore::CSSReflectValue::create):
(WebCore::CSSReflectValue::direction):
(WebCore::CSSReflectValue::offset):
(WebCore::CSSReflectValue::CSSReflectValue):
* css/CSSShadowValue.cpp:
(WebCore::CSSShadowValue::CSSShadowValue):
(WebCore::CSSShadowValue::customCSSText): Deleted.
* css/CSSShadowValue.h:
(WebCore::CSSShadowValue::create):
* css/CSSValue.h:
(WebCore::compareCSSValueVector):
* css/CSSVariableDependentValue.cpp:
(WebCore::CSSVariableDependentValue::checkVariablesForCycles):
* css/CSSVariableDependentValue.h:
(WebCore::CSSVariableDependentValue::create):
(WebCore::CSSVariableDependentValue::customCSSText):
(WebCore::CSSVariableDependentValue::valueList):
(WebCore::CSSVariableDependentValue::CSSVariableDependentValue):
* css/CSSVariableValue.cpp:
(WebCore::CSSVariableValue::buildParserValueListSubstitutingVariables):
* css/Counter.h:
(WebCore::Counter::create):
(WebCore::Counter::identifier):
(WebCore::Counter::listStyle):
(WebCore::Counter::separator):
(WebCore::Counter::listStyleIdent):
(WebCore::Counter::setIdentifier):
(WebCore::Counter::setListStyle):
(WebCore::Counter::setSeparator):
(WebCore::Counter::cloneForCSSOM):
(WebCore::Counter::Counter):
* css/DOMCSSNamespace.cpp:
(WebCore::DOMCSSNamespace::supports):
* css/FontFace.cpp:
(WebCore::FontFace::parseString):
(WebCore::FontFace::setVariant):
* css/Rect.h:
(WebCore::RectBase::RectBase):
* css/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGStrokeDasharray):
(WebCore::CSSParser::parseSVGPaint):
(WebCore::CSSParser::parseSVGColor):
(WebCore::CSSParser::parsePaintOrder):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertReflection):
* css/StyleProperties.cpp:
(WebCore::MutableStyleProperties::setProperty):
(WebCore::MutableStyleProperties::setCustomProperty):
(WebCore::MutableStyleProperties::parseDeclaration):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::keyframeStylesForAnimation):
(WebCore::StyleResolver::cachedOrPendingFromValue):
* css/StyleResolver.h:
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::setMatrixValue):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::setFont):
* inspector/InspectorStyleSheet.cpp:
(flattenSourceData):
(ParsedStyleSheet::setSourceData):
(ParsedStyleSheet::ruleSourceDataAt):
(WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::retrieveResourcesForProperties):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::crossfadeBlend):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::checkVariablesInCustomProperties):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</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="#trunkSourceWebCorecssCSSBasicShapescpp">trunk/Source/WebCore/css/CSSBasicShapes.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSBasicShapesh">trunk/Source/WebCore/css/CSSBasicShapes.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSCrossfadeValuecpp">trunk/Source/WebCore/css/CSSCrossfadeValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSCrossfadeValueh">trunk/Source/WebCore/css/CSSCrossfadeValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSCustomPropertyValueh">trunk/Source/WebCore/css/CSSCustomPropertyValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSFilterImageValuecpp">trunk/Source/WebCore/css/CSSFilterImageValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFilterImageValueh">trunk/Source/WebCore/css/CSSFilterImageValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFaceSetcpp">trunk/Source/WebCore/css/CSSFontFaceSet.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFunctionValuecpp">trunk/Source/WebCore/css/CSSFunctionValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFunctionValueh">trunk/Source/WebCore/css/CSSFunctionValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSGradientValueh">trunk/Source/WebCore/css/CSSGradientValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSGrammaryin">trunk/Source/WebCore/css/CSSGrammar.y.in</a></li>
<li><a href="#trunkSourceWebCorecssCSSImageGeneratorValuecpp">trunk/Source/WebCore/css/CSSImageGeneratorValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSImageGeneratorValueh">trunk/Source/WebCore/css/CSSImageGeneratorValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSImageValuecpp">trunk/Source/WebCore/css/CSSImageValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSImageValueh">trunk/Source/WebCore/css/CSSImageValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSKeyframesRulecpp">trunk/Source/WebCore/css/CSSKeyframesRule.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSKeyframesRuleh">trunk/Source/WebCore/css/CSSKeyframesRule.h</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="#trunkSourceWebCorecssCSSPrimitiveValuecpp">trunk/Source/WebCore/css/CSSPrimitiveValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValueh">trunk/Source/WebCore/css/CSSPrimitiveValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSPropertySourceDatah">trunk/Source/WebCore/css/CSSPropertySourceData.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSReflectValuecpp">trunk/Source/WebCore/css/CSSReflectValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSReflectValueh">trunk/Source/WebCore/css/CSSReflectValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSShadowValuecpp">trunk/Source/WebCore/css/CSSShadowValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSShadowValueh">trunk/Source/WebCore/css/CSSShadowValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSStyleSheetcpp">trunk/Source/WebCore/css/CSSStyleSheet.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueh">trunk/Source/WebCore/css/CSSValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSVariableDependentValuecpp">trunk/Source/WebCore/css/CSSVariableDependentValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSVariableDependentValueh">trunk/Source/WebCore/css/CSSVariableDependentValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSVariableValuecpp">trunk/Source/WebCore/css/CSSVariableValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCounterh">trunk/Source/WebCore/css/Counter.h</a></li>
<li><a href="#trunkSourceWebCorecssDOMCSSNamespacecpp">trunk/Source/WebCore/css/DOMCSSNamespace.cpp</a></li>
<li><a href="#trunkSourceWebCorecssFontFacecpp">trunk/Source/WebCore/css/FontFace.cpp</a></li>
<li><a href="#trunkSourceWebCorecssRecth">trunk/Source/WebCore/css/Rect.h</a></li>
<li><a href="#trunkSourceWebCorecssRuleSetcpp">trunk/Source/WebCore/css/RuleSet.cpp</a></li>
<li><a href="#trunkSourceWebCorecssSVGCSSParsercpp">trunk/Source/WebCore/css/SVGCSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderConverterh">trunk/Source/WebCore/css/StyleBuilderConverter.h</a></li>
<li><a href="#trunkSourceWebCorecssStylePropertiescpp">trunk/Source/WebCore/css/StyleProperties.cpp</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="#trunkSourceWebCorecssWebKitCSSMatrixcpp">trunk/Source/WebCore/css/WebKitCSSMatrix.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp">trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorStyleSheetcpp">trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageSerializercpp">trunk/Source/WebCore/page/PageSerializer.cpp</a></li>
<li><a href="#trunkSourceWebCorepageanimationCSSPropertyAnimationcpp">trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStylecpp">trunk/Source/WebCore/rendering/style/RenderStyle.cpp</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebCoreCSSParsercpp">trunk/Tools/TestWebKitAPI/Tests/WebCore/CSSParser.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/ChangeLog        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -1,3 +1,367 @@
</span><ins>+2016-05-23 Chris Dumez <cdumez@apple.com>
+
+ Clean up / Modernize the CSS Parser
+ https://bugs.webkit.org/show_bug.cgi?id=157961
+
+ Reviewed by Alex Christensen.
+
+ Clean up / Modernize the CSS Parser.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * css/BasicShapeFunctions.cpp:
+ (WebCore::valueForBasicShape):
+ (WebCore::convertToLength):
+ (WebCore::convertToLengthSize):
+ (WebCore::basicShapeForValue):
+ * css/BasicShapeFunctions.h:
+ * css/CSSBasicShapes.cpp:
+ (WebCore::CSSBasicShapePolygon::cssText):
+ (WebCore::CSSBasicShapePolygon::equals):
+ * css/CSSBasicShapes.h:
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::valueForReflection):
+ (WebCore::ComputedStyleExtractor::valueForShadow):
+ (WebCore::specifiedValueForGridTrackSize):
+ * css/CSSCrossfadeValue.cpp:
+ (WebCore::subimageKnownToBeOpaque):
+ (WebCore::CSSCrossfadeValue::fixedSize):
+ (WebCore::CSSCrossfadeValue::isPending):
+ (WebCore::CSSCrossfadeValue::knownToBeOpaque):
+ (WebCore::CSSCrossfadeValue::loadSubimages):
+ (WebCore::CSSCrossfadeValue::image):
+ (WebCore::CSSCrossfadeValue::blend):
+ (WebCore::CSSCrossfadeValue::equals):
+ (WebCore::CSSCrossfadeValue::equalInputImages):
+ * css/CSSCrossfadeValue.h:
+ (WebCore::CSSCrossfadeValue::create):
+ (WebCore::CSSCrossfadeValue::CSSCrossfadeValue):
+ * css/CSSCustomPropertyValue.h:
+ (WebCore::CSSCustomPropertyValue::create):
+ (WebCore::CSSCustomPropertyValue::CSSCustomPropertyValue):
+ * css/CSSFilterImageValue.cpp:
+ (WebCore::CSSFilterImageValue::fixedSize):
+ (WebCore::CSSFilterImageValue::isPending):
+ (WebCore::CSSFilterImageValue::loadSubimages):
+ (WebCore::CSSFilterImageValue::image):
+ (WebCore::CSSFilterImageValue::createFilterOperations):
+ (WebCore::CSSFilterImageValue::equals):
+ (WebCore::CSSFilterImageValue::equalInputImages):
+ * css/CSSFilterImageValue.h:
+ (WebCore::CSSFilterImageValue::CSSFilterImageValue):
+ * css/CSSFontFaceSet.cpp:
+ (WebCore::CSSFontFaceSet::matchingFaces):
+ * css/CSSFunctionValue.cpp:
+ (WebCore::CSSFunctionValue::CSSFunctionValue):
+ * css/CSSFunctionValue.h:
+ (WebCore::CSSFunctionValue::create):
+ * css/CSSGradientValue.h:
+ (WebCore::CSSLinearGradientValue::setAngle):
+ * css/CSSGrammar.y.in:
+ * css/CSSImageGeneratorValue.cpp:
+ (WebCore::CSSImageGeneratorValue::subimageIsPending):
+ (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
+ * css/CSSImageGeneratorValue.h:
+ * css/CSSImageValue.cpp:
+ (WebCore::CSSImageValue::cachedOrPendingImage):
+ * css/CSSImageValue.h:
+ * css/CSSKeyframesRule.cpp:
+ (WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
+ (WebCore::StyleRuleKeyframes::parserAppendKeyframe):
+ (WebCore::StyleRuleKeyframes::wrapperAppendKeyframe):
+ (WebCore::CSSKeyframesRule::appendRule):
+ (WebCore::CSSKeyframesRule::findRule):
+ (WebCore::CSSKeyframesRule::item):
+ (WebCore::StyleRuleKeyframes::~StyleRuleKeyframes): Deleted.
+ * css/CSSKeyframesRule.h:
+ (WebCore::StyleRuleKeyframes::keyframes):
+ * css/CSSParser.cpp:
+ (WebCore::parseColorValue):
+ (WebCore::parseSimpleLengthValue):
+ (WebCore::parseKeywordValue):
+ (WebCore::parseTranslateTransformValue):
+ (WebCore::CSSParser::parseFontFaceValue):
+ (WebCore::CSSParser::parseValue):
+ (WebCore::CSSParser::parseCustomPropertyValue):
+ (WebCore::CSSParser::parseDeclaration):
+ (WebCore::CSSParser::SourceSize::SourceSize):
+ (WebCore::filterProperties):
+ (WebCore::CSSParser::clearProperties):
+ (WebCore::CSSParser::addExpandedPropertyForValue):
+ (WebCore::CSSParser::parseVariableDependentValue):
+ (WebCore::CSSParser::parseContentDistributionOverflowPosition):
+ (WebCore::CSSParser::parseItemPositionOverflowPosition):
+ (WebCore::CSSParser::parseNonElementSnapPoints):
+ (WebCore::CSSParser::parseScrollSnapDestination):
+ (WebCore::CSSParser::parseScrollSnapCoordinate):
+ (WebCore::CSSParser::parseFillShorthand):
+ (WebCore::CSSParser::addAnimationValue):
+ (WebCore::CSSParser::parseAnimationShorthand):
+ (WebCore::CSSParser::parseColumnWidth):
+ (WebCore::CSSParser::parseColumnCount):
+ (WebCore::CSSParser::parseColumnsShorthand):
+ (WebCore::CSSParser::parseTransitionShorthand):
+ (WebCore::CSSParser::parseSize):
+ (WebCore::CSSParser::parseQuotes):
+ (WebCore::CSSParser::parseAlt):
+ (WebCore::CSSParser::parseCustomPropertyDeclaration):
+ (WebCore::CSSParser::parseContent):
+ (WebCore::CSSParser::parseAttr):
+ (WebCore::CSSParser::parseBackgroundColor):
+ (WebCore::CSSParser::parseFillPositionComponent):
+ (WebCore::CSSParser::parse4ValuesFillPosition):
+ (WebCore::CSSParser::parse3ValuesFillPosition):
+ (WebCore::CSSParser::parseFillPosition):
+ (WebCore::CSSParser::parseFillSize):
+ (WebCore::CSSParser::parseFillProperty):
+ (WebCore::CSSParser::parseAnimationDelay):
+ (WebCore::CSSParser::parseAnimationDirection):
+ (WebCore::CSSParser::parseAnimationDuration):
+ (WebCore::CSSParser::parseAnimationFillMode):
+ (WebCore::CSSParser::parseAnimationIterationCount):
+ (WebCore::CSSParser::parseAnimationName):
+ (WebCore::CSSParser::parseAnimationPlayState):
+ (WebCore::CSSParser::parseAnimationTrigger):
+ (WebCore::CSSParser::parseAnimationProperty):
+ (WebCore::CSSParser::parseKeyframeSelector):
+ (WebCore::CSSParser::parseGridPosition):
+ (WebCore::gridMissingGridPositionValue):
+ (WebCore::CSSParser::parseGridItemPositionShorthand):
+ (WebCore::CSSParser::parseGridGapShorthand):
+ (WebCore::CSSParser::parseGridTemplateRowsAndAreasAndColumns):
+ (WebCore::CSSParser::parseGridTemplateShorthand):
+ (WebCore::CSSParser::parseGridShorthand):
+ (WebCore::CSSParser::parseGridAreaShorthand):
+ (WebCore::CSSParser::parseGridLineNames):
+ (WebCore::CSSParser::parseGridTrackList):
+ (WebCore::CSSParser::parseGridTrackRepeatFunction):
+ (WebCore::CSSParser::parseGridTrackSize):
+ (WebCore::CSSParser::parseGridAutoFlow):
+ (WebCore::skipCommaInDashboardRegion):
+ (WebCore::CSSParser::parseDashboardRegions):
+ (WebCore::parseGridTemplateAreasColumnNames):
+ (WebCore::CSSParser::parseCounterContent):
+ (WebCore::CSSParser::parseClipShape):
+ (WebCore::CSSParser::parseInsetRoundedCorners):
+ (WebCore::CSSParser::parseBasicShapeInset):
+ (WebCore::CSSParser::parseBasicShapeCircle):
+ (WebCore::CSSParser::parseBasicShapeEllipse):
+ (WebCore::CSSParser::parseBasicShapePolygon):
+ (WebCore::CSSParser::parseBasicShapePath):
+ (WebCore::CSSParser::parseBasicShapeAndOrBox):
+ (WebCore::CSSParser::parseFont):
+ (WebCore::CSSParser::parseFontFamily):
+ (WebCore::CSSParser::parseFontSynthesis):
+ (WebCore::CSSParser::parseFontFaceSrcURI):
+ (WebCore::CSSParser::parseFontFaceSrc):
+ (WebCore::CSSParser::parseFontFaceUnicodeRange):
+ (WebCore::parseAlphaValue):
+ (WebCore::ShadowParseContext::commitValue):
+ (WebCore::CSSParser::parseShadow):
+ (WebCore::CSSParser::parseReflect):
+ (WebCore::CSSParser::parseFlex):
+ (WebCore::BorderImageParseContext::commitImage):
+ (WebCore::BorderImageParseContext::commitImageSlice):
+ (WebCore::BorderImageParseContext::commitBorderWidth):
+ (WebCore::BorderImageParseContext::commitBorderOutset):
+ (WebCore::BorderImageParseContext::commitRepeat):
+ (WebCore::BorderImageParseContext::commitWebKitBorderImage):
+ (WebCore::BorderImageParseContext::commitBorderImageProperty):
+ (WebCore::CSSParser::parseBorderImage):
+ (WebCore::CSSParser::parseBorderImageRepeat):
+ (WebCore::BorderImageQuadParseContext::setTop):
+ (WebCore::CSSParser::parseCounter):
+ (WebCore::CSSParser::parseDeprecatedGradient):
+ (WebCore::CSSParser::parseDeprecatedLinearGradient):
+ (WebCore::CSSParser::parseDeprecatedRadialGradient):
+ (WebCore::CSSParser::parseLinearGradient):
+ (WebCore::CSSParser::parseRadialGradient):
+ (WebCore::CSSParser::parseFilterImage):
+ (WebCore::CSSParser::parseCrossfade):
+ (WebCore::CSSParser::parseImageResolution):
+ (WebCore::CSSParser::parseImageSet):
+ (WebCore::CSSParser::parseTransform):
+ (WebCore::CSSParser::parseTransformValue):
+ (WebCore::CSSParser::parseFilter):
+ (WebCore::CSSParser::parseTextDecoration):
+ (WebCore::CSSParser::parseTextEmphasisStyle):
+ (WebCore::CSSParser::parseTextEmphasisPosition):
+ (WebCore::CSSParser::parseTextIndent):
+ (WebCore::CSSParser::parseHangingPunctuation):
+ (WebCore::CSSParser::parseFontFeatureSettings):
+ (WebCore::CSSParser::parseWillChange):
+ (WebCore::CSSParser::createImportRule):
+ (WebCore::CSSParser::createMediaRule):
+ (WebCore::CSSParser::createEmptyMediaRule):
+ (WebCore::CSSParser::createSupportsRule):
+ (WebCore::CSSParser::markSupportsRuleHeaderStart):
+ (WebCore::CSSParser::popSupportsRuleData):
+ (WebCore::CSSParser::processAndAddNewRuleToSourceTreeIfNeeded):
+ (WebCore::CSSParser::addNewRuleToSourceTree):
+ (WebCore::CSSParser::popRuleData):
+ (WebCore::CSSParser::createKeyframesRule):
+ (WebCore::CSSParser::createStyleRule):
+ (WebCore::CSSParser::createFontFaceRule):
+ (WebCore::CSSParser::createPageRule):
+ (WebCore::CSSParser::createRegionRule):
+ (WebCore::CSSParser::endDeclarationsForMarginBox):
+ (WebCore::CSSParser::createKeyframe):
+ (WebCore::CSSParser::updateLastMediaLine):
+ (WebCore::fixUnparsedProperties):
+ (WebCore::CSSParser::fixUnparsedPropertyRanges):
+ (WebCore::CSSParser::parseViewportProperty):
+ (WebCore::cssPropertyNameIOSAliasing):
+ (WebCore::isAppleLegacyCssValueKeyword):
+ (WebCore::quoteCSSString):
+ (WebCore::AnimationParseContext::commitFirstAnimation): Deleted.
+ (WebCore::strictCSSParserContext): Deleted.
+ (WebCore::CSSParser::~CSSParser): Deleted.
+ (WebCore::convertToASCIILowercaseInPlace): Deleted.
+ (WebCore::CSSParserString::convertToASCIILowercaseInPlace): Deleted.
+ (WebCore::CSSParser::setupParser): Deleted.
+ (WebCore::isSimpleLengthPropertyID): Deleted.
+ (WebCore::isValidKeywordPropertyAndValue): Deleted.
+ (WebCore::parseTransformTranslateArguments): Deleted.
+ (WebCore::CSSParser::parseColor): Deleted.
+ (WebCore::CSSParser::parseMediaQuery): Deleted.
+ (WebCore::CSSParser::parseSizesAttribute): Deleted.
+ (WebCore::CSSParser::addProperty): Deleted.
+ (WebCore::CSSParser::validateCalculationUnit): Deleted.
+ (WebCore::isItemPositionKeyword): Deleted.
+ (WebCore::CSSParser::parseShorthand): Deleted.
+ (WebCore::CSSParser::parseSizeParameter): Deleted.
+ (WebCore::CSSParser::parseFillImage): Deleted.
+ (WebCore::CSSParser::parsePositionY): Deleted.
+ (WebCore::CSSParser::parse2ValuesFillPosition): Deleted.
+ (WebCore::CSSParser::parseTransformOriginShorthand): Deleted.
+ (WebCore::CSSParser::parseAnimationTimingFunction): Deleted.
+ (WebCore::CSSParser::parseGridTemplateColumns): Deleted.
+ (WebCore::CSSParser::parseSingleGridAreaLonghand): Deleted.
+ (WebCore::allTracksAreFixedSized): Deleted.
+ (WebCore::CSSParser::parseGridBreadth): Deleted.
+ (WebCore::CSSParser::parseGridTemplateAreasRow): Deleted.
+ (WebCore::completeBorderRadii): Deleted.
+ (WebCore::CSSParser::parseShapeRadius): Deleted.
+ (WebCore::isBoxValue): Deleted.
+ (WebCore::CSSParser::parseShapeProperty): Deleted.
+ (WebCore::CSSParser::parseClipPath): Deleted.
+ (WebCore::CSSParser::parseBasicShape): Deleted.
+ (WebCore::FontFamilyValueBuilder::commit): Deleted.
+ (WebCore::CSSParser::parseFontWeight): Deleted.
+ (WebCore::CSSParser::parseFontFaceSrcLocal): Deleted.
+ (WebCore::parseDouble): Deleted.
+ (WebCore::mightBeRGBA): Deleted.
+ (WebCore::mightBeRGB): Deleted.
+ (WebCore::ShadowParseContext::commitColor): Deleted.
+ (WebCore::BorderImageParseContext::BorderImageParseContext): Deleted.
+ (WebCore::BorderImageParseContext::commitForwardSlashOperator): Deleted.
+ (WebCore::BorderImageParseContext::commitBorderImage): Deleted.
+ (WebCore::isBorderImageRepeatKeyword): Deleted.
+ (WebCore::BorderImageSliceParseContext::commitBorderImageSlice): Deleted.
+ (WebCore::CSSParser::parseBorderImageQuad): Deleted.
+ (WebCore::parseDeprecatedGradientColorStop): Deleted.
+ (WebCore::valueFromSideKeyword): Deleted.
+ (WebCore::CSSParser::isGeneratedImageValue): Deleted.
+ (WebCore::CSSParser::parseCanvas): Deleted.
+ (WebCore::CSSParser::parseNamedImage): Deleted.
+ (WebCore::TransformOperationInfo::TransformOperationInfo): Deleted.
+ (WebCore::CSSParser::isBlendMode): Deleted.
+ (WebCore::filterInfoForName): Deleted.
+ (WebCore::CSSParser::parseFlowThread): Deleted.
+ (WebCore::CSSParser::parseRegionThread): Deleted.
+ (WebCore::CSSParser::parseLineBoxContain): Deleted.
+ (WebCore::CSSParser::parseFontFeatureTag): Deleted.
+ (WebCore::CSSParser::parseFontVariantLigatures): Deleted.
+ (WebCore::isCSSLetter): Deleted.
+ (WebCore::CSSParser::markSupportsRuleHeaderEnd): Deleted.
+ (WebCore::CSSParser::syntaxError): Deleted.
+ (WebCore::CSSParser::logError): Deleted.
+ (WebCore::CSSParser::rewriteSpecifiersWithElementName): Deleted.
+ (WebCore::CSSParser::rewriteSpecifiers): Deleted.
+ (WebCore::CSSParser::invalidBlockHit): Deleted.
+ (WebCore::CSSParser::markRuleHeaderStart): Deleted.
+ (WebCore::CSSParser::setRuleHeaderEnd): Deleted.
+ (WebCore::CSSParser::markRuleHeaderEnd): Deleted.
+ (WebCore::CSSParser::markRuleBodyStart): Deleted.
+ (WebCore::cssPropertyID): Deleted.
+ (WebCore::isCSSTokenizerIdentifier): Deleted.
+ * css/CSSParser.h:
+ (WebCore::CSSParser::ValueWithCalculation::setCalculation): Deleted.
+ * css/CSSPrimitiveValue.cpp:
+ (WebCore::CSSPrimitiveValue::cloneForCSSOM):
+ * css/CSSPrimitiveValue.h:
+ * css/CSSPropertySourceData.h:
+ * css/CSSReflectValue.cpp:
+ (WebCore::CSSReflectValue::equals):
+ * css/CSSReflectValue.h:
+ (WebCore::CSSReflectValue::create):
+ (WebCore::CSSReflectValue::direction):
+ (WebCore::CSSReflectValue::offset):
+ (WebCore::CSSReflectValue::CSSReflectValue):
+ * css/CSSShadowValue.cpp:
+ (WebCore::CSSShadowValue::CSSShadowValue):
+ (WebCore::CSSShadowValue::customCSSText): Deleted.
+ * css/CSSShadowValue.h:
+ (WebCore::CSSShadowValue::create):
+ * css/CSSValue.h:
+ (WebCore::compareCSSValueVector):
+ * css/CSSVariableDependentValue.cpp:
+ (WebCore::CSSVariableDependentValue::checkVariablesForCycles):
+ * css/CSSVariableDependentValue.h:
+ (WebCore::CSSVariableDependentValue::create):
+ (WebCore::CSSVariableDependentValue::customCSSText):
+ (WebCore::CSSVariableDependentValue::valueList):
+ (WebCore::CSSVariableDependentValue::CSSVariableDependentValue):
+ * css/CSSVariableValue.cpp:
+ (WebCore::CSSVariableValue::buildParserValueListSubstitutingVariables):
+ * css/Counter.h:
+ (WebCore::Counter::create):
+ (WebCore::Counter::identifier):
+ (WebCore::Counter::listStyle):
+ (WebCore::Counter::separator):
+ (WebCore::Counter::listStyleIdent):
+ (WebCore::Counter::setIdentifier):
+ (WebCore::Counter::setListStyle):
+ (WebCore::Counter::setSeparator):
+ (WebCore::Counter::cloneForCSSOM):
+ (WebCore::Counter::Counter):
+ * css/DOMCSSNamespace.cpp:
+ (WebCore::DOMCSSNamespace::supports):
+ * css/FontFace.cpp:
+ (WebCore::FontFace::parseString):
+ (WebCore::FontFace::setVariant):
+ * css/Rect.h:
+ (WebCore::RectBase::RectBase):
+ * css/SVGCSSParser.cpp:
+ (WebCore::CSSParser::parseSVGStrokeDasharray):
+ (WebCore::CSSParser::parseSVGPaint):
+ (WebCore::CSSParser::parseSVGColor):
+ (WebCore::CSSParser::parsePaintOrder):
+ * css/StyleBuilderConverter.h:
+ (WebCore::StyleBuilderConverter::convertReflection):
+ * css/StyleProperties.cpp:
+ (WebCore::MutableStyleProperties::setProperty):
+ (WebCore::MutableStyleProperties::setCustomProperty):
+ (WebCore::MutableStyleProperties::parseDeclaration):
+ * css/StyleResolver.cpp:
+ (WebCore::StyleResolver::keyframeStylesForAnimation):
+ (WebCore::StyleResolver::cachedOrPendingFromValue):
+ * css/StyleResolver.h:
+ * css/WebKitCSSMatrix.cpp:
+ (WebCore::WebKitCSSMatrix::setMatrixValue):
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::setFont):
+ * inspector/InspectorStyleSheet.cpp:
+ (flattenSourceData):
+ (ParsedStyleSheet::setSourceData):
+ (ParsedStyleSheet::ruleSourceDataAt):
+ (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
+ * page/PageSerializer.cpp:
+ (WebCore::PageSerializer::retrieveResourcesForProperties):
+ * page/animation/CSSPropertyAnimation.cpp:
+ (WebCore::crossfadeBlend):
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::checkVariablesInCustomProperties):
+
</ins><span class="cx"> 2016-05-22 Brady Eidson <beidson@apple.com>
</span><span class="cx">
</span><span class="cx"> Move to C++14.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -6661,7 +6661,7 @@
</span><span class="cx">                 E48944A3180B57D800F165D8 /* SimpleLineLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = E48944A1180B57D800F165D8 /* SimpleLineLayout.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 E4916FF7195DF6A0005AB349 /* LayerFlushThrottleState.h in Headers */ = {isa = PBXBuildFile; fileRef = E4916FF6195DF6A0005AB349 /* LayerFlushThrottleState.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 E4946EAE156E64DD00D3297F /* StyleRuleImport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4946EAC156E64DD00D3297F /* StyleRuleImport.cpp */; };
</span><del>-                E4946EAF156E64DD00D3297F /* StyleRuleImport.h in Headers */ = {isa = PBXBuildFile; fileRef = E4946EAD156E64DD00D3297F /* StyleRuleImport.h */; };
</del><ins>+                E4946EAF156E64DD00D3297F /* StyleRuleImport.h in Headers */ = {isa = PBXBuildFile; fileRef = E4946EAD156E64DD00D3297F /* StyleRuleImport.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 E49BD9FA131FD2ED003C56F0 /* CSSValuePool.h in Headers */ = {isa = PBXBuildFile; fileRef = E49BD9F9131FD2ED003C56F0 /* CSSValuePool.h */; };
</span><span class="cx">                 E49BDA0B131FD3E5003C56F0 /* CSSValuePool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E49BDA0A131FD3E5003C56F0 /* CSSValuePool.cpp */; };
</span><span class="cx">                 E4A007831B820EC8002C5A6E /* DataURLDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = E4A007821B820EC8002C5A6E /* DataURLDecoder.h */; };
</span></span></pre></div>
<a id="trunkSourceWebCorecssBasicShapeFunctionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/BasicShapeFunctions.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/BasicShapeFunctions.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/BasicShapeFunctions.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx"> return pool.createIdentifierValue(CSSValueClosestSide);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Ref<CSSValue> valueForBasicShape(const RenderStyle& style, const BasicShape& basicShape)
</del><ins>+Ref<CSSPrimitiveValue> valueForBasicShape(const RenderStyle& style, const BasicShape& basicShape)
</ins><span class="cx"> {
</span><span class="cx"> auto& cssValuePool = CSSValuePool::singleton();
</span><span class="cx">
</span><span class="lines">@@ -136,12 +136,12 @@
</span><span class="cx"> return cssValuePool.createValue(basicShapeValue.releaseNonNull());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static Length convertToLength(const CSSToLengthConversionData& conversionData, CSSPrimitiveValue* value)
</del><ins>+static Length convertToLength(const CSSToLengthConversionData& conversionData, const CSSPrimitiveValue* value)
</ins><span class="cx"> {
</span><span class="cx"> return value->convertToLength<FixedIntegerConversion | FixedFloatConversion | PercentConversion | CalculatedConversion>(conversionData);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static LengthSize convertToLengthSize(const CSSToLengthConversionData& conversionData, CSSPrimitiveValue* value)
</del><ins>+static LengthSize convertToLengthSize(const CSSToLengthConversionData& conversionData, const CSSPrimitiveValue* value)
</ins><span class="cx"> {
</span><span class="cx"> if (!value)
</span><span class="cx"> return LengthSize(Length(0, Fixed), Length(0, Fixed));
</span><span class="lines">@@ -242,9 +242,9 @@
</span><span class="cx"> auto polygon = BasicShapePolygon::create();
</span><span class="cx">
</span><span class="cx"> polygon->setWindRule(polygonValue.windRule());
</span><del>- const Vector<RefPtr<CSSPrimitiveValue>>& values = polygonValue.values();
</del><ins>+ auto& values = polygonValue.values();
</ins><span class="cx"> for (unsigned i = 0; i < values.size(); i += 2)
</span><del>- polygon->appendPoint(convertToLength(conversionData, values.at(i).get()), convertToLength(conversionData, values.at(i + 1).get()));
</del><ins>+ polygon->appendPoint(convertToLength(conversionData, values[i].ptr()), convertToLength(conversionData, values[i + 1].ptr()));
</ins><span class="cx">
</span><span class="cx"> basicShape = WTFMove(polygon);
</span><span class="cx"> break;
</span></span></pre></div>
<a id="trunkSourceWebCorecssBasicShapeFunctionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/BasicShapeFunctions.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/BasicShapeFunctions.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/BasicShapeFunctions.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -37,10 +37,10 @@
</span><span class="cx"> class BasicShapeCenterCoordinate;
</span><span class="cx"> class CSSBasicShape;
</span><span class="cx"> class CSSToLengthConversionData;
</span><del>-class CSSValue;
</del><ins>+class CSSPrimitiveValue;
</ins><span class="cx"> class RenderStyle;
</span><span class="cx">
</span><del>-Ref<CSSValue> valueForBasicShape(const RenderStyle&, const BasicShape&);
</del><ins>+Ref<CSSPrimitiveValue> valueForBasicShape(const RenderStyle&, const BasicShape&);
</ins><span class="cx"> Ref<BasicShape> basicShapeForValue(const CSSToLengthConversionData&, const CSSBasicShape&);
</span><span class="cx"> float floatValueForCenterCoordinate(const BasicShapeCenterCoordinate&, float);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSBasicShapescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSBasicShapes.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSBasicShapes.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSBasicShapes.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -286,8 +286,8 @@
</span><span class="cx"> Vector<String> points;
</span><span class="cx"> points.reserveInitialCapacity(m_values.size());
</span><span class="cx">
</span><del>- for (size_t i = 0; i < m_values.size(); ++i)
- points.append(m_values.at(i)->cssText());
</del><ins>+ for (auto& shapeValue : m_values)
+ points.uncheckedAppend(shapeValue->cssText());
</ins><span class="cx">
</span><span class="cx"> return buildPolygonString(m_windRule, points);
</span><span class="cx"> }
</span><span class="lines">@@ -297,8 +297,7 @@
</span><span class="cx"> if (!is<CSSBasicShapePolygon>(shape))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- const CSSBasicShapePolygon& rhs = downcast<CSSBasicShapePolygon>(shape);
- return compareCSSValueVector<CSSPrimitiveValue>(m_values, rhs.m_values);
</del><ins>+ return compareCSSValueVector<CSSPrimitiveValue>(m_values, downcast<CSSBasicShapePolygon>(shape).m_values);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static bool buildInsetRadii(Vector<String>& radii, const String& topLeftRadius, const String& topRightRadius, const String& bottomRightRadius, const String& bottomLeftRadius)
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSBasicShapesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSBasicShapes.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSBasicShapes.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSBasicShapes.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -76,32 +76,32 @@
</span><span class="cx"> CSSPrimitiveValue* bottomRightRadius() const { return m_bottomRightRadius.get(); }
</span><span class="cx"> CSSPrimitiveValue* bottomLeftRadius() const { return m_bottomLeftRadius.get(); }
</span><span class="cx">
</span><del>- void setTop(RefPtr<CSSPrimitiveValue>&& top) { m_top = WTFMove(top); }
- void setRight(RefPtr<CSSPrimitiveValue>&& right) { m_right = WTFMove(right); }
- void setBottom(RefPtr<CSSPrimitiveValue>&& bottom) { m_bottom = WTFMove(bottom); }
- void setLeft(RefPtr<CSSPrimitiveValue>&& left) { m_left = WTFMove(left); }
</del><ins>+ void setTop(Ref<CSSPrimitiveValue>&& top) { m_top = WTFMove(top); }
+ void setRight(Ref<CSSPrimitiveValue>&& right) { m_right = WTFMove(right); }
+ void setBottom(Ref<CSSPrimitiveValue>&& bottom) { m_bottom = WTFMove(bottom); }
+ void setLeft(Ref<CSSPrimitiveValue>&& left) { m_left = WTFMove(left); }
</ins><span class="cx">
</span><del>- void updateShapeSize4Values(CSSPrimitiveValue* top, CSSPrimitiveValue* right, CSSPrimitiveValue* bottom, CSSPrimitiveValue* left)
</del><ins>+ void updateShapeSize4Values(Ref<CSSPrimitiveValue>&& top, Ref<CSSPrimitiveValue>&& right, Ref<CSSPrimitiveValue>&& bottom, Ref<CSSPrimitiveValue>&& left)
</ins><span class="cx"> {
</span><del>- setTop(top);
- setRight(right);
- setBottom(bottom);
- setLeft(left);
</del><ins>+ setTop(WTFMove(top));
+ setRight(WTFMove(right));
+ setBottom(WTFMove(bottom));
+ setLeft(WTFMove(left));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- void updateShapeSize1Value(CSSPrimitiveValue* value1)
</del><ins>+ void updateShapeSize1Value(Ref<CSSPrimitiveValue>&& value1)
</ins><span class="cx"> {
</span><del>- updateShapeSize4Values(value1, value1, value1, value1);
</del><ins>+ updateShapeSize4Values(value1.copyRef(), value1.copyRef(), value1.copyRef(), WTFMove(value1));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- void updateShapeSize2Values(CSSPrimitiveValue* value1, CSSPrimitiveValue* value2)
</del><ins>+ void updateShapeSize2Values(Ref<CSSPrimitiveValue>&& value1, Ref<CSSPrimitiveValue>&& value2)
</ins><span class="cx"> {
</span><del>- updateShapeSize4Values(value1, value2, value1, value2);
</del><ins>+ updateShapeSize4Values(value1.copyRef(), value2.copyRef(), WTFMove(value1), WTFMove(value2));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- void updateShapeSize3Values(CSSPrimitiveValue* value1, CSSPrimitiveValue* value2, CSSPrimitiveValue* value3)
</del><ins>+ void updateShapeSize3Values(Ref<CSSPrimitiveValue>&& value1, Ref<CSSPrimitiveValue>&& value2, Ref<CSSPrimitiveValue>&& value3)
</ins><span class="cx"> {
</span><del>- updateShapeSize4Values(value1, value2, value3, value2);
</del><ins>+ updateShapeSize4Values(WTFMove(value1), value2.copyRef(), WTFMove(value3), WTFMove(value2));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void setTopLeftRadius(RefPtr<CSSPrimitiveValue>&& radius) { m_topLeftRadius = WTFMove(radius); }
</span><span class="lines">@@ -135,9 +135,9 @@
</span><span class="cx"> CSSPrimitiveValue* centerY() const { return m_centerY.get(); }
</span><span class="cx"> CSSPrimitiveValue* radius() const { return m_radius.get(); }
</span><span class="cx">
</span><del>- void setCenterX(RefPtr<CSSPrimitiveValue>&& centerX) { m_centerX = WTFMove(centerX); }
- void setCenterY(RefPtr<CSSPrimitiveValue>&& centerY) { m_centerY = WTFMove(centerY); }
- void setRadius(RefPtr<CSSPrimitiveValue>&& radius) { m_radius = WTFMove(radius); }
</del><ins>+ void setCenterX(Ref<CSSPrimitiveValue>&& centerX) { m_centerX = WTFMove(centerX); }
+ void setCenterY(Ref<CSSPrimitiveValue>&& centerY) { m_centerY = WTFMove(centerY); }
+ void setRadius(Ref<CSSPrimitiveValue>&& radius) { m_radius = WTFMove(radius); }
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> CSSBasicShapeCircle() { }
</span><span class="lines">@@ -160,10 +160,10 @@
</span><span class="cx"> CSSPrimitiveValue* radiusX() const { return m_radiusX.get(); }
</span><span class="cx"> CSSPrimitiveValue* radiusY() const { return m_radiusY.get(); }
</span><span class="cx">
</span><del>- void setCenterX(PassRefPtr<CSSPrimitiveValue> centerX) { m_centerX = centerX; }
- void setCenterY(PassRefPtr<CSSPrimitiveValue> centerY) { m_centerY = centerY; }
- void setRadiusX(PassRefPtr<CSSPrimitiveValue> radiusX) { m_radiusX = radiusX; }
- void setRadiusY(PassRefPtr<CSSPrimitiveValue> radiusY) { m_radiusY = radiusY; }
</del><ins>+ void setCenterX(Ref<CSSPrimitiveValue>&& centerX) { m_centerX = WTFMove(centerX); }
+ void setCenterY(Ref<CSSPrimitiveValue>&& centerY) { m_centerY = WTFMove(centerY); }
+ void setRadiusX(Ref<CSSPrimitiveValue>&& radiusX) { m_radiusX = WTFMove(radiusX); }
+ void setRadiusY(Ref<CSSPrimitiveValue>&& radiusY) { m_radiusY = WTFMove(radiusY); }
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> CSSBasicShapeEllipse() { }
</span><span class="lines">@@ -182,15 +182,13 @@
</span><span class="cx"> public:
</span><span class="cx"> static Ref<CSSBasicShapePolygon> create() { return adoptRef(*new CSSBasicShapePolygon); }
</span><span class="cx">
</span><del>- void appendPoint(PassRefPtr<CSSPrimitiveValue> x, PassRefPtr<CSSPrimitiveValue> y)
</del><ins>+ void appendPoint(Ref<CSSPrimitiveValue>&& x, Ref<CSSPrimitiveValue>&& y)
</ins><span class="cx"> {
</span><del>- m_values.append(x);
- m_values.append(y);
</del><ins>+ m_values.append(WTFMove(x));
+ m_values.append(WTFMove(y));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- RefPtr<CSSPrimitiveValue> getXAt(unsigned i) const { return m_values.at(i * 2); }
- RefPtr<CSSPrimitiveValue> getYAt(unsigned i) const { return m_values.at(i * 2 + 1); }
- const Vector<RefPtr<CSSPrimitiveValue>>& values() const { return m_values; }
</del><ins>+ const Vector<Ref<CSSPrimitiveValue>>& values() const { return m_values; }
</ins><span class="cx">
</span><span class="cx"> void setWindRule(WindRule rule) { m_windRule = rule; }
</span><span class="cx"> WindRule windRule() const { return m_windRule; }
</span><span class="lines">@@ -205,7 +203,7 @@
</span><span class="cx"> String cssText() const override;
</span><span class="cx"> bool equals(const CSSBasicShape&) const override;
</span><span class="cx">
</span><del>- Vector<RefPtr<CSSPrimitiveValue>> m_values;
</del><ins>+ Vector<Ref<CSSPrimitiveValue>> m_values;
</ins><span class="cx"> WindRule m_windRule;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -683,7 +683,7 @@
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return CSSReflectValue::create(direction.release(), offset.release(), valueForNinePieceImage(reflection->mask()));
</del><ins>+ return CSSReflectValue::create(direction.releaseNonNull(), offset.releaseNonNull(), valueForNinePieceImage(reflection->mask()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static Ref<CSSValueList> createPositionListForLayer(CSSPropertyID propertyID, const FillLayer* layer, const RenderStyle& style)
</span><span class="lines">@@ -907,13 +907,13 @@
</span><span class="cx">
</span><span class="cx"> auto list = CSSValueList::createCommaSeparated();
</span><span class="cx"> for (const ShadowData* currShadowData = shadow; currShadowData; currShadowData = currShadowData->next()) {
</span><del>- RefPtr<CSSPrimitiveValue> x = adjustLengthForZoom(currShadowData->x(), style, adjust);
- RefPtr<CSSPrimitiveValue> y = adjustLengthForZoom(currShadowData->y(), style, adjust);
- RefPtr<CSSPrimitiveValue> blur = adjustLengthForZoom(currShadowData->radius(), style, adjust);
- RefPtr<CSSPrimitiveValue> spread = propertyID == CSSPropertyTextShadow ? PassRefPtr<CSSPrimitiveValue>() : adjustLengthForZoom(currShadowData->spread(), style, adjust);
- RefPtr<CSSPrimitiveValue> style = propertyID == CSSPropertyTextShadow || currShadowData->style() == Normal ? PassRefPtr<CSSPrimitiveValue>() : cssValuePool.createIdentifierValue(CSSValueInset);
- RefPtr<CSSPrimitiveValue> color = cssValuePool.createColorValue(currShadowData->color().rgb());
- list.get().prepend(CSSShadowValue::create(x.release(), y.release(), blur.release(), spread.release(), style.release(), color.release()));
</del><ins>+ auto x = adjustLengthForZoom(currShadowData->x(), style, adjust);
+ auto y = adjustLengthForZoom(currShadowData->y(), style, adjust);
+ auto blur = adjustLengthForZoom(currShadowData->radius(), style, adjust);
+ auto spread = propertyID == CSSPropertyTextShadow ? RefPtr<CSSPrimitiveValue>() : adjustLengthForZoom(currShadowData->spread(), style, adjust);
+ auto style = propertyID == CSSPropertyTextShadow || currShadowData->style() == Normal ? RefPtr<CSSPrimitiveValue>() : cssValuePool.createIdentifierValue(CSSValueInset);
+ auto color = cssValuePool.createColorValue(currShadowData->color().rgb());
+ list->prepend(CSSShadowValue::create(WTFMove(x), WTFMove(y), WTFMove(blur), WTFMove(spread), WTFMove(style), WTFMove(color)));
</ins><span class="cx"> }
</span><span class="cx"> return WTFMove(list);
</span><span class="cx"> }
</span><span class="lines">@@ -1029,10 +1029,10 @@
</span><span class="cx"> return specifiedValueForGridTrackBreadth(trackSize.length(), style);
</span><span class="cx"> default:
</span><span class="cx"> ASSERT(trackSize.type() == MinMaxTrackSizing);
</span><del>- RefPtr<CSSValueList> minMaxTrackBreadths = CSSValueList::createCommaSeparated();
</del><ins>+ auto minMaxTrackBreadths = CSSValueList::createCommaSeparated();
</ins><span class="cx"> minMaxTrackBreadths->append(specifiedValueForGridTrackBreadth(trackSize.minTrackBreadth(), style));
</span><span class="cx"> minMaxTrackBreadths->append(specifiedValueForGridTrackBreadth(trackSize.maxTrackBreadth(), style));
</span><del>- return CSSFunctionValue::create("minmax(", minMaxTrackBreadths);
</del><ins>+ return CSSFunctionValue::create("minmax(", WTFMove(minMaxTrackBreadths));
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSCrossfadeValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSCrossfadeValue.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSCrossfadeValue.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSCrossfadeValue.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> return blend(from, to, progress);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static bool subimageKnownToBeOpaque(CSSValue& value, const RenderElement* renderer)
</del><ins>+static bool subimageKnownToBeOpaque(const CSSValue& value, const RenderElement* renderer)
</ins><span class="cx"> {
</span><span class="cx"> if (is<CSSImageValue>(value))
</span><span class="cx"> return downcast<CSSImageValue>(value).knownToBeOpaque(renderer);
</span><span class="lines">@@ -92,8 +92,8 @@
</span><span class="cx"> ResourceLoaderOptions options = CachedResourceLoader::defaultCachedResourceOptions();
</span><span class="cx">
</span><span class="cx"> CachedResourceLoader& cachedResourceLoader = renderer->document().cachedResourceLoader();
</span><del>- CachedImage* cachedFromImage = cachedImageForCSSValue(m_fromValue.get(), cachedResourceLoader, options);
- CachedImage* cachedToImage = cachedImageForCSSValue(m_toValue.get(), cachedResourceLoader, options);
</del><ins>+ CachedImage* cachedFromImage = cachedImageForCSSValue(m_fromValue, cachedResourceLoader, options);
+ CachedImage* cachedToImage = cachedImageForCSSValue(m_toValue, cachedResourceLoader, options);
</ins><span class="cx">
</span><span class="cx"> if (!cachedFromImage || !cachedToImage)
</span><span class="cx"> return FloatSize();
</span><span class="lines">@@ -110,15 +110,15 @@
</span><span class="cx"> fromImageSize.height() * inversePercentage + toImageSize.height() * percentage);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool CSSCrossfadeValue::isPending() const
</del><ins>+bool CSSCrossfadeValue::isPending()
</ins><span class="cx"> {
</span><del>- return CSSImageGeneratorValue::subimageIsPending(m_fromValue.get())
- || CSSImageGeneratorValue::subimageIsPending(m_toValue.get());
</del><ins>+ return CSSImageGeneratorValue::subimageIsPending(m_fromValue)
+ || CSSImageGeneratorValue::subimageIsPending(m_toValue);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSCrossfadeValue::knownToBeOpaque(const RenderElement* renderer) const
</span><span class="cx"> {
</span><del>- return subimageKnownToBeOpaque(*m_fromValue, renderer) && subimageKnownToBeOpaque(*m_toValue, renderer);
</del><ins>+ return subimageKnownToBeOpaque(m_fromValue, renderer) && subimageKnownToBeOpaque(m_toValue, renderer);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSCrossfadeValue::loadSubimages(CachedResourceLoader& cachedResourceLoader, const ResourceLoaderOptions& options)
</span><span class="lines">@@ -126,8 +126,8 @@
</span><span class="cx"> CachedResourceHandle<CachedImage> oldCachedFromImage = m_cachedFromImage;
</span><span class="cx"> CachedResourceHandle<CachedImage> oldCachedToImage = m_cachedToImage;
</span><span class="cx">
</span><del>- m_cachedFromImage = CSSImageGeneratorValue::cachedImageForCSSValue(m_fromValue.get(), cachedResourceLoader, options);
- m_cachedToImage = CSSImageGeneratorValue::cachedImageForCSSValue(m_toValue.get(), cachedResourceLoader, options);
</del><ins>+ m_cachedFromImage = CSSImageGeneratorValue::cachedImageForCSSValue(m_fromValue, cachedResourceLoader, options);
+ m_cachedToImage = CSSImageGeneratorValue::cachedImageForCSSValue(m_toValue, cachedResourceLoader, options);
</ins><span class="cx">
</span><span class="cx"> if (m_cachedFromImage != oldCachedFromImage) {
</span><span class="cx"> if (oldCachedFromImage)
</span><span class="lines">@@ -156,8 +156,8 @@
</span><span class="cx"> ResourceLoaderOptions options = CachedResourceLoader::defaultCachedResourceOptions();
</span><span class="cx">
</span><span class="cx"> CachedResourceLoader& cachedResourceLoader = renderer->document().cachedResourceLoader();
</span><del>- CachedImage* cachedFromImage = cachedImageForCSSValue(m_fromValue.get(), cachedResourceLoader, options);
- CachedImage* cachedToImage = cachedImageForCSSValue(m_toValue.get(), cachedResourceLoader, options);
</del><ins>+ CachedImage* cachedFromImage = cachedImageForCSSValue(m_fromValue, cachedResourceLoader, options);
+ CachedImage* cachedToImage = cachedImageForCSSValue(m_toValue, cachedResourceLoader, options);
</ins><span class="cx">
</span><span class="cx"> if (!cachedFromImage || !cachedToImage)
</span><span class="cx"> return Image::nullImage();
</span><span class="lines">@@ -205,29 +205,26 @@
</span><span class="cx"> auto fromImageValue = CSSImageValue::create(m_cachedFromImage->url(), fromStyledImage.get());
</span><span class="cx"> auto toImageValue = CSSImageValue::create(m_cachedToImage->url(), toStyledImage.get());
</span><span class="cx">
</span><del>- RefPtr<CSSCrossfadeValue> crossfadeValue = CSSCrossfadeValue::create(WTFMove(fromImageValue), WTFMove(toImageValue), from.isPrefixed() && isPrefixed());
-
</del><span class="cx"> double fromPercentage = from.m_percentageValue->getDoubleValue();
</span><span class="cx"> if (from.m_percentageValue->isPercentage())
</span><span class="cx"> fromPercentage /= 100.0;
</span><span class="cx"> double toPercentage = m_percentageValue->getDoubleValue();
</span><span class="cx"> if (m_percentageValue->isPercentage())
</span><span class="cx"> toPercentage /= 100.0;
</span><del>- crossfadeValue->setPercentage(CSSPrimitiveValue::create(blendFunc(fromPercentage, toPercentage, progress), CSSPrimitiveValue::CSS_NUMBER));
- return crossfadeValue;
</del><ins>+ auto percentageValue = CSSPrimitiveValue::create(blendFunc(fromPercentage, toPercentage, progress), CSSPrimitiveValue::CSS_NUMBER);
+
+ return CSSCrossfadeValue::create(WTFMove(fromImageValue), WTFMove(toImageValue), WTFMove(percentageValue), from.isPrefixed() && isPrefixed());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSCrossfadeValue::equals(const CSSCrossfadeValue& other) const
</span><span class="cx"> {
</span><del>- return equalInputImages(other)
- && compareCSSValuePtr(m_percentageValue, other.m_percentageValue);
</del><ins>+ return equalInputImages(other) && compareCSSValue(m_percentageValue, other.m_percentageValue);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> bool CSSCrossfadeValue::equalInputImages(const CSSCrossfadeValue& other) const
</span><span class="cx"> {
</span><del>- return compareCSSValuePtr(m_fromValue, other.m_fromValue)
- && compareCSSValuePtr(m_toValue, other.m_toValue);
</del><ins>+ return compareCSSValue(m_fromValue, other.m_fromValue) && compareCSSValue(m_toValue, other.m_toValue);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSCrossfadeValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSCrossfadeValue.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSCrossfadeValue.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSCrossfadeValue.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -43,9 +43,9 @@
</span><span class="cx"> class CSSCrossfadeValue : public CSSImageGeneratorValue {
</span><span class="cx"> friend class CrossfadeSubimageObserverProxy;
</span><span class="cx"> public:
</span><del>- static Ref<CSSCrossfadeValue> create(PassRefPtr<CSSValue> fromValue, PassRefPtr<CSSValue> toValue, bool prefixed = false)
</del><ins>+ static Ref<CSSCrossfadeValue> create(Ref<CSSValue>&& fromValue, Ref<CSSValue>&& toValue, Ref<CSSPrimitiveValue>&& percentageValue, bool prefixed = false)
</ins><span class="cx"> {
</span><del>- return adoptRef(*new CSSCrossfadeValue(fromValue, toValue, prefixed));
</del><ins>+ return adoptRef(*new CSSCrossfadeValue(WTFMove(fromValue), WTFMove(toValue), WTFMove(percentageValue), prefixed));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ~CSSCrossfadeValue();
</span><span class="lines">@@ -57,13 +57,11 @@
</span><span class="cx"> FloatSize fixedSize(const RenderElement*);
</span><span class="cx">
</span><span class="cx"> bool isPrefixed() const { return m_isPrefixed; }
</span><del>- bool isPending() const;
</del><ins>+ bool isPending();
</ins><span class="cx"> bool knownToBeOpaque(const RenderElement*) const;
</span><span class="cx">
</span><span class="cx"> void loadSubimages(CachedResourceLoader&, const ResourceLoaderOptions&);
</span><span class="cx">
</span><del>- void setPercentage(PassRefPtr<CSSPrimitiveValue> percentageValue) { m_percentageValue = percentageValue; }
-
</del><span class="cx"> bool traverseSubresources(const std::function<bool (const CachedResource&)>& handler) const;
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSCrossfadeValue> blend(const CSSCrossfadeValue&, double) const;
</span><span class="lines">@@ -73,10 +71,11 @@
</span><span class="cx"> bool equalInputImages(const CSSCrossfadeValue&) const;
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- CSSCrossfadeValue(PassRefPtr<CSSValue> fromValue, PassRefPtr<CSSValue> toValue, bool prefixed)
</del><ins>+ CSSCrossfadeValue(Ref<CSSValue>&& fromValue, Ref<CSSValue>&& toValue, Ref<CSSPrimitiveValue>&& percentageValue, bool prefixed)
</ins><span class="cx"> : CSSImageGeneratorValue(CrossfadeClass)
</span><del>- , m_fromValue(fromValue)
- , m_toValue(toValue)
</del><ins>+ , m_fromValue(WTFMove(fromValue))
+ , m_toValue(WTFMove(toValue))
+ , m_percentageValue(WTFMove(percentageValue))
</ins><span class="cx"> , m_crossfadeSubimageObserver(this)
</span><span class="cx"> , m_isPrefixed(prefixed)
</span><span class="cx"> {
</span><span class="lines">@@ -100,9 +99,9 @@
</span><span class="cx">
</span><span class="cx"> void crossfadeChanged(const IntRect&);
</span><span class="cx">
</span><del>- RefPtr<CSSValue> m_fromValue;
- RefPtr<CSSValue> m_toValue;
- RefPtr<CSSPrimitiveValue> m_percentageValue;
</del><ins>+ Ref<CSSValue> m_fromValue;
+ Ref<CSSValue> m_toValue;
+ Ref<CSSPrimitiveValue> m_percentageValue;
</ins><span class="cx">
</span><span class="cx"> CachedResourceHandle<CachedImage> m_cachedFromImage;
</span><span class="cx"> CachedResourceHandle<CachedImage> m_cachedToImage;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSCustomPropertyValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSCustomPropertyValue.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSCustomPropertyValue.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSCustomPropertyValue.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -34,9 +34,9 @@
</span><span class="cx">
</span><span class="cx"> class CSSCustomPropertyValue : public CSSValue {
</span><span class="cx"> public:
</span><del>- static Ref<CSSCustomPropertyValue> create(const AtomicString& name, RefPtr<CSSValue>& value)
</del><ins>+ static Ref<CSSCustomPropertyValue> create(const AtomicString& name, Ref<CSSValue>&& value)
</ins><span class="cx"> {
</span><del>- return adoptRef(*new CSSCustomPropertyValue(name, value));
</del><ins>+ return adoptRef(*new CSSCustomPropertyValue(name, WTFMove(value)));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static Ref<CSSCustomPropertyValue> createInvalid()
</span><span class="lines">@@ -65,12 +65,12 @@
</span><span class="cx"> const RefPtr<CSSValue> value() const { return m_value.get(); }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- CSSCustomPropertyValue(const AtomicString& name, RefPtr<CSSValue>& value)
</del><ins>+ CSSCustomPropertyValue(const AtomicString& name, Ref<CSSValue>&& value)
</ins><span class="cx"> : CSSValue(CustomPropertyClass)
</span><span class="cx"> , m_name(name)
</span><del>- , m_value(value)
- , m_containsVariables(value && value->isVariableDependentValue())
- , m_serialized(!value)
</del><ins>+ , m_value(WTFMove(value))
+ , m_containsVariables(m_value->isVariableDependentValue())
+ , m_serialized(false)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFilterImageValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFilterImageValue.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFilterImageValue.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSFilterImageValue.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx"> ResourceLoaderOptions options = CachedResourceLoader::defaultCachedResourceOptions();
</span><span class="cx">
</span><span class="cx"> CachedResourceLoader& cachedResourceLoader = renderer->document().cachedResourceLoader();
</span><del>- CachedImage* cachedImage = cachedImageForCSSValue(m_imageValue.get(), cachedResourceLoader, options);
</del><ins>+ CachedImage* cachedImage = cachedImageForCSSValue(m_imageValue, cachedResourceLoader, options);
</ins><span class="cx">
</span><span class="cx"> if (!cachedImage)
</span><span class="cx"> return FloatSize();
</span><span class="lines">@@ -73,9 +73,9 @@
</span><span class="cx"> return cachedImage->imageForRenderer(renderer)->size();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool CSSFilterImageValue::isPending() const
</del><ins>+bool CSSFilterImageValue::isPending()
</ins><span class="cx"> {
</span><del>- return CSSImageGeneratorValue::subimageIsPending(m_imageValue.get());
</del><ins>+ return CSSImageGeneratorValue::subimageIsPending(m_imageValue);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSFilterImageValue::knownToBeOpaque(const RenderElement*) const
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx"> {
</span><span class="cx"> CachedResourceHandle<CachedImage> oldCachedImage = m_cachedImage;
</span><span class="cx">
</span><del>- m_cachedImage = CSSImageGeneratorValue::cachedImageForCSSValue(m_imageValue.get(), cachedResourceLoader, options);
</del><ins>+ m_cachedImage = CSSImageGeneratorValue::cachedImageForCSSValue(m_imageValue, cachedResourceLoader, options);
</ins><span class="cx">
</span><span class="cx"> if (m_cachedImage != oldCachedImage) {
</span><span class="cx"> if (oldCachedImage)
</span><span class="lines">@@ -109,7 +109,7 @@
</span><span class="cx"> ResourceLoaderOptions options = CachedResourceLoader::defaultCachedResourceOptions();
</span><span class="cx">
</span><span class="cx"> CachedResourceLoader& cachedResourceLoader = renderer->document().cachedResourceLoader();
</span><del>- CachedImage* cachedImage = cachedImageForCSSValue(m_imageValue.get(), cachedResourceLoader, options);
</del><ins>+ CachedImage* cachedImage = cachedImageForCSSValue(m_imageValue, cachedResourceLoader, options);
</ins><span class="cx">
</span><span class="cx"> if (!cachedImage)
</span><span class="cx"> return Image::nullImage();
</span><span class="lines">@@ -148,8 +148,7 @@
</span><span class="cx"> void CSSFilterImageValue::createFilterOperations(StyleResolver* resolver)
</span><span class="cx"> {
</span><span class="cx"> m_filterOperations.clear();
</span><del>- if (m_filterValue)
- resolver->createFilterOperations(*m_filterValue, m_filterOperations);
</del><ins>+ resolver->createFilterOperations(m_filterValue, m_filterOperations);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSFilterImageValue::FilterSubimageObserverProxy::imageChanged(CachedImage*, const IntRect* rect)
</span><span class="lines">@@ -167,12 +166,12 @@
</span><span class="cx">
</span><span class="cx"> bool CSSFilterImageValue::equals(const CSSFilterImageValue& other) const
</span><span class="cx"> {
</span><del>- return equalInputImages(other) && compareCSSValuePtr(m_filterValue, other.m_filterValue);
</del><ins>+ return equalInputImages(other) && compareCSSValue(m_filterValue, other.m_filterValue);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSFilterImageValue::equalInputImages(const CSSFilterImageValue& other) const
</span><span class="cx"> {
</span><del>- return compareCSSValuePtr(m_imageValue, other.m_imageValue);
</del><ins>+ return compareCSSValue(m_imageValue, other.m_imageValue);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFilterImageValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFilterImageValue.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFilterImageValue.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSFilterImageValue.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx"> bool isFixedSize() const { return true; }
</span><span class="cx"> FloatSize fixedSize(const RenderElement*);
</span><span class="cx">
</span><del>- bool isPending() const;
</del><ins>+ bool isPending();
</ins><span class="cx"> bool knownToBeOpaque(const RenderElement*) const;
</span><span class="cx">
</span><span class="cx"> void loadSubimages(CachedResourceLoader&, const ResourceLoaderOptions&);
</span><span class="lines">@@ -80,10 +80,10 @@
</span><span class="cx"> CachedImage* cachedImage() const { return m_cachedImage.get(); }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- CSSFilterImageValue(PassRefPtr<CSSValue> imageValue, PassRefPtr<CSSValue> filterValue)
</del><ins>+ CSSFilterImageValue(Ref<CSSValue>&& imageValue, Ref<CSSValue>&& filterValue)
</ins><span class="cx"> : CSSImageGeneratorValue(FilterImageClass)
</span><del>- , m_imageValue(imageValue)
- , m_filterValue(filterValue)
</del><ins>+ , m_imageValue(WTFMove(imageValue))
+ , m_filterValue(WTFMove(filterValue))
</ins><span class="cx"> , m_filterSubimageObserver(this)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -106,8 +106,8 @@
</span><span class="cx">
</span><span class="cx"> void filterImageChanged(const IntRect&);
</span><span class="cx">
</span><del>- RefPtr<CSSValue> m_imageValue;
- RefPtr<CSSValue> m_filterValue;
</del><ins>+ Ref<CSSValue> m_imageValue;
+ Ref<CSSValue> m_filterValue;
</ins><span class="cx">
</span><span class="cx"> FilterOperations m_filterOperations;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceSetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFaceSet.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFaceSet.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSFontFaceSet.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -280,8 +280,8 @@
</span><span class="cx"> Vector<std::reference_wrapper<CSSFontFace>> CSSFontFaceSet::matchingFaces(const String& font, const String&, ExceptionCode& ec)
</span><span class="cx"> {
</span><span class="cx"> Vector<std::reference_wrapper<CSSFontFace>> result;
</span><del>- Ref<MutableStyleProperties> style = MutableStyleProperties::create();
- auto parseResult = CSSParser::parseValue(style.ptr(), CSSPropertyFont, font, true, CSSStrictMode, nullptr);
</del><ins>+ auto style = MutableStyleProperties::create();
+ auto parseResult = CSSParser::parseValue(style, CSSPropertyFont, font, true, CSSStrictMode, nullptr);
</ins><span class="cx"> if (parseResult == CSSParser::ParseResult::Error) {
</span><span class="cx"> ec = SYNTAX_ERR;
</span><span class="cx"> return result;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFunctionValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFunctionValue.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFunctionValue.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSFunctionValue.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -35,15 +35,14 @@
</span><span class="cx"> CSSFunctionValue::CSSFunctionValue(CSSParserFunction* function)
</span><span class="cx"> : CSSValue(FunctionClass)
</span><span class="cx"> , m_name(function->name)
</span><ins>+ , m_args(function->args ? RefPtr<CSSValueList>(CSSValueList::createFromParserValueList(*function->args)) : nullptr)
</ins><span class="cx"> {
</span><del>- if (function->args)
- m_args = CSSValueList::createFromParserValueList(*function->args);
</del><span class="cx"> }
</span><span class="cx">
</span><del>-CSSFunctionValue::CSSFunctionValue(const String& name, PassRefPtr<CSSValueList> args)
</del><ins>+CSSFunctionValue::CSSFunctionValue(const String& name, Ref<CSSValueList>&& args)
</ins><span class="cx"> : CSSValue(FunctionClass)
</span><span class="cx"> , m_name(name)
</span><del>- , m_args(args)
</del><ins>+ , m_args(WTFMove(args))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFunctionValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFunctionValue.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFunctionValue.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSFunctionValue.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -40,9 +40,9 @@
</span><span class="cx"> return adoptRef(*new CSSFunctionValue(function));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- static Ref<CSSFunctionValue> create(const String& name, PassRefPtr<CSSValueList> args)
</del><ins>+ static Ref<CSSFunctionValue> create(const String& name, Ref<CSSValueList>&& args)
</ins><span class="cx"> {
</span><del>- return adoptRef(*new CSSFunctionValue(name, args));
</del><ins>+ return adoptRef(*new CSSFunctionValue(name, WTFMove(args)));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String customCSSText() const;
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> explicit CSSFunctionValue(CSSParserFunction*);
</span><del>- CSSFunctionValue(const String&, PassRefPtr<CSSValueList>);
</del><ins>+ CSSFunctionValue(const String&, Ref<CSSValueList>&&);
</ins><span class="cx">
</span><span class="cx"> String m_name;
</span><span class="cx"> RefPtr<CSSValueList> m_args;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGradientValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGradientValue.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGradientValue.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSGradientValue.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -138,7 +138,7 @@
</span><span class="cx"> return adoptRef(*new CSSLinearGradientValue(repeat, gradientType));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- void setAngle(RefPtr<CSSPrimitiveValue>&& val) { m_angle = WTFMove(val); }
</del><ins>+ void setAngle(Ref<CSSPrimitiveValue>&& val) { m_angle = WTFMove(val); }
</ins><span class="cx">
</span><span class="cx"> String customCSSText() const;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGrammaryin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGrammar.y.in (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGrammar.y.in        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSGrammar.y.in        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -662,14 +662,14 @@
</span><span class="cx"> media_query {
</span><span class="cx"> $$ = &MediaQuerySet::create().leakRef();
</span><span class="cx"> $$->addMediaQuery(std::unique_ptr<MediaQuery>($1));
</span><del>- parser->updateLastMediaLine($$);
</del><ins>+ parser->updateLastMediaLine(*$$);
</ins><span class="cx"> }
</span><span class="cx"> | media_list ',' maybe_space media_query {
</span><span class="cx"> $$ = $1;
</span><span class="cx"> std::unique_ptr<MediaQuery> mediaQuery($4);
</span><span class="cx"> if ($$) {
</span><span class="cx"> $$->addMediaQuery(WTFMove(mediaQuery));
</span><del>- parser->updateLastMediaLine($$);
</del><ins>+ parser->updateLastMediaLine(*$$);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> | media_list error {
</span><span class="lines">@@ -699,10 +699,10 @@
</span><span class="cx">
</span><span class="cx"> media:
</span><span class="cx"> before_media_rule MEDIA_SYM maybe_space media_list at_rule_header_end '{' at_rule_body_start maybe_space block_rule_list save_block {
</span><del>- $$ = parser->createMediaRule(adoptRef($4), std::unique_ptr<Vector<RefPtr<StyleRuleBase>>>($9).get()).leakRef();
</del><ins>+ $$ = &parser->createMediaRule(adoptRef($4), std::unique_ptr<Vector<RefPtr<StyleRuleBase>>>($9).get()).leakRef();
</ins><span class="cx"> }
</span><span class="cx"> | before_media_rule MEDIA_SYM at_rule_header_end_maybe_space '{' at_rule_body_start maybe_space block_rule_list save_block {
</span><del>- $$ = parser->createEmptyMediaRule(std::unique_ptr<Vector<RefPtr<StyleRuleBase>>>($7).get()).leakRef();
</del><ins>+ $$ = &parser->createEmptyMediaRule(std::unique_ptr<Vector<RefPtr<StyleRuleBase>>>($7).get()).leakRef();
</ins><span class="cx"> }
</span><span class="cx"> | before_media_rule MEDIA_SYM at_rule_header_end_maybe_space ';' {
</span><span class="cx"> $$ = nullptr;
</span><span class="lines">@@ -712,7 +712,7 @@
</span><span class="cx">
</span><span class="cx"> supports:
</span><span class="cx"> before_supports_rule SUPPORTS_SYM maybe_space supports_condition at_supports_rule_header_end '{' at_rule_body_start maybe_space block_rule_list save_block {
</span><del>- $$ = parser->createSupportsRule($4, std::unique_ptr<Vector<RefPtr<StyleRuleBase>>>($9).get()).leakRef();
</del><ins>+ $$ = &parser->createSupportsRule($4, std::unique_ptr<Vector<RefPtr<StyleRuleBase>>>($9).get()).leakRef();
</ins><span class="cx"> }
</span><span class="cx"> | before_supports_rule SUPPORTS_SYM supports_error {
</span><span class="cx"> $$ = nullptr;
</span><span class="lines">@@ -806,7 +806,7 @@
</span><span class="cx">
</span><span class="cx"> keyframes:
</span><span class="cx"> before_keyframes_rule KEYFRAMES_SYM maybe_space keyframe_name at_rule_header_end_maybe_space '{' at_rule_body_start maybe_space keyframes_rule closing_brace {
</span><del>- $$ = parser->createKeyframesRule($4, std::unique_ptr<Vector<RefPtr<StyleKeyframe>>>($9)).leakRef();
</del><ins>+ $$ = &parser->createKeyframesRule($4, std::unique_ptr<Vector<RefPtr<StyleKeyframe>>>($9)).leakRef();
</ins><span class="cx"> }
</span><span class="cx"> ;
</span><span class="cx">
</span><span class="lines">@@ -1780,7 +1780,7 @@
</span><span class="cx"> FUNCTION maybe_space closing_parenthesis {
</span><span class="cx"> CSSParserFunction* f = new CSSParserFunction;
</span><span class="cx"> f->name = $1;
</span><del>- f->args = std::unique_ptr<CSSParserValueList>(new CSSParserValueList);
</del><ins>+ f->args = std::make_unique<CSSParserValueList>();
</ins><span class="cx"> $$.id = CSSValueInvalid;
</span><span class="cx"> $$.unit = CSSParserValue::Function;
</span><span class="cx"> $$.function = f;
</span><span class="lines">@@ -1815,7 +1815,7 @@
</span><span class="cx"> | VARFUNCTION maybe_space CUSTOM_PROPERTY maybe_space ',' maybe_space closing_parenthesis {
</span><span class="cx"> CSSParserVariable* var = new CSSParserVariable;
</span><span class="cx"> var->name = $3;
</span><del>- var->args = std::unique_ptr<CSSParserValueList>(new CSSParserValueList());
</del><ins>+ var->args = std::make_unique<CSSParserValueList>();
</ins><span class="cx"> $$.id = CSSValueInvalid;
</span><span class="cx"> $$.unit = CSSParserValue::Variable;
</span><span class="cx"> $$.variable = var;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSImageGeneratorValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSImageGeneratorValue.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSImageGeneratorValue.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSImageGeneratorValue.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -167,7 +167,7 @@
</span><span class="cx"> return FloatSize();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool CSSImageGeneratorValue::isPending() const
</del><ins>+bool CSSImageGeneratorValue::isPending()
</ins><span class="cx"> {
</span><span class="cx"> switch (classType()) {
</span><span class="cx"> case CrossfadeClass:
</span><span class="lines">@@ -232,15 +232,15 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool CSSImageGeneratorValue::subimageIsPending(CSSValue* value)
</del><ins>+bool CSSImageGeneratorValue::subimageIsPending(CSSValue& value)
</ins><span class="cx"> {
</span><del>- if (is<CSSImageValue>(*value))
- return downcast<CSSImageValue>(*value).cachedOrPendingImage()->isPendingImage();
</del><ins>+ if (is<CSSImageValue>(value))
+ return downcast<CSSImageValue>(value).cachedOrPendingImage().isPendingImage();
</ins><span class="cx">
</span><del>- if (is<CSSImageGeneratorValue>(*value))
- return downcast<CSSImageGeneratorValue>(*value).isPending();
</del><ins>+ if (is<CSSImageGeneratorValue>(value))
+ return downcast<CSSImageGeneratorValue>(value).isPending();
</ins><span class="cx">
</span><del>- if (is<CSSPrimitiveValue>(*value) && downcast<CSSPrimitiveValue>(*value).getValueID() == CSSValueNone)
</del><ins>+ if (is<CSSPrimitiveValue>(value) && downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNone)
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="lines">@@ -248,26 +248,23 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CachedImage* CSSImageGeneratorValue::cachedImageForCSSValue(CSSValue* value, CachedResourceLoader& cachedResourceLoader, const ResourceLoaderOptions& options)
</del><ins>+CachedImage* CSSImageGeneratorValue::cachedImageForCSSValue(CSSValue& value, CachedResourceLoader& cachedResourceLoader, const ResourceLoaderOptions& options)
</ins><span class="cx"> {
</span><del>- if (!value)
- return nullptr;
-
- if (is<CSSImageValue>(*value)) {
- StyleCachedImage* styleCachedImage = downcast<CSSImageValue>(*value).cachedImage(cachedResourceLoader, options);
</del><ins>+ if (is<CSSImageValue>(value)) {
+ StyleCachedImage* styleCachedImage = downcast<CSSImageValue>(value).cachedImage(cachedResourceLoader, options);
</ins><span class="cx"> if (!styleCachedImage)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> return styleCachedImage->cachedImage();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (is<CSSImageGeneratorValue>(*value)) {
- downcast<CSSImageGeneratorValue>(*value).loadSubimages(cachedResourceLoader, options);
</del><ins>+ if (is<CSSImageGeneratorValue>(value)) {
+ downcast<CSSImageGeneratorValue>(value).loadSubimages(cachedResourceLoader, options);
</ins><span class="cx"> // FIXME: Handle CSSImageGeneratorValue (and thus cross-fades with gradients and canvas).
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (is<CSSPrimitiveValue>(*value) && downcast<CSSPrimitiveValue>(*value).getValueID() == CSSValueNone)
</del><ins>+ if (is<CSSPrimitiveValue>(value) && downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNone)
</ins><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> ASSERT_NOT_REACHED();
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSImageGeneratorValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSImageGeneratorValue.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSImageGeneratorValue.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSImageGeneratorValue.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx"> bool isFixedSize() const;
</span><span class="cx"> FloatSize fixedSize(const RenderElement*);
</span><span class="cx">
</span><del>- bool isPending() const;
</del><ins>+ bool isPending();
</ins><span class="cx"> bool knownToBeOpaque(const RenderElement*) const;
</span><span class="cx">
</span><span class="cx"> void loadSubimages(CachedResourceLoader&, const ResourceLoaderOptions&);
</span><span class="lines">@@ -67,8 +67,8 @@
</span><span class="cx"> const HashCountedSet<RenderElement*>& clients() const { return m_clients; }
</span><span class="cx">
</span><span class="cx"> // Helper functions for Crossfade and Filter.
</span><del>- static CachedImage* cachedImageForCSSValue(CSSValue*, CachedResourceLoader&, const ResourceLoaderOptions&);
- static bool subimageIsPending(CSSValue*);
</del><ins>+ static CachedImage* cachedImageForCSSValue(CSSValue&, CachedResourceLoader&, const ResourceLoaderOptions&);
+ static bool subimageIsPending(CSSValue&);
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> class CachedGeneratedImage {
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSImageValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSImageValue.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSImageValue.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSImageValue.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -63,12 +63,12 @@
</span><span class="cx"> detachPendingImage();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-StyleImage* CSSImageValue::cachedOrPendingImage()
</del><ins>+StyleImage& CSSImageValue::cachedOrPendingImage()
</ins><span class="cx"> {
</span><span class="cx"> if (!m_image)
</span><span class="cx"> m_image = StylePendingImage::create(this);
</span><span class="cx">
</span><del>- return m_image.get();
</del><ins>+ return *m_image;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> StyleCachedImage* CSSImageValue::cachedImage(CachedResourceLoader& loader, const ResourceLoaderOptions& options)
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSImageValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSImageValue.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSImageValue.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSImageValue.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">
</span><span class="cx"> StyleCachedImage* cachedImage(CachedResourceLoader&, const ResourceLoaderOptions&);
</span><span class="cx"> // Returns a StyleCachedImage if the image is cached already, otherwise a StylePendingImage.
</span><del>- StyleImage* cachedOrPendingImage();
</del><ins>+ StyleImage& cachedOrPendingImage();
</ins><span class="cx">
</span><span class="cx"> const String& url() const { return m_url; }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSKeyframesRulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSKeyframesRule.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSKeyframesRule.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSKeyframesRule.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -44,25 +44,27 @@
</span><span class="cx">
</span><span class="cx"> StyleRuleKeyframes::StyleRuleKeyframes(const StyleRuleKeyframes& o)
</span><span class="cx"> : StyleRuleBase(o)
</span><del>- , m_keyframes(o.m_keyframes)
</del><span class="cx"> , m_name(o.m_name)
</span><span class="cx"> {
</span><ins>+ m_keyframes.reserveInitialCapacity(o.keyframes().size());
+ for (auto& keyframe : o.keyframes())
+ m_keyframes.uncheckedAppend(keyframe.copyRef());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> StyleRuleKeyframes::~StyleRuleKeyframes()
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void StyleRuleKeyframes::parserAppendKeyframe(PassRefPtr<StyleKeyframe> keyframe)
</del><ins>+void StyleRuleKeyframes::parserAppendKeyframe(RefPtr<StyleKeyframe>&& keyframe)
</ins><span class="cx"> {
</span><span class="cx"> if (!keyframe)
</span><span class="cx"> return;
</span><del>- m_keyframes.append(keyframe);
</del><ins>+ m_keyframes.append(keyframe.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void StyleRuleKeyframes::wrapperAppendKeyframe(PassRefPtr<StyleKeyframe> keyframe)
</del><ins>+void StyleRuleKeyframes::wrapperAppendKeyframe(Ref<StyleKeyframe>&& keyframe)
</ins><span class="cx"> {
</span><del>- m_keyframes.append(keyframe);
</del><ins>+ m_keyframes.append(WTFMove(keyframe));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void StyleRuleKeyframes::wrapperRemoveKeyframe(unsigned index)
</span><span class="lines">@@ -70,7 +72,7 @@
</span><span class="cx"> m_keyframes.remove(index);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int StyleRuleKeyframes::findKeyframeIndex(const String& key) const
</del><ins>+size_t StyleRuleKeyframes::findKeyframeIndex(const String& key) const
</ins><span class="cx"> {
</span><span class="cx"> Vector<double>&& keys = CSSParser::parseKeyframeSelector(key);
</span><span class="cx">
</span><span class="lines">@@ -79,7 +81,7 @@
</span><span class="cx"> return i;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return -1;
</del><ins>+ return notFound;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> CSSKeyframesRule::CSSKeyframesRule(StyleRuleKeyframes& keyframesRule, CSSStyleSheet* parent)
</span><span class="lines">@@ -118,7 +120,7 @@
</span><span class="cx">
</span><span class="cx"> CSSStyleSheet::RuleMutationScope mutationScope(this);
</span><span class="cx">
</span><del>- m_keyframesRule->wrapperAppendKeyframe(keyframe);
</del><ins>+ m_keyframesRule->wrapperAppendKeyframe(keyframe.releaseNonNull());
</ins><span class="cx">
</span><span class="cx"> m_childRuleCSSOMWrappers.grow(length());
</span><span class="cx"> }
</span><span class="lines">@@ -136,8 +138,8 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size());
</span><span class="cx">
</span><del>- int i = m_keyframesRule->findKeyframeIndex(s);
- if (i < 0)
</del><ins>+ size_t i = m_keyframesRule->findKeyframeIndex(s);
+ if (i == notFound)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> CSSStyleSheet::RuleMutationScope mutationScope(this);
</span><span class="lines">@@ -151,8 +153,8 @@
</span><span class="cx">
</span><span class="cx"> CSSKeyframeRule* CSSKeyframesRule::findRule(const String& s)
</span><span class="cx"> {
</span><del>- int i = m_keyframesRule->findKeyframeIndex(s);
- return (i >= 0) ? item(i) : 0;
</del><ins>+ size_t i = m_keyframesRule->findKeyframeIndex(s);
+ return i != notFound ? item(i) : nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String CSSKeyframesRule::cssText() const
</span><span class="lines">@@ -180,12 +182,12 @@
</span><span class="cx"> CSSKeyframeRule* CSSKeyframesRule::item(unsigned index) const
</span><span class="cx"> {
</span><span class="cx"> if (index >= length())
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size());
</span><span class="cx"> RefPtr<CSSKeyframeRule>& rule = m_childRuleCSSOMWrappers[index];
</span><span class="cx"> if (!rule)
</span><del>- rule = adoptRef(new CSSKeyframeRule(*m_keyframesRule->keyframes()[index], const_cast<CSSKeyframesRule*>(this)));
</del><ins>+ rule = adoptRef(new CSSKeyframeRule(const_cast<StyleKeyframe&>(m_keyframesRule->keyframes()[index].get()), const_cast<CSSKeyframesRule*>(this)));
</ins><span class="cx">
</span><span class="cx"> return rule.get();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSKeyframesRuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSKeyframesRule.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSKeyframesRule.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSKeyframesRule.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -44,16 +44,16 @@
</span><span class="cx">
</span><span class="cx"> ~StyleRuleKeyframes();
</span><span class="cx">
</span><del>- const Vector<RefPtr<StyleKeyframe>>& keyframes() const { return m_keyframes; }
</del><ins>+ const Vector<Ref<StyleKeyframe>>& keyframes() const { return m_keyframes; }
</ins><span class="cx">
</span><del>- void parserAppendKeyframe(PassRefPtr<StyleKeyframe>);
- void wrapperAppendKeyframe(PassRefPtr<StyleKeyframe>);
</del><ins>+ void parserAppendKeyframe(RefPtr<StyleKeyframe>&&);
+ void wrapperAppendKeyframe(Ref<StyleKeyframe>&&);
</ins><span class="cx"> void wrapperRemoveKeyframe(unsigned);
</span><span class="cx">
</span><span class="cx"> String name() const { return m_name; }
</span><span class="cx"> void setName(const String& name) { m_name = AtomicString(name); }
</span><span class="cx">
</span><del>- int findKeyframeIndex(const String& key) const;
</del><ins>+ size_t findKeyframeIndex(const String& key) const;
</ins><span class="cx">
</span><span class="cx"> Ref<StyleRuleKeyframes> copy() const { return adoptRef(*new StyleRuleKeyframes(*this)); }
</span><span class="cx">
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx"> StyleRuleKeyframes();
</span><span class="cx"> StyleRuleKeyframes(const StyleRuleKeyframes&);
</span><span class="cx">
</span><del>- Vector<RefPtr<StyleKeyframe>> m_keyframes;
</del><ins>+ Vector<Ref<StyleKeyframe>> m_keyframes;
</ins><span class="cx"> AtomicString m_name;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -167,7 +167,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-static const unsigned INVALID_NUM_PARSED_PROPERTIES = UINT_MAX;
</del><ins>+const unsigned CSSParser::invalidParsedPropertiesCount = std::numeric_limits<unsigned>::max();
</ins><span class="cx"> static const double MAX_SCALE = 1000000;
</span><span class="cx">
</span><span class="cx"> template<unsigned length> bool equalLettersIgnoringASCIICase(const CSSParserValue& value, const char (&lowercaseLetters)[length])
</span><span class="lines">@@ -195,12 +195,7 @@
</span><span class="cx">
</span><span class="cx"> class AnimationParseContext {
</span><span class="cx"> public:
</span><del>- AnimationParseContext()
- : m_animationPropertyKeywordAllowed(true)
- , m_firstAnimationCommitted(false)
- , m_hasSeenAnimationPropertyKeyword(false)
- {
- }
</del><ins>+ AnimationParseContext() = default;
</ins><span class="cx">
</span><span class="cx"> void commitFirstAnimation()
</span><span class="cx"> {
</span><span class="lines">@@ -233,9 +228,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- bool m_animationPropertyKeywordAllowed;
- bool m_firstAnimationCommitted;
- bool m_hasSeenAnimationPropertyKeyword;
</del><ins>+ bool m_animationPropertyKeywordAllowed { true };
+ bool m_firstAnimationCommitted { false };
+ bool m_hasSeenAnimationPropertyKeyword { false };
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> const CSSParserContext& strictCSSParserContext()
</span><span class="lines">@@ -301,51 +296,14 @@
</span><span class="cx">
</span><span class="cx"> CSSParser::CSSParser(const CSSParserContext& context)
</span><span class="cx"> : m_context(context)
</span><del>- , m_important(false)
- , m_id(CSSPropertyInvalid)
- , m_styleSheet(nullptr)
- , m_supportsCondition(false)
- , m_selectorListForParseSelector(nullptr)
- , m_numParsedPropertiesBeforeMarginBox(INVALID_NUM_PARSED_PROPERTIES)
- , m_inParseShorthand(0)
- , m_currentShorthand(CSSPropertyInvalid)
- , m_implicitShorthand(false)
- , m_hadSyntacticallyValidCSSRule(false)
- , m_logErrors(false)
- , m_ignoreErrorsInDeclaration(false)
- , m_defaultNamespace(starAtom)
- , m_parsedTextPrefixLength(0)
- , m_nestedSelectorLevel(0)
- , m_propertyRange(UINT_MAX, UINT_MAX)
- , m_ruleSourceDataResult(nullptr)
- , m_parsingMode(NormalMode)
- , m_is8BitSource(false)
- , m_currentCharacter8(nullptr)
- , m_currentCharacter16(nullptr)
- , m_length(0)
- , m_token(0)
- , m_lineNumber(0)
- , m_tokenStartLineNumber(0)
- , m_tokenStartColumnNumber(0)
- , m_lastSelectorLineNumber(0)
- , m_columnOffsetForLine(0)
- , m_sheetStartLineNumber(0)
- , m_sheetStartColumnNumber(0)
- , m_allowImportRules(true)
- , m_allowNamespaceDeclarations(true)
-#if ENABLE(CSS_DEVICE_ADAPTATION)
- , m_inViewport(false)
-#endif
</del><span class="cx"> {
</span><span class="cx"> #if YYDEBUG > 0
</span><span class="cx"> cssyydebug = 1;
</span><span class="cx"> #endif
</span><del>- m_tokenStart.ptr8 = nullptr;
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> CSSParser::~CSSParser()
</span><span class="cx"> {
</span><del>- clearProperties();
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template<typename CharacterType> ALWAYS_INLINE static void convertToASCIILowercaseInPlace(CharacterType* characters, unsigned length)
</span><span class="lines">@@ -504,7 +462,7 @@
</span><span class="cx"> || (valueID >= CSSValueWebkitFocusRingColor && valueID < CSSValueWebkitText && !strict));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static CSSParser::ParseResult parseColorValue(MutableStyleProperties* declaration, CSSPropertyID propertyId, const String& string, bool important, CSSParserMode cssParserMode)
</del><ins>+static CSSParser::ParseResult parseColorValue(MutableStyleProperties& declaration, CSSPropertyID propertyId, const String& string, bool important, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!string.isEmpty());
</span><span class="cx"> bool strict = isStrictParserMode(cssParserMode);
</span><span class="lines">@@ -515,15 +473,15 @@
</span><span class="cx"> cssString.init(string);
</span><span class="cx"> CSSValueID valueID = cssValueKeywordID(cssString);
</span><span class="cx"> if (validPrimitiveValueColor(valueID, strict)) {
</span><del>- RefPtr<CSSValue> value = CSSValuePool::singleton().createIdentifierValue(valueID);
- return declaration->addParsedProperty(CSSProperty(propertyId, value.release(), important)) ? CSSParser::ParseResult::Changed : CSSParser::ParseResult::Unchanged;
</del><ins>+ auto value = CSSValuePool::singleton().createIdentifierValue(valueID);
+ return declaration.addParsedProperty(CSSProperty(propertyId, WTFMove(value), important)) ? CSSParser::ParseResult::Changed : CSSParser::ParseResult::Unchanged;
</ins><span class="cx"> }
</span><span class="cx"> RGBA32 color;
</span><span class="cx"> if (!CSSParser::fastParseColor(color, string, strict && string[0] != '#'))
</span><span class="cx"> return CSSParser::ParseResult::Error;
</span><span class="cx">
</span><del>- RefPtr<CSSValue> value = CSSValuePool::singleton().createColorValue(color);
- return declaration->addParsedProperty(CSSProperty(propertyId, value.release(), important)) ? CSSParser::ParseResult::Changed : CSSParser::ParseResult::Unchanged;
</del><ins>+ auto value = CSSValuePool::singleton().createColorValue(color);
+ return declaration.addParsedProperty(CSSProperty(propertyId, WTFMove(value), important)) ? CSSParser::ParseResult::Changed : CSSParser::ParseResult::Unchanged;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static inline bool isSimpleLengthPropertyID(CSSPropertyID propertyId, bool& acceptsNegativeNumbers)
</span><span class="lines">@@ -600,7 +558,7 @@
</span><span class="cx"> return ok;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static CSSParser::ParseResult parseSimpleLengthValue(MutableStyleProperties* declaration, CSSPropertyID propertyId, const String& string, bool important, CSSParserMode cssParserMode)
</del><ins>+static CSSParser::ParseResult parseSimpleLengthValue(MutableStyleProperties& declaration, CSSPropertyID propertyId, const String& string, bool important, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!string.isEmpty());
</span><span class="cx"> bool acceptsNegativeNumbers;
</span><span class="lines">@@ -629,8 +587,8 @@
</span><span class="cx"> if (std::isinf(number))
</span><span class="cx"> return CSSParser::ParseResult::Error;
</span><span class="cx">
</span><del>- RefPtr<CSSValue> value = CSSValuePool::singleton().createValue(number, unit);
- return declaration->addParsedProperty(CSSProperty(propertyId, value.release(), important)) ? CSSParser::ParseResult::Changed : CSSParser::ParseResult::Unchanged;
</del><ins>+ auto value = CSSValuePool::singleton().createValue(number, unit);
+ return declaration.addParsedProperty(CSSProperty(propertyId, WTFMove(value), important)) ? CSSParser::ParseResult::Changed : CSSParser::ParseResult::Unchanged;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static inline bool isValidKeywordPropertyAndValue(CSSPropertyID propertyId, int valueID, const CSSParserContext& parserContext, StyleSheetContents* styleSheetContents)
</span><span class="lines">@@ -1200,7 +1158,7 @@
</span><span class="cx"> || equalLettersIgnoringASCIICase(string, "revert");
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static CSSParser::ParseResult parseKeywordValue(MutableStyleProperties* declaration, CSSPropertyID propertyId, const String& string, bool important, const CSSParserContext& parserContext, StyleSheetContents* styleSheetContents)
</del><ins>+static CSSParser::ParseResult parseKeywordValue(MutableStyleProperties& declaration, CSSPropertyID propertyId, const String& string, bool important, const CSSParserContext& parserContext, StyleSheetContents* styleSheetContents)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!string.isEmpty());
</span><span class="cx">
</span><span class="lines">@@ -1234,7 +1192,7 @@
</span><span class="cx"> else
</span><span class="cx"> return CSSParser::ParseResult::Error;
</span><span class="cx">
</span><del>- return declaration->addParsedProperty(CSSProperty(propertyId, value.release(), important)) ? CSSParser::ParseResult::Changed : CSSParser::ParseResult::Unchanged;
</del><ins>+ return declaration.addParsedProperty(CSSProperty(propertyId, value.releaseNonNull(), important)) ? CSSParser::ParseResult::Changed : CSSParser::ParseResult::Unchanged;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template <typename CharacterType>
</span><span class="lines">@@ -1259,7 +1217,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static CSSParser::ParseResult parseTranslateTransformValue(MutableStyleProperties* properties, CSSPropertyID propertyID, const String& string, bool important)
</del><ins>+static CSSParser::ParseResult parseTranslateTransformValue(MutableStyleProperties& properties, CSSPropertyID propertyID, const String& string, bool important)
</ins><span class="cx"> {
</span><span class="cx"> if (propertyID != CSSPropertyTransform)
</span><span class="cx"> return CSSParser::ParseResult::Error;
</span><span class="lines">@@ -1295,18 +1253,18 @@
</span><span class="cx"> } else
</span><span class="cx"> return CSSParser::ParseResult::Error;
</span><span class="cx">
</span><del>- RefPtr<WebKitCSSTransformValue> transformValue = WebKitCSSTransformValue::create(transformType);
</del><ins>+ auto transformValue = WebKitCSSTransformValue::create(transformType);
</ins><span class="cx"> bool success;
</span><span class="cx"> if (string.is8Bit())
</span><del>- success = parseTransformTranslateArguments(*transformValue, string.characters8(), string.length(), argumentStart, expectedArgumentCount);
</del><ins>+ success = parseTransformTranslateArguments(transformValue, string.characters8(), string.length(), argumentStart, expectedArgumentCount);
</ins><span class="cx"> else
</span><del>- success = parseTransformTranslateArguments(*transformValue, string.characters16(), string.length(), argumentStart, expectedArgumentCount);
</del><ins>+ success = parseTransformTranslateArguments(transformValue, string.characters16(), string.length(), argumentStart, expectedArgumentCount);
</ins><span class="cx"> if (!success)
</span><span class="cx"> return CSSParser::ParseResult::Error;
</span><span class="cx">
</span><del>- RefPtr<CSSValueList> result = CSSValueList::createSpaceSeparated();
- result->append(transformValue.releaseNonNull());
- return properties->addParsedProperty(CSSProperty(CSSPropertyTransform, result.release(), important)) ? CSSParser::ParseResult::Changed : CSSParser::ParseResult::Unchanged;
</del><ins>+ auto result = CSSValueList::createSpaceSeparated();
+ result->append(WTFMove(transformValue));
+ return properties.addParsedProperty(CSSProperty(CSSPropertyTransform, WTFMove(result), important)) ? CSSParser::ParseResult::Changed : CSSParser::ParseResult::Unchanged;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValueList> CSSParser::parseFontFaceValue(const AtomicString& string)
</span><span class="lines">@@ -1314,7 +1272,7 @@
</span><span class="cx"> if (string.isEmpty())
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- Ref<CSSValueList> valueList = CSSValueList::createCommaSeparated();
</del><ins>+ auto valueList = CSSValueList::createCommaSeparated();
</ins><span class="cx">
</span><span class="cx"> Vector<String> familyNames;
</span><span class="cx"> string.string().split(',', true, familyNames);
</span><span class="lines">@@ -1340,7 +1298,7 @@
</span><span class="cx"> return WTFMove(valueList);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CSSParser::ParseResult CSSParser::parseValue(MutableStyleProperties* declaration, CSSPropertyID propertyID, const String& string, bool important, CSSParserMode cssParserMode, StyleSheetContents* contextStyleSheet)
</del><ins>+CSSParser::ParseResult CSSParser::parseValue(MutableStyleProperties& declaration, CSSPropertyID propertyID, const String& string, bool important, CSSParserMode cssParserMode, StyleSheetContents* contextStyleSheet)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!string.isEmpty());
</span><span class="cx"> CSSParser::ParseResult result = parseSimpleLengthValue(declaration, propertyID, string, important, cssParserMode);
</span><span class="lines">@@ -1369,7 +1327,7 @@
</span><span class="cx"> return parser.parseValue(declaration, propertyID, string, important, contextStyleSheet);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CSSParser::ParseResult CSSParser::parseCustomPropertyValue(MutableStyleProperties* declaration, const AtomicString& propertyName, const String& string, bool important, CSSParserMode cssParserMode, StyleSheetContents* contextStyleSheet)
</del><ins>+CSSParser::ParseResult CSSParser::parseCustomPropertyValue(MutableStyleProperties& declaration, const AtomicString& propertyName, const String& string, bool important, CSSParserMode cssParserMode, StyleSheetContents* contextStyleSheet)
</ins><span class="cx"> {
</span><span class="cx"> CSSParserContext context(cssParserMode);
</span><span class="cx"> if (contextStyleSheet) {
</span><span class="lines">@@ -1382,7 +1340,7 @@
</span><span class="cx"> return parser.parseValue(declaration, CSSPropertyCustom, string, important, contextStyleSheet);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CSSParser::ParseResult CSSParser::parseValue(MutableStyleProperties* declaration, CSSPropertyID propertyID, const String& string, bool important, StyleSheetContents* contextStyleSheet)
</del><ins>+CSSParser::ParseResult CSSParser::parseValue(MutableStyleProperties& declaration, CSSPropertyID propertyID, const String& string, bool important, StyleSheetContents* contextStyleSheet)
</ins><span class="cx"> {
</span><span class="cx"> setStyleSheet(contextStyleSheet);
</span><span class="cx">
</span><span class="lines">@@ -1398,7 +1356,7 @@
</span><span class="cx"> ParseResult result = ParseResult::Error;
</span><span class="cx">
</span><span class="cx"> if (!m_parsedProperties.isEmpty()) {
</span><del>- result = declaration->addParsedProperties(m_parsedProperties) ? ParseResult::Changed : ParseResult::Unchanged;
</del><ins>+ result = declaration.addParsedProperties(m_parsedProperties) ? ParseResult::Changed : ParseResult::Unchanged;
</ins><span class="cx"> clearProperties();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1494,17 +1452,16 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><del>-bool CSSParser::parseDeclaration(MutableStyleProperties* declaration, const String& string, RefPtr<CSSRuleSourceData>&& prpRuleSourceData, StyleSheetContents* contextStyleSheet)
</del><ins>+bool CSSParser::parseDeclaration(MutableStyleProperties& declaration, const String& string, RefPtr<CSSRuleSourceData>&& ruleSourceData, StyleSheetContents* contextStyleSheet)
</ins><span class="cx"> {
</span><span class="cx"> // Length of the "@-webkit-decls{" prefix.
</span><span class="cx"> static const unsigned prefixLength = 15;
</span><span class="cx">
</span><span class="cx"> setStyleSheet(contextStyleSheet);
</span><span class="cx">
</span><del>- RefPtr<CSSRuleSourceData> ruleSourceData = prpRuleSourceData;
</del><span class="cx"> if (ruleSourceData) {
</span><span class="cx"> m_currentRuleDataStack = std::make_unique<RuleSourceDataList>();
</span><del>- m_currentRuleDataStack->append(ruleSourceData);
</del><ins>+ m_currentRuleDataStack->append(*ruleSourceData);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> setupParser("@-webkit-decls{", string, "} ");
</span><span class="lines">@@ -1514,7 +1471,7 @@
</span><span class="cx"> bool ok = false;
</span><span class="cx"> if (!m_parsedProperties.isEmpty()) {
</span><span class="cx"> ok = true;
</span><del>- declaration->addParsedProperties(m_parsedProperties);
</del><ins>+ declaration.addParsedProperties(m_parsedProperties);
</ins><span class="cx"> clearProperties();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1528,7 +1485,7 @@
</span><span class="cx"> propertyData.range.end -= prefixLength;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- fixUnparsedPropertyRanges(ruleSourceData.get());
</del><ins>+ fixUnparsedPropertyRanges(*ruleSourceData);
</ins><span class="cx"> m_currentRuleDataStack.reset();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1580,7 +1537,7 @@
</span><span class="cx">
</span><span class="cx"> CSSParser::SourceSize::SourceSize(std::unique_ptr<MediaQueryExp>&& origExp, RefPtr<CSSValue>&& value)
</span><span class="cx"> : expression(WTFMove(origExp))
</span><del>- , length(value)
</del><ins>+ , length(WTFMove(value))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1610,10 +1567,9 @@
</span><span class="cx">
</span><span class="cx"> if (property.id() == CSSPropertyCustom) {
</span><span class="cx"> if (property.value()) {
</span><del>- const AtomicString& name = downcast<CSSCustomPropertyValue>(*property.value()).name();
- if (seenCustomProperties.contains(name))
</del><ins>+ auto& name = downcast<CSSCustomPropertyValue>(*property.value()).name();
+ if (!seenCustomProperties.add(name).isNewEntry)
</ins><span class="cx"> continue;
</span><del>- seenCustomProperties.add(name);
</del><span class="cx"> output[--unusedEntries] = property;
</span><span class="cx"> }
</span><span class="cx"> continue;
</span><span class="lines">@@ -1669,7 +1625,7 @@
</span><span class="cx"> void CSSParser::clearProperties()
</span><span class="cx"> {
</span><span class="cx"> m_parsedProperties.clear();
</span><del>- m_numParsedPropertiesBeforeMarginBox = INVALID_NUM_PARSED_PROPERTIES;
</del><ins>+ m_numParsedPropertiesBeforeMarginBox = invalidParsedPropertiesCount;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> URL CSSParser::completeURL(const CSSParserContext& context, const String& url)
</span><span class="lines">@@ -1882,7 +1838,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void CSSParser::addExpandedPropertyForValue(CSSPropertyID propId, RefPtr<CSSValue>&& value, bool important)
</del><ins>+void CSSParser::addExpandedPropertyForValue(CSSPropertyID propId, Ref<CSSValue>&& value, bool important)
</ins><span class="cx"> {
</span><span class="cx"> const StylePropertyShorthand& shorthand = shorthandForProperty(propId);
</span><span class="cx"> unsigned shorthandLength = shorthand.length();
</span><span class="lines">@@ -1900,14 +1856,13 @@
</span><span class="cx"> RefPtr<CSSValue> CSSParser::parseVariableDependentValue(CSSPropertyID propID, const CSSVariableDependentValue& dependentValue, const CustomPropertyValueMap& customProperties)
</span><span class="cx"> {
</span><span class="cx"> m_valueList.reset(new CSSParserValueList());
</span><del>- if (!dependentValue.valueList()->buildParserValueListSubstitutingVariables(m_valueList.get(), customProperties))
</del><ins>+ if (!dependentValue.valueList().buildParserValueListSubstitutingVariables(m_valueList.get(), customProperties))
</ins><span class="cx"> return nullptr;
</span><del>- bool parsed = parseValue(dependentValue.propertyID(), false);
- if (!parsed)
</del><ins>+ if (!parseValue(dependentValue.propertyID(), false))
</ins><span class="cx"> return nullptr;
</span><del>- for (size_t i = 0; i < m_parsedProperties.size(); ++i) {
- if (m_parsedProperties[i].id() == propID)
- return m_parsedProperties[i].value();
</del><ins>+ for (auto& property : m_parsedProperties) {
+ if (property.id() == propID)
+ return property.value();
</ins><span class="cx"> }
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="lines">@@ -1924,8 +1879,8 @@
</span><span class="cx"> return parseCustomPropertyDeclaration(important, id);
</span><span class="cx">
</span><span class="cx"> if (m_valueList->containsVariables()) {
</span><del>- RefPtr<CSSValueList> valueList = CSSValueList::createFromParserValueList(*m_valueList);
- addExpandedPropertyForValue(propId, CSSVariableDependentValue::create(valueList, propId), important);
</del><ins>+ auto valueList = CSSValueList::createFromParserValueList(*m_valueList);
+ addExpandedPropertyForValue(propId, CSSVariableDependentValue::create(WTFMove(valueList), propId), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2172,7 +2127,7 @@
</span><span class="cx"> else if ((value->id >= CSSValueAuto && value->id <= CSSValueWebkitZoomOut) || value->id == CSSValueCopy || value->id == CSSValueNone)
</span><span class="cx"> list->append(cssValuePool.createIdentifierValue(value->id));
</span><span class="cx"> m_valueList->next();
</span><del>- parsedValue = list.release();
</del><ins>+ parsedValue = WTFMove(list);
</ins><span class="cx"> break;
</span><span class="cx"> } else if (value) {
</span><span class="cx"> id = value->id;
</span><span class="lines">@@ -2237,9 +2192,9 @@
</span><span class="cx"> propId == CSSPropertyWebkitMaskRepeat) {
</span><span class="cx"> shorthandScope = std::make_unique<ShorthandScope>(this, propId);
</span><span class="cx"> }
</span><del>- addProperty(propId1, val1.release(), important);
</del><ins>+ addProperty(propId1, val1.releaseNonNull(), important);
</ins><span class="cx"> if (val2)
</span><del>- addProperty(propId2, val2.release(), important);
</del><ins>+ addProperty(propId2, val2.releaseNonNull(), important);
</ins><span class="cx"> result = true;
</span><span class="cx"> }
</span><span class="cx"> m_implicitShorthand = false;
</span><span class="lines">@@ -2506,7 +2461,7 @@
</span><span class="cx"> validPrimitive = validateUnit(valueWithCalculation, FLength | FPercent | FNonNeg);
</span><span class="cx"> if (!validPrimitive)
</span><span class="cx"> return false;
</span><del>- RefPtr<CSSPrimitiveValue> parsedValue1 = createPrimitiveNumericValue(valueWithCalculation);
</del><ins>+ auto parsedValue1 = createPrimitiveNumericValue(valueWithCalculation);
</ins><span class="cx"> RefPtr<CSSPrimitiveValue> parsedValue2;
</span><span class="cx"> if (num == 2) {
</span><span class="cx"> ValueWithCalculation nextValueWithCalculation(*m_valueList->next());
</span><span class="lines">@@ -2515,9 +2470,9 @@
</span><span class="cx"> return false;
</span><span class="cx"> parsedValue2 = createPrimitiveNumericValue(nextValueWithCalculation);
</span><span class="cx"> } else
</span><del>- parsedValue2 = parsedValue1;
</del><ins>+ parsedValue2 = parsedValue1.ptr();
</ins><span class="cx">
</span><del>- addProperty(propId, createPrimitiveValuePair(parsedValue1.release(), parsedValue2.release()), important);
</del><ins>+ addProperty(propId, createPrimitiveValuePair(WTFMove(parsedValue1), parsedValue2.releaseNonNull()), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> case CSSPropertyTabSize:
</span><span class="lines">@@ -2539,7 +2494,7 @@
</span><span class="cx"> else {
</span><span class="cx"> RefPtr<CSSValueList> shadowValueList = parseShadow(*m_valueList, propId);
</span><span class="cx"> if (shadowValueList) {
</span><del>- addProperty(propId, shadowValueList.release(), important);
</del><ins>+ addProperty(propId, shadowValueList.releaseNonNull(), important);
</ins><span class="cx"> m_valueList->next();
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -2555,7 +2510,7 @@
</span><span class="cx"> validPrimitive = validateUnit(valueWithCalculation, FPositiveInteger);
</span><span class="cx"> if (!validPrimitive)
</span><span class="cx"> return false;
</span><del>- RefPtr<CSSPrimitiveValue> height = createPrimitiveNumericValue(valueWithCalculation);
</del><ins>+ auto height = createPrimitiveNumericValue(valueWithCalculation);
</ins><span class="cx"> RefPtr<CSSPrimitiveValue> position;
</span><span class="cx"> if (num == 2) {
</span><span class="cx"> ValueWithCalculation nextValueWithCalculation(*m_valueList->next());
</span><span class="lines">@@ -2564,8 +2519,8 @@
</span><span class="cx"> return false;
</span><span class="cx"> position = createPrimitiveNumericValue(nextValueWithCalculation);
</span><span class="cx"> } else
</span><del>- position = height;
- addProperty(propId, createPrimitiveValuePair(position.release(), height.release()), important);
</del><ins>+ position = height.ptr();
+ addProperty(propId, createPrimitiveValuePair(position.releaseNonNull(), WTFMove(height)), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> break;
</span><span class="lines">@@ -2595,7 +2550,7 @@
</span><span class="cx"> if (id == CSSValueNone)
</span><span class="cx"> validPrimitive = true;
</span><span class="cx"> else {
</span><del>- RefPtr<CSSValue> currValue;
</del><ins>+ RefPtr<CSSValueList> currValue;
</ins><span class="cx"> if (!parseFilter(*m_valueList, currValue))
</span><span class="cx"> return false;
</span><span class="cx"> addProperty(propId, WTFMove(currValue), important);
</span><span class="lines">@@ -2669,9 +2624,8 @@
</span><span class="cx"> if (id == CSSValueNone)
</span><span class="cx"> validPrimitive = true;
</span><span class="cx"> else {
</span><del>- RefPtr<CSSValue> transformValue = parseTransform();
- if (transformValue) {
- addProperty(propId, transformValue.release(), important);
</del><ins>+ if (RefPtr<CSSValue> transformValue = parseTransform()) {
+ addProperty(propId, transformValue.releaseNonNull(), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return false;
</span><span class="lines">@@ -2686,11 +2640,11 @@
</span><span class="cx"> RefPtr<CSSValue> val3;
</span><span class="cx"> CSSPropertyID propId1, propId2, propId3;
</span><span class="cx"> if (parseTransformOrigin(propId, propId1, propId2, propId3, val1, val2, val3)) {
</span><del>- addProperty(propId1, val1.release(), important);
</del><ins>+ addProperty(propId1, WTFMove(val1), important);
</ins><span class="cx"> if (val2)
</span><del>- addProperty(propId2, val2.release(), important);
</del><ins>+ addProperty(propId2, WTFMove(val2), important);
</ins><span class="cx"> if (val3)
</span><del>- addProperty(propId3, val3.release(), important);
</del><ins>+ addProperty(propId3, WTFMove(val3), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return false;
</span><span class="lines">@@ -2701,12 +2655,8 @@
</span><span class="cx"> else {
</span><span class="cx"> // Accepting valueless numbers is a quirk of the -webkit prefixed version of the property.
</span><span class="cx"> if (validateUnit(valueWithCalculation, FNumber | FLength | FNonNeg)) {
</span><del>- RefPtr<CSSValue> val = createPrimitiveNumericValue(valueWithCalculation);
- if (val) {
- addProperty(propId, val.release(), important);
- return true;
- }
- return false;
</del><ins>+ addProperty(propId, createPrimitiveNumericValue(valueWithCalculation), important);
+ return true;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> break;
</span><span class="lines">@@ -2717,9 +2667,9 @@
</span><span class="cx"> RefPtr<CSSPrimitiveValue> val2;
</span><span class="cx"> CSSPropertyID propId1, propId2;
</span><span class="cx"> if (parsePerspectiveOrigin(propId, propId1, propId2, val1, val2)) {
</span><del>- addProperty(propId1, val1.release(), important);
</del><ins>+ addProperty(propId1, WTFMove(val1), important);
</ins><span class="cx"> if (val2)
</span><del>- addProperty(propId2, val2.release(), important);
</del><ins>+ addProperty(propId2, WTFMove(val2), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return false;
</span><span class="lines">@@ -2754,7 +2704,7 @@
</span><span class="cx"> RefPtr<CSSValue> val;
</span><span class="cx"> AnimationParseContext context;
</span><span class="cx"> if (parseAnimationProperty(propId, val, context)) {
</span><del>- addProperty(propId, val.release(), important);
</del><ins>+ addProperty(propId, WTFMove(val), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return false;
</span><span class="lines">@@ -2896,7 +2846,7 @@
</span><span class="cx"> RefPtr<CSSPrimitiveValue> val2;
</span><span class="cx"> parseFillPosition(*m_valueList, val1, val2);
</span><span class="cx"> if (val1) {
</span><del>- addProperty(CSSPropertyObjectPosition, createPrimitiveValuePair(val1.release(), val2.release()), important);
</del><ins>+ addProperty(CSSPropertyObjectPosition, createPrimitiveValuePair(val1.releaseNonNull(), WTFMove(val2)), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return false;
</span><span class="lines">@@ -3339,11 +3289,9 @@
</span><span class="cx"> m_valueList->next();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (parsedValue) {
- if (!m_valueList->current() || inShorthand()) {
- addProperty(propId, parsedValue.release(), important);
- return true;
- }
</del><ins>+ if (parsedValue && (!m_valueList->current() || inShorthand())) {
+ addProperty(propId, parsedValue.releaseNonNull(), important);
+ return true;
</ins><span class="cx"> }
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="lines">@@ -3421,7 +3369,7 @@
</span><span class="cx"> return !m_valueList->next();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseContentDistributionOverflowPosition()
</del><ins>+RefPtr<CSSContentDistributionValue> CSSParser::parseContentDistributionOverflowPosition()
</ins><span class="cx"> {
</span><span class="cx"> // normal | <baseline-position> | <content-distribution> || [ <overflow-position>? && <content-position> ]
</span><span class="cx"> // <baseline-position> = baseline | last-baseline;
</span><span class="lines">@@ -3516,9 +3464,9 @@
</span><span class="cx">
</span><span class="cx"> ASSERT(position);
</span><span class="cx"> if (overflowAlignmentKeyword)
</span><del>- addProperty(propId, createPrimitiveValuePair(position.release(), overflowAlignmentKeyword.release()), important);
</del><ins>+ addProperty(propId, createPrimitiveValuePair(position.releaseNonNull(), overflowAlignmentKeyword.releaseNonNull()), important);
</ins><span class="cx"> else
</span><del>- addProperty(propId, position.release(), important);
</del><ins>+ addProperty(propId, position.releaseNonNull(), important);
</ins><span class="cx">
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3541,7 +3489,7 @@
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><span class="cx"> bool CSSParser::parseNonElementSnapPoints(CSSPropertyID propId, bool important)
</span><span class="cx"> {
</span><del>- RefPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
</del><ins>+ auto values = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> while (CSSParserValue* value = m_valueList->current()) {
</span><span class="cx"> ValueWithCalculation valueWithCalculation(*value);
</span><span class="cx"> if (validateUnit(valueWithCalculation, FPercent | FLength))
</span><span class="lines">@@ -3563,7 +3511,7 @@
</span><span class="cx"> m_valueList->next();
</span><span class="cx"> }
</span><span class="cx"> if (values->length()) {
</span><del>- addProperty(propId, values.release(), important);
</del><ins>+ addProperty(propId, WTFMove(values), important);
</ins><span class="cx"> m_valueList->next();
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3589,7 +3537,7 @@
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseScrollSnapDestination(CSSPropertyID propId, bool important)
</span><span class="cx"> {
</span><del>- RefPtr<CSSValueList> position = CSSValueList::createSpaceSeparated();
</del><ins>+ auto position = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> if (m_valueList->size() != 2)
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="lines">@@ -3599,14 +3547,14 @@
</span><span class="cx">
</span><span class="cx"> position->append(cssValueX.releaseNonNull());
</span><span class="cx"> position->append(cssValueY.releaseNonNull());
</span><del>- addProperty(propId, position, important);
</del><ins>+ addProperty(propId, WTFMove(position), important);
</ins><span class="cx"> m_valueList->next();
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseScrollSnapCoordinate(CSSPropertyID propId, bool important)
</span><span class="cx"> {
</span><del>- RefPtr<CSSValueList> positions = CSSValueList::createSpaceSeparated();
</del><ins>+ auto positions = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> while (m_valueList->current()) {
</span><span class="cx"> RefPtr<CSSValue> cssValueX, cssValueY;
</span><span class="cx"> if (!parseScrollSnapPositions(cssValueX, cssValueY))
</span><span class="lines">@@ -3618,7 +3566,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (positions->length()) {
</span><del>- addProperty(propId, positions.release(), important);
</del><ins>+ addProperty(propId, WTFMove(positions), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return false;
</span><span class="lines">@@ -3737,34 +3685,34 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if (properties[i] == CSSPropertyBackgroundPosition) {
</span><del>- addProperty(CSSPropertyBackgroundPositionX, values[i].release(), important);
- // it's OK to call positionYValue.release() since we only see CSSPropertyBackgroundPosition once
- addProperty(CSSPropertyBackgroundPositionY, positionYValue.release(), important);
</del><ins>+ addProperty(CSSPropertyBackgroundPositionX, WTFMove(values[i]), important);
+ // it's OK to call WTFMove(positionYValue) since we only see CSSPropertyBackgroundPosition once
+ addProperty(CSSPropertyBackgroundPositionY, WTFMove(positionYValue), important);
</ins><span class="cx"> } else if (properties[i] == CSSPropertyWebkitMaskPosition) {
</span><del>- addProperty(CSSPropertyWebkitMaskPositionX, values[i].release(), important);
- // it's OK to call positionYValue.release() since we only see CSSPropertyWebkitMaskPosition once
- addProperty(CSSPropertyWebkitMaskPositionY, positionYValue.release(), important);
</del><ins>+ addProperty(CSSPropertyWebkitMaskPositionX, WTFMove(values[i]), important);
+ // it's OK to call WTFMove(positionYValue) since we only see CSSPropertyWebkitMaskPosition once
+ addProperty(CSSPropertyWebkitMaskPositionY, WTFMove(positionYValue), important);
</ins><span class="cx"> } else if (properties[i] == CSSPropertyBackgroundRepeat) {
</span><del>- addProperty(CSSPropertyBackgroundRepeatX, values[i].release(), important);
- // it's OK to call repeatYValue.release() since we only see CSSPropertyBackgroundPosition once
- addProperty(CSSPropertyBackgroundRepeatY, repeatYValue.release(), important);
</del><ins>+ addProperty(CSSPropertyBackgroundRepeatX, WTFMove(values[i]), important);
+ // it's OK to call WTFMove(repeatYValue) since we only see CSSPropertyBackgroundPosition once
+ addProperty(CSSPropertyBackgroundRepeatY, WTFMove(repeatYValue), important);
</ins><span class="cx"> } else if (properties[i] == CSSPropertyWebkitMaskRepeat) {
</span><del>- addProperty(CSSPropertyWebkitMaskRepeatX, values[i].release(), important);
- // it's OK to call repeatYValue.release() since we only see CSSPropertyBackgroundPosition once
- addProperty(CSSPropertyWebkitMaskRepeatY, repeatYValue.release(), important);
</del><ins>+ addProperty(CSSPropertyWebkitMaskRepeatX, WTFMove(values[i]), important);
+ // it's OK to call WTFMove(repeatYValue) since we only see CSSPropertyBackgroundPosition once
+ addProperty(CSSPropertyWebkitMaskRepeatY, WTFMove(repeatYValue), important);
</ins><span class="cx"> } else if ((properties[i] == CSSPropertyBackgroundClip || properties[i] == CSSPropertyWebkitMaskClip) && !foundClip)
</span><span class="cx"> // Value is already set while updating origin
</span><span class="cx"> continue;
</span><span class="cx"> else if (properties[i] == CSSPropertyBackgroundSize && !parsedProperty[i] && useLegacyBackgroundSizeShorthandBehavior())
</span><span class="cx"> continue;
</span><span class="cx"> else
</span><del>- addProperty(properties[i], values[i].release(), important);
</del><ins>+ addProperty(properties[i], WTFMove(values[i]), important);
</ins><span class="cx">
</span><span class="cx"> // Add in clip values when we hit the corresponding origin property.
</span><span class="cx"> if (properties[i] == CSSPropertyBackgroundOrigin && !foundClip)
</span><del>- addProperty(CSSPropertyBackgroundClip, clipValue.release(), important);
</del><ins>+ addProperty(CSSPropertyBackgroundClip, WTFMove(clipValue), important);
</ins><span class="cx"> else if (properties[i] == CSSPropertyWebkitMaskOrigin && !foundClip)
</span><del>- addProperty(CSSPropertyWebkitMaskClip, clipValue.release(), important);
</del><ins>+ addProperty(CSSPropertyWebkitMaskClip, WTFMove(clipValue), important);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return true;
</span><span class="lines">@@ -3783,8 +3731,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> auto list = CSSValueList::createCommaSeparated();
</span><del>- list.get().append(lval.releaseNonNull());
- list.get().append(WTFMove(rval));
</del><ins>+ list->append(lval.releaseNonNull());
+ list->append(WTFMove(rval));
</ins><span class="cx"> lval = WTFMove(list);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3852,13 +3800,13 @@
</span><span class="cx"> if (!parsedProperty[i])
</span><span class="cx"> addAnimationValue(values[i], cssValuePool.createImplicitInitialValue());
</span><span class="cx">
</span><del>- addProperty(shorthand.properties()[i], values[i].release(), important);
</del><ins>+ addProperty(shorthand.properties()[i], WTFMove(values[i]), important);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseColumnWidth()
</del><ins>+RefPtr<CSSPrimitiveValue> CSSParser::parseColumnWidth()
</ins><span class="cx"> {
</span><span class="cx"> ValueWithCalculation valueWithCalculation(*m_valueList->current());
</span><span class="cx"> CSSValueID id = valueWithCalculation.value().id;
</span><span class="lines">@@ -3866,12 +3814,12 @@
</span><span class="cx"> if (id != CSSValueAuto && !(validateUnit(valueWithCalculation, FLength | FNonNeg, CSSStrictMode) && parsedDouble(valueWithCalculation)))
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- RefPtr<CSSValue> parsedValue = parseValidPrimitive(id, valueWithCalculation);
</del><ins>+ auto parsedValue = parseValidPrimitive(id, valueWithCalculation);
</ins><span class="cx"> m_valueList->next();
</span><span class="cx"> return parsedValue;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseColumnCount()
</del><ins>+RefPtr<CSSPrimitiveValue> CSSParser::parseColumnCount()
</ins><span class="cx"> {
</span><span class="cx"> ValueWithCalculation valueWithCalculation(*m_valueList->current());
</span><span class="cx"> CSSValueID id = valueWithCalculation.value().id;
</span><span class="lines">@@ -3879,7 +3827,7 @@
</span><span class="cx"> if (id != CSSValueAuto && !validateUnit(valueWithCalculation, FPositiveInteger, CSSQuirksMode))
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- RefPtr<CSSValue> parsedValue = parseValidPrimitive(id, valueWithCalculation);
</del><ins>+ auto parsedValue = parseValidPrimitive(id, valueWithCalculation);
</ins><span class="cx"> m_valueList->next();
</span><span class="cx"> return parsedValue;
</span><span class="cx"> }
</span><span class="lines">@@ -3890,7 +3838,7 @@
</span><span class="cx"> RefPtr<CSSValue> columnCount;
</span><span class="cx"> bool hasPendingExplicitAuto = false;
</span><span class="cx">
</span><del>- for (unsigned propertiesParsed = 0; CSSParserValue* value = m_valueList->current(); propertiesParsed++) {
</del><ins>+ for (unsigned propertiesParsed = 0; CSSParserValue* value = m_valueList->current(); ++propertiesParsed) {
</ins><span class="cx"> if (propertiesParsed >= 2)
</span><span class="cx"> return false; // Too many values for this shorthand. Invalid declaration.
</span><span class="cx"> if (!propertiesParsed && value->id == CSSValueAuto) {
</span><span class="lines">@@ -3986,7 +3934,7 @@
</span><span class="cx">
</span><span class="cx"> // Now add all of the properties we found.
</span><span class="cx"> for (i = 0; i < numProperties; ++i)
</span><del>- addProperty(shorthand.properties()[i], values[i].release(), important);
</del><ins>+ addProperty(shorthand.properties()[i], WTFMove(values[i]), important);
</ins><span class="cx">
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4131,22 +4079,22 @@
</span><span class="cx"> if (!value)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- RefPtr<CSSValueList> parsedValues = CSSValueList::createSpaceSeparated();
</del><ins>+ auto parsedValues = CSSValueList::createSpaceSeparated();
</ins><span class="cx">
</span><span class="cx"> // First parameter.
</span><del>- SizeParameterType paramType = parseSizeParameter(*parsedValues, *value, None);
</del><ins>+ SizeParameterType paramType = parseSizeParameter(parsedValues, *value, None);
</ins><span class="cx"> if (paramType == None)
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> // Second parameter, if any.
</span><span class="cx"> value = m_valueList->next();
</span><span class="cx"> if (value) {
</span><del>- paramType = parseSizeParameter(*parsedValues, *value, paramType);
</del><ins>+ paramType = parseSizeParameter(parsedValues, *value, paramType);
</ins><span class="cx"> if (paramType == None)
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- addProperty(propId, parsedValues.release(), important);
</del><ins>+ addProperty(propId, WTFMove(parsedValues), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4198,7 +4146,7 @@
</span><span class="cx"> // inherit and none are handled in parseValue.
</span><span class="cx"> bool CSSParser::parseQuotes(CSSPropertyID propId, bool important)
</span><span class="cx"> {
</span><del>- RefPtr<CSSValueList> values = CSSValueList::createCommaSeparated();
</del><ins>+ auto values = CSSValueList::createCommaSeparated();
</ins><span class="cx"> while (CSSParserValue* value = m_valueList->current()) {
</span><span class="cx"> if (value->unit != CSSPrimitiveValue::CSS_STRING)
</span><span class="cx"> break;
</span><span class="lines">@@ -4206,7 +4154,7 @@
</span><span class="cx"> m_valueList->next();
</span><span class="cx"> }
</span><span class="cx"> if (values->length()) {
</span><del>- addProperty(propId, values.release(), important);
</del><ins>+ addProperty(propId, WTFMove(values), important);
</ins><span class="cx"> m_valueList->next();
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4229,7 +4177,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (parsedValue) {
</span><del>- addProperty(propID, parsedValue.release(), important);
</del><ins>+ addProperty(propID, parsedValue.releaseNonNull(), important);
</ins><span class="cx"> m_valueList->next();
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4253,14 +4201,14 @@
</span><span class="cx"> else if (id == CSSValueRevert)
</span><span class="cx"> value = cssValuePool.createRevertValue();
</span><span class="cx"> else {
</span><del>- RefPtr<CSSValueList> valueList = CSSValueList::createFromParserValueList(*m_valueList);
</del><ins>+ auto valueList = CSSValueList::createFromParserValueList(*m_valueList);
</ins><span class="cx"> if (m_valueList->containsVariables())
</span><del>- value = CSSVariableDependentValue::create(valueList, CSSPropertyCustom);
</del><ins>+ value = CSSVariableDependentValue::create(WTFMove(valueList), CSSPropertyCustom);
</ins><span class="cx"> else
</span><del>- value = valueList;
</del><ins>+ value = WTFMove(valueList);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- addProperty(CSSPropertyCustom, CSSCustomPropertyValue::create(m_customPropertyName, value), important, false);
</del><ins>+ addProperty(CSSPropertyCustom, CSSCustomPropertyValue::create(m_customPropertyName, value.releaseNonNull()), important, false);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4269,7 +4217,7 @@
</span><span class="cx"> // [ <string> | attr(X) | open-quote | close-quote | no-open-quote | no-close-quote ]+ | inherit
</span><span class="cx"> bool CSSParser::parseContent(CSSPropertyID propId, bool important)
</span><span class="cx"> {
</span><del>- RefPtr<CSSValueList> values = CSSValueList::createCommaSeparated();
</del><ins>+ auto values = CSSValueList::createCommaSeparated();
</ins><span class="cx">
</span><span class="cx"> while (CSSParserValue* value = m_valueList->current()) {
</span><span class="cx"> RefPtr<CSSValue> parsedValue;
</span><span class="lines">@@ -4335,7 +4283,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (values->length()) {
</span><del>- addProperty(propId, values.release(), important);
</del><ins>+ addProperty(propId, WTFMove(values), important);
</ins><span class="cx"> m_valueList->next();
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4343,7 +4291,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseAttr(CSSParserValueList& args)
</del><ins>+RefPtr<CSSPrimitiveValue> CSSParser::parseAttr(CSSParserValueList& args)
</ins><span class="cx"> {
</span><span class="cx"> if (args.size() != 1)
</span><span class="cx"> return nullptr;
</span><span class="lines">@@ -4368,7 +4316,7 @@
</span><span class="cx"> return CSSValuePool::singleton().createValue(String(argument.string), CSSPrimitiveValue::CSS_ATTR);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseBackgroundColor()
</del><ins>+RefPtr<CSSPrimitiveValue> CSSParser::parseBackgroundColor()
</ins><span class="cx"> {
</span><span class="cx"> CSSValueID id = m_valueList->current()->id;
</span><span class="cx"> if (id == CSSValueWebkitText || isValidSystemColorValue(id) || id == CSSValueMenu || id == CSSValueCurrentcolor
</span><span class="lines">@@ -4469,18 +4417,18 @@
</span><span class="cx"> return CSSValuePool::singleton().createValue(percent, CSSPrimitiveValue::CSS_PERCENTAGE);
</span><span class="cx"> }
</span><span class="cx"> ValueWithCalculation valueWithCalculation(*valueList.current());
</span><del>- if (validateUnit(valueWithCalculation, FPercent | FLength)) {
- if (!cumulativeFlags) {
- cumulativeFlags |= XFillPosition;
- individualFlag = XFillPosition;
- } else if (cumulativeFlags & (XFillPosition | AmbiguousFillPosition)) {
- cumulativeFlags |= YFillPosition;
- individualFlag = YFillPosition;
- } else
- return nullptr;
- return createPrimitiveNumericValue(valueWithCalculation);
- }
- return nullptr;
</del><ins>+ if (!validateUnit(valueWithCalculation, FPercent | FLength))
+ return nullptr;
+
+ if (!cumulativeFlags) {
+ cumulativeFlags |= XFillPosition;
+ individualFlag = XFillPosition;
+ } else if (cumulativeFlags & (XFillPosition | AmbiguousFillPosition)) {
+ cumulativeFlags |= YFillPosition;
+ individualFlag = YFillPosition;
+ } else
+ return nullptr;
+ return createPrimitiveNumericValue(valueWithCalculation);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static bool isValueConflictingWithCurrentEdge(int value1, int value2)
</span><span class="lines">@@ -4499,7 +4447,7 @@
</span><span class="cx"> return value == CSSValueLeft || value == CSSValueTop || value == CSSValueBottom || value == CSSValueRight || value == CSSValueCenter;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void CSSParser::parse4ValuesFillPosition(CSSParserValueList& valueList, RefPtr<CSSPrimitiveValue>& value1, RefPtr<CSSPrimitiveValue>& value2, RefPtr<CSSPrimitiveValue>&& parsedValue1, RefPtr<CSSPrimitiveValue>&& parsedValue2)
</del><ins>+void CSSParser::parse4ValuesFillPosition(CSSParserValueList& valueList, RefPtr<CSSPrimitiveValue>& value1, RefPtr<CSSPrimitiveValue>& value2, Ref<CSSPrimitiveValue>&& parsedValue1, Ref<CSSPrimitiveValue>&& parsedValue2)
</ins><span class="cx"> {
</span><span class="cx"> // [ left | right ] [ <percentage] | <length> ] && [ top | bottom ] [ <percentage> | <length> ]
</span><span class="cx"> // In the case of 4 values <position> requires the second value to be a length or a percentage.
</span><span class="lines">@@ -4508,7 +4456,7 @@
</span><span class="cx">
</span><span class="cx"> unsigned cumulativeFlags = 0;
</span><span class="cx"> FillPositionFlag value3Flag = InvalidFillPosition;
</span><del>- RefPtr<CSSPrimitiveValue> value3 = parseFillPositionComponent(valueList, cumulativeFlags, value3Flag, ResolveValuesAsKeyword);
</del><ins>+ auto value3 = parseFillPositionComponent(valueList, cumulativeFlags, value3Flag, ResolveValuesAsKeyword);
</ins><span class="cx"> if (!value3)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -4531,7 +4479,7 @@
</span><span class="cx">
</span><span class="cx"> cumulativeFlags = 0;
</span><span class="cx"> FillPositionFlag value4Flag = InvalidFillPosition;
</span><del>- RefPtr<CSSPrimitiveValue> value4 = parseFillPositionComponent(valueList, cumulativeFlags, value4Flag, ResolveValuesAsKeyword);
</del><ins>+ auto value4 = parseFillPositionComponent(valueList, cumulativeFlags, value4Flag, ResolveValuesAsKeyword);
</ins><span class="cx"> if (!value4)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -4540,7 +4488,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> value1 = createPrimitiveValuePair(WTFMove(parsedValue1), WTFMove(parsedValue2));
</span><del>- value2 = createPrimitiveValuePair(value3.copyRef(), value4.copyRef());
</del><ins>+ value2 = createPrimitiveValuePair(value3.releaseNonNull(), value4.releaseNonNull());
</ins><span class="cx">
</span><span class="cx"> if (ident1 == CSSValueTop || ident1 == CSSValueBottom)
</span><span class="cx"> value1.swap(value2);
</span><span class="lines">@@ -4548,11 +4496,11 @@
</span><span class="cx"> valueList.next();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void CSSParser::parse3ValuesFillPosition(CSSParserValueList& valueList, RefPtr<CSSPrimitiveValue>& value1, RefPtr<CSSPrimitiveValue>& value2, RefPtr<CSSPrimitiveValue>&& parsedValue1, RefPtr<CSSPrimitiveValue>&& parsedValue2)
</del><ins>+void CSSParser::parse3ValuesFillPosition(CSSParserValueList& valueList, RefPtr<CSSPrimitiveValue>& value1, RefPtr<CSSPrimitiveValue>& value2, Ref<CSSPrimitiveValue>&& parsedValue1, Ref<CSSPrimitiveValue>&& parsedValue2)
</ins><span class="cx"> {
</span><span class="cx"> unsigned cumulativeFlags = 0;
</span><span class="cx"> FillPositionFlag value3Flag = InvalidFillPosition;
</span><del>- RefPtr<CSSPrimitiveValue> value3 = parseFillPositionComponent(valueList, cumulativeFlags, value3Flag, ResolveValuesAsKeyword);
</del><ins>+ auto value3 = parseFillPositionComponent(valueList, cumulativeFlags, value3Flag, ResolveValuesAsKeyword);
</ins><span class="cx">
</span><span class="cx"> // value3 is not an expected value, we return.
</span><span class="cx"> if (!value3)
</span><span class="lines">@@ -4615,7 +4563,7 @@
</span><span class="cx"> if (!isFillPositionKeyword(ident3))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- firstPositionValue = parsedValue2;
</del><ins>+ firstPositionValue = parsedValue2.ptr();
</ins><span class="cx"> secondPositionKeyword = ident3;
</span><span class="cx"> secondPositionValue = cssValuePool.createValue(0, CSSPrimitiveValue::CSS_PERCENTAGE);
</span><span class="cx"> }
</span><span class="lines">@@ -4623,8 +4571,8 @@
</span><span class="cx"> if (isValueConflictingWithCurrentEdge(ident1, secondPositionKeyword))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- value1 = createPrimitiveValuePair(WTFMove(parsedValue1), firstPositionValue.copyRef());
- value2 = createPrimitiveValuePair(cssValuePool.createIdentifierValue(secondPositionKeyword), secondPositionValue.copyRef());
</del><ins>+ value1 = createPrimitiveValuePair(WTFMove(parsedValue1), firstPositionValue.releaseNonNull());
+ value2 = createPrimitiveValuePair(cssValuePool.createIdentifierValue(secondPositionKeyword), secondPositionValue.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (ident1 == CSSValueTop || ident1 == CSSValueBottom || swapNeeded)
</span><span class="lines">@@ -4695,12 +4643,9 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RefPtr<CSSPrimitiveValue> parsedValue1 = value1;
- RefPtr<CSSPrimitiveValue> parsedValue2 = value2;
</del><ins>+ auto parsedValue1 = value1.releaseNonNull();
+ auto parsedValue2 = value2.releaseNonNull();
</ins><span class="cx">
</span><del>- value1 = nullptr;
- value2 = nullptr;
-
</del><span class="cx"> // Per CSS3 syntax, <position> can't have 'center' as its second keyword as we have more arguments to follow.
</span><span class="cx"> if (parsedValue2->getValueID() == CSSValueCenter)
</span><span class="cx"> return;
</span><span class="lines">@@ -4796,7 +4741,7 @@
</span><span class="cx"> value2 = CSSValuePool::singleton().createIdentifierValue(downcast<CSSPrimitiveValue>(*value1).getValueID());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseFillSize(CSSPropertyID propId, bool& allowComma)
</del><ins>+RefPtr<CSSPrimitiveValue> CSSParser::parseFillSize(CSSPropertyID propId, bool& allowComma)
</ins><span class="cx"> {
</span><span class="cx"> allowComma = true;
</span><span class="cx"> CSSParserValue* value = m_valueList->current();
</span><span class="lines">@@ -4838,7 +4783,7 @@
</span><span class="cx">
</span><span class="cx"> if (!parsedValue2)
</span><span class="cx"> return parsedValue1;
</span><del>- return createPrimitiveValuePair(WTFMove(parsedValue1), WTFMove(parsedValue2), propId == CSSPropertyWebkitBackgroundSize ? Pair::IdenticalValueEncoding::Coalesce : Pair::IdenticalValueEncoding::DoNotCoalesce);
</del><ins>+ return createPrimitiveValuePair(parsedValue1.releaseNonNull(), parsedValue2.releaseNonNull(), propId == CSSPropertyWebkitBackgroundSize ? Pair::IdenticalValueEncoding::Coalesce : Pair::IdenticalValueEncoding::DoNotCoalesce);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseFillProperty(CSSPropertyID propId, CSSPropertyID& propId1, CSSPropertyID& propId2,
</span><span class="lines">@@ -4926,8 +4871,8 @@
</span><span class="cx"> RefPtr<CSSPrimitiveValue> value1;
</span><span class="cx"> RefPtr<CSSPrimitiveValue> value2;
</span><span class="cx"> parseFillPosition(*m_valueList, value1, value2);
</span><del>- currValue = value1;
- currValue2 = value2;
</del><ins>+ currValue = WTFMove(value1);
+ currValue2 = WTFMove(value2);
</ins><span class="cx"> // parseFillPosition advances the m_valueList pointer.
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -5031,7 +4976,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseAnimationDelay()
</del><ins>+RefPtr<CSSPrimitiveValue> CSSParser::parseAnimationDelay()
</ins><span class="cx"> {
</span><span class="cx"> ValueWithCalculation valueWithCalculation(*m_valueList->current());
</span><span class="cx"> if (validateUnit(valueWithCalculation, FTime))
</span><span class="lines">@@ -5039,7 +4984,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseAnimationDirection()
</del><ins>+RefPtr<CSSPrimitiveValue> CSSParser::parseAnimationDirection()
</ins><span class="cx"> {
</span><span class="cx"> CSSParserValue* value = m_valueList->current();
</span><span class="cx"> if (value->id == CSSValueNormal || value->id == CSSValueAlternate || value->id == CSSValueReverse || value->id == CSSValueAlternateReverse)
</span><span class="lines">@@ -5047,7 +4992,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseAnimationDuration()
</del><ins>+RefPtr<CSSPrimitiveValue> CSSParser::parseAnimationDuration()
</ins><span class="cx"> {
</span><span class="cx"> ValueWithCalculation valueWithCalculation(*m_valueList->current());
</span><span class="cx"> if (validateUnit(valueWithCalculation, FTime | FNonNeg))
</span><span class="lines">@@ -5055,7 +5000,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseAnimationFillMode()
</del><ins>+RefPtr<CSSPrimitiveValue> CSSParser::parseAnimationFillMode()
</ins><span class="cx"> {
</span><span class="cx"> CSSParserValue* value = m_valueList->current();
</span><span class="cx"> if (value->id == CSSValueNone || value->id == CSSValueForwards || value->id == CSSValueBackwards || value->id == CSSValueBoth)
</span><span class="lines">@@ -5063,7 +5008,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseAnimationIterationCount()
</del><ins>+RefPtr<CSSPrimitiveValue> CSSParser::parseAnimationIterationCount()
</ins><span class="cx"> {
</span><span class="cx"> CSSParserValue& value = *m_valueList->current();
</span><span class="cx"> if (value.id == CSSValueInfinite)
</span><span class="lines">@@ -5074,7 +5019,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseAnimationName()
</del><ins>+RefPtr<CSSPrimitiveValue> CSSParser::parseAnimationName()
</ins><span class="cx"> {
</span><span class="cx"> CSSParserValue& value = *m_valueList->current();
</span><span class="cx"> if (value.unit == CSSPrimitiveValue::CSS_STRING || value.unit == CSSPrimitiveValue::CSS_IDENT) {
</span><span class="lines">@@ -5086,7 +5031,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseAnimationPlayState()
</del><ins>+RefPtr<CSSPrimitiveValue> CSSParser::parseAnimationPlayState()
</ins><span class="cx"> {
</span><span class="cx"> CSSParserValue& value = *m_valueList->current();
</span><span class="cx"> if (value.id == CSSValueRunning || value.id == CSSValuePaused)
</span><span class="lines">@@ -5115,7 +5060,7 @@
</span><span class="cx"> if (!validateUnit(firstArgumentWithCalculation, FLength))
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- Ref<CSSValue> startValue = createPrimitiveNumericValue(firstArgumentWithCalculation);
</del><ins>+ auto startValue = createPrimitiveNumericValue(firstArgumentWithCalculation);
</ins><span class="cx">
</span><span class="cx"> argument = args->next();
</span><span class="cx">
</span><span class="lines">@@ -5130,7 +5075,7 @@
</span><span class="cx"> if (!validateUnit(secondArgumentWithCalculation, FLength))
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- Ref<CSSValue> endValue = createPrimitiveNumericValue(secondArgumentWithCalculation);
</del><ins>+ auto endValue = createPrimitiveNumericValue(secondArgumentWithCalculation);
</ins><span class="cx">
</span><span class="cx"> return CSSAnimationTriggerScrollValue::create(WTFMove(startValue), WTFMove(endValue));
</span><span class="cx"> }
</span><span class="lines">@@ -5139,7 +5084,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseAnimationProperty(AnimationParseContext& context)
</del><ins>+RefPtr<CSSPrimitiveValue> CSSParser::parseAnimationProperty(AnimationParseContext& context)
</ins><span class="cx"> {
</span><span class="cx"> CSSParserValue& value = *m_valueList->current();
</span><span class="cx"> if (value.unit != CSSPrimitiveValue::CSS_IDENT)
</span><span class="lines">@@ -5165,6 +5110,7 @@
</span><span class="cx"> Vector<String> strings;
</span><span class="cx"> selector.split(',', strings);
</span><span class="cx">
</span><ins>+ keys.reserveInitialCapacity(strings.size());
</ins><span class="cx"> for (size_t i = 0; i < strings.size(); ++i) {
</span><span class="cx"> double key = -1;
</span><span class="cx"> String cur = strings[i].stripWhiteSpace();
</span><span class="lines">@@ -5183,7 +5129,7 @@
</span><span class="cx"> keys.clear();
</span><span class="cx"> break;
</span><span class="cx"> }
</span><del>- keys.append(key);
</del><ins>+ keys.uncheckedAppend(key);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return keys;
</span><span class="lines">@@ -5507,7 +5453,7 @@
</span><span class="cx"> if (gridLineName && !numericValue && !hasSeenSpanKeyword)
</span><span class="cx"> return CSSValuePool::singleton().createValue(gridLineName->getStringValue(), CSSPrimitiveValue::CSS_STRING);
</span><span class="cx">
</span><del>- RefPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
</del><ins>+ auto values = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> if (hasSeenSpanKeyword)
</span><span class="cx"> values->append(CSSValuePool::singleton().createIdentifierValue(CSSValueSpan));
</span><span class="cx"> if (numericValue)
</span><span class="lines">@@ -5515,13 +5461,13 @@
</span><span class="cx"> if (gridLineName)
</span><span class="cx"> values->append(gridLineName.releaseNonNull());
</span><span class="cx"> ASSERT(values->length());
</span><del>- return values;
</del><ins>+ return WTFMove(values);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-static RefPtr<CSSValue> gridMissingGridPositionValue(CSSValue& value)
</del><ins>+static Ref<CSSValue> gridMissingGridPositionValue(CSSValue& value)
</ins><span class="cx"> {
</span><span class="cx"> if (is<CSSPrimitiveValue>(value) && downcast<CSSPrimitiveValue>(value).isString())
</span><del>- return &value;
</del><ins>+ return value;
</ins><span class="cx">
</span><span class="cx"> return CSSValuePool::singleton().createIdentifierValue(CSSValueAuto);
</span><span class="cx"> }
</span><span class="lines">@@ -5552,8 +5498,8 @@
</span><span class="cx"> } else
</span><span class="cx"> endValue = gridMissingGridPositionValue(*startValue);
</span><span class="cx">
</span><del>- addProperty(shorthand.properties()[0], WTFMove(startValue), important);
- addProperty(shorthand.properties()[1], WTFMove(endValue), important);
</del><ins>+ addProperty(shorthand.properties()[0], startValue.releaseNonNull(), important);
+ addProperty(shorthand.properties()[1], endValue.releaseNonNull(), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -5572,12 +5518,12 @@
</span><span class="cx"> if (!validateUnit(rowValueWithCalculation, FLength | FNonNeg))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- RefPtr<CSSPrimitiveValue> rowGap = createPrimitiveNumericValue(rowValueWithCalculation);
</del><ins>+ auto rowGap = createPrimitiveNumericValue(rowValueWithCalculation);
</ins><span class="cx">
</span><span class="cx"> value = m_valueList->next();
</span><span class="cx"> if (!value) {
</span><del>- addProperty(CSSPropertyGridColumnGap, rowGap, important);
- addProperty(CSSPropertyGridRowGap, rowGap, important);
</del><ins>+ addProperty(CSSPropertyGridColumnGap, rowGap.copyRef(), important);
+ addProperty(CSSPropertyGridRowGap, WTFMove(rowGap), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -5588,10 +5534,10 @@
</span><span class="cx"> if (m_valueList->next())
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- RefPtr<CSSPrimitiveValue> columnGap = createPrimitiveNumericValue(columnValueWithCalculation);
</del><ins>+ auto columnGap = createPrimitiveNumericValue(columnValueWithCalculation);
</ins><span class="cx">
</span><del>- addProperty(CSSPropertyGridRowGap, rowGap, important);
- addProperty(CSSPropertyGridColumnGap, columnGap, important);
</del><ins>+ addProperty(CSSPropertyGridRowGap, WTFMove(rowGap), important);
+ addProperty(CSSPropertyGridColumnGap, WTFMove(columnGap), important);
</ins><span class="cx">
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -5623,16 +5569,16 @@
</span><span class="cx"> unsigned rowCount = 0;
</span><span class="cx"> unsigned columnCount = 0;
</span><span class="cx"> bool trailingIdentWasAdded = false;
</span><del>- RefPtr<CSSValueList> templateRows = CSSValueList::createSpaceSeparated();
</del><ins>+ auto templateRows = CSSValueList::createSpaceSeparated();
</ins><span class="cx">
</span><span class="cx"> while (m_valueList->current() && !isForwardSlashOperator(*m_valueList->current())) {
</span><span class="cx"> // Handle leading <custom-ident>*.
</span><span class="cx"> if (m_valueList->current()->unit == CSSParserValue::ValueList) {
</span><span class="cx"> if (trailingIdentWasAdded) {
</span><span class="cx"> // A row's trailing ident must be concatenated with the next row's leading one.
</span><del>- parseGridLineNames(*m_valueList, *templateRows, downcast<CSSGridLineNamesValue>(templateRows->item(templateRows->length() - 1)));
</del><ins>+ parseGridLineNames(*m_valueList, templateRows, downcast<CSSGridLineNamesValue>(templateRows->item(templateRows->length() - 1)));
</ins><span class="cx"> } else
</span><del>- parseGridLineNames(*m_valueList, *templateRows);
</del><ins>+ parseGridLineNames(*m_valueList, templateRows);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Handle a template-area's row.
</span><span class="lines">@@ -5652,11 +5598,11 @@
</span><span class="cx"> // This will handle the trailing/leading <custom-ident>* in the grammar.
</span><span class="cx"> trailingIdentWasAdded = false;
</span><span class="cx"> if (m_valueList->current() && m_valueList->current()->unit == CSSParserValue::ValueList)
</span><del>- trailingIdentWasAdded = parseGridLineNames(*m_valueList, *templateRows);
</del><ins>+ trailingIdentWasAdded = parseGridLineNames(*m_valueList, templateRows);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // [<track-list> /]?
</span><del>- RefPtr<CSSValue> templateColumns = nullptr;
</del><ins>+ RefPtr<CSSValue> templateColumns;
</ins><span class="cx"> if (m_valueList->current()) {
</span><span class="cx"> ASSERT(isForwardSlashOperator(*m_valueList->current()));
</span><span class="cx"> templateColumns = parseGridTemplateColumns();
</span><span class="lines">@@ -5667,12 +5613,13 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- addProperty(CSSPropertyGridTemplateRows, templateRows.release(), important);
- addProperty(CSSPropertyGridTemplateColumns, templateColumns ? templateColumns.release() : CSSValuePool::singleton().createIdentifierValue(CSSValueNone), important);
</del><ins>+ addProperty(CSSPropertyGridTemplateRows, WTFMove(templateRows), important);
+ if (templateColumns)
+ addProperty(CSSPropertyGridTemplateColumns, templateColumns.releaseNonNull(), important);
+ else
+ addProperty(CSSPropertyGridTemplateColumns, CSSValuePool::singleton().createIdentifierValue(CSSValueNone), important);
+ addProperty(CSSPropertyGridTemplateAreas, CSSGridTemplateAreasValue::create(gridAreaMap, rowCount, columnCount), important);
</ins><span class="cx">
</span><del>- RefPtr<CSSValue> templateAreas = CSSGridTemplateAreasValue::create(gridAreaMap, rowCount, columnCount);
- addProperty(CSSPropertyGridTemplateAreas, templateAreas.release(), important);
-
</del><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -5709,8 +5656,8 @@
</span><span class="cx"> if (!columnsValue)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- addProperty(CSSPropertyGridTemplateColumns, columnsValue.release(), important);
- addProperty(CSSPropertyGridTemplateRows, rowsValue.release(), important);
</del><ins>+ addProperty(CSSPropertyGridTemplateColumns, columnsValue.releaseNonNull(), important);
+ addProperty(CSSPropertyGridTemplateRows, rowsValue.releaseNonNull(), important);
</ins><span class="cx"> addProperty(CSSPropertyGridTemplateAreas, CSSValuePool::singleton().createIdentifierValue(CSSValueNone), important);
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -5774,8 +5721,8 @@
</span><span class="cx"> if (!autoColumnsValue)
</span><span class="cx"> autoColumnsValue = autoRowsValue;
</span><span class="cx">
</span><del>- addProperty(CSSPropertyGridAutoColumns, autoColumnsValue.release(), important);
- addProperty(CSSPropertyGridAutoRows, autoRowsValue.release(), important);
</del><ins>+ addProperty(CSSPropertyGridAutoColumns, autoColumnsValue.releaseNonNull(), important);
+ addProperty(CSSPropertyGridAutoRows, autoRowsValue.releaseNonNull(), important);
</ins><span class="cx">
</span><span class="cx"> // It can only be specified the explicit or the implicit grid properties in a single grid declaration.
</span><span class="cx"> // The sub-properties not specified are set to their initial value, as normal for shorthands.
</span><span class="lines">@@ -5820,10 +5767,10 @@
</span><span class="cx"> if (!columnEndValue)
</span><span class="cx"> columnEndValue = gridMissingGridPositionValue(*columnStartValue);
</span><span class="cx">
</span><del>- addProperty(CSSPropertyGridRowStart, WTFMove(rowStartValue), important);
- addProperty(CSSPropertyGridColumnStart, WTFMove(columnStartValue), important);
- addProperty(CSSPropertyGridRowEnd, WTFMove(rowEndValue), important);
- addProperty(CSSPropertyGridColumnEnd, WTFMove(columnEndValue), important);
</del><ins>+ addProperty(CSSPropertyGridRowStart, rowStartValue.releaseNonNull(), important);
+ addProperty(CSSPropertyGridColumnStart, columnStartValue.releaseNonNull(), important);
+ addProperty(CSSPropertyGridRowEnd, rowEndValue.releaseNonNull(), important);
+ addProperty(CSSPropertyGridColumnEnd, columnEndValue.releaseNonNull(), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -5857,18 +5804,14 @@
</span><span class="cx">
</span><span class="cx"> // Need to ensure the identList is at the heading index, since the parserList might have been rewound.
</span><span class="cx"> identList.setCurrentIndex(0);
</span><del>- RefPtr<CSSGridLineNamesValue> lineNames;
- if (previousNamedAreaTrailingLineNames)
- lineNames = previousNamedAreaTrailingLineNames;
- else
- lineNames = CSSGridLineNamesValue::create();
</del><ins>+ Ref<CSSGridLineNamesValue> lineNames = previousNamedAreaTrailingLineNames ? Ref<CSSGridLineNamesValue>(*previousNamedAreaTrailingLineNames) : CSSGridLineNamesValue::create();
</ins><span class="cx"> while (CSSParserValue* identValue = identList.current()) {
</span><span class="cx"> ASSERT(identValue->unit == CSSPrimitiveValue::CSS_IDENT);
</span><span class="cx"> lineNames->append(createPrimitiveStringValue(*identValue));
</span><span class="cx"> identList.next();
</span><span class="cx"> }
</span><span class="cx"> if (!previousNamedAreaTrailingLineNames)
</span><del>- valueList.append(lineNames.releaseNonNull());
</del><ins>+ valueList.append(WTFMove(lineNames));
</ins><span class="cx">
</span><span class="cx"> inputList.next();
</span><span class="cx"> return true;
</span><span class="lines">@@ -5906,11 +5849,11 @@
</span><span class="cx"> return CSSValuePool::singleton().createIdentifierValue(CSSValueNone);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RefPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
</del><ins>+ auto values = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> // Handle leading <custom-ident>*.
</span><span class="cx"> value = m_valueList->current();
</span><span class="cx"> if (value && value->unit == CSSParserValue::ValueList)
</span><del>- parseGridLineNames(*m_valueList, *values);
</del><ins>+ parseGridLineNames(*m_valueList, values);
</ins><span class="cx">
</span><span class="cx"> bool seenTrackSizeOrRepeatFunction = false;
</span><span class="cx"> bool seenAutoRepeat = false;
</span><span class="lines">@@ -5919,7 +5862,7 @@
</span><span class="cx"> break;
</span><span class="cx"> if (currentValue->unit == CSSParserValue::Function && equalLettersIgnoringASCIICase(currentValue->function->name, "repeat(")) {
</span><span class="cx"> bool isAutoRepeat;
</span><del>- if (!parseGridTrackRepeatFunction(*values, isAutoRepeat))
</del><ins>+ if (!parseGridTrackRepeatFunction(values, isAutoRepeat))
</ins><span class="cx"> return nullptr;
</span><span class="cx"> if (isAutoRepeat && seenAutoRepeat)
</span><span class="cx"> return nullptr;
</span><span class="lines">@@ -5935,7 +5878,7 @@
</span><span class="cx"> // This will handle the trailing <custom-ident>* in the grammar.
</span><span class="cx"> value = m_valueList->current();
</span><span class="cx"> if (value && value->unit == CSSParserValue::ValueList)
</span><del>- parseGridLineNames(*m_valueList, *values);
</del><ins>+ parseGridLineNames(*m_valueList, values);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!seenTrackSizeOrRepeatFunction)
</span><span class="lines">@@ -5943,10 +5886,10 @@
</span><span class="cx">
</span><span class="cx"> // <auto-repeat> requires definite minimum track sizes in order to compute the number of repetitions.
</span><span class="cx"> // The above while loop detects those appearances after the <auto-repeat> but not the ones before.
</span><del>- if (seenAutoRepeat && !allTracksAreFixedSized(*values))
</del><ins>+ if (seenAutoRepeat && !allTracksAreFixedSized(values))
</ins><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- return values;
</del><ins>+ return WTFMove(values);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseGridTrackRepeatFunction(CSSValueList& list, bool& isAutoRepeat)
</span><span class="lines">@@ -5969,14 +5912,14 @@
</span><span class="cx"> // because it will be computed later, let's set it to 1.
</span><span class="cx"> unsigned repetitions = isAutoRepeat ? 1 : clampTo<unsigned>(parsedDouble(firstValueWithCalculation), 0, kGridMaxTracks);
</span><span class="cx">
</span><del>- RefPtr<CSSValueList> repeatedValues = isAutoRepeat ? CSSGridAutoRepeatValue::create(firstValueID).get() : CSSValueList::createSpaceSeparated();
</del><ins>+ Ref<CSSValueList> repeatedValues = isAutoRepeat ? Ref<CSSValueList>(CSSGridAutoRepeatValue::create(firstValueID)) : CSSValueList::createSpaceSeparated();
</ins><span class="cx"> arguments->next(); // Skip the repetition count.
</span><span class="cx"> arguments->next(); // Skip the comma.
</span><span class="cx">
</span><span class="cx"> // Handle leading <custom-ident>*.
</span><span class="cx"> CSSParserValue* currentValue = arguments->current();
</span><span class="cx"> if (currentValue && currentValue->unit == CSSParserValue::ValueList)
</span><del>- parseGridLineNames(*arguments, *repeatedValues);
</del><ins>+ parseGridLineNames(*arguments, repeatedValues);
</ins><span class="cx">
</span><span class="cx"> unsigned numberOfTracks = 0;
</span><span class="cx"> TrackSizeRestriction restriction = isAutoRepeat ? FixedSizeOnly : AllowAll;
</span><span class="lines">@@ -5994,7 +5937,7 @@
</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="cx"> if (currentValue && currentValue->unit == CSSParserValue::ValueList)
</span><del>- parseGridLineNames(*arguments, *repeatedValues);
</del><ins>+ parseGridLineNames(*arguments, repeatedValues);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // We should have found at least one <track-size>, otherwise the declaration is invalid.
</span><span class="lines">@@ -6006,7 +5949,7 @@
</span><span class="cx"> repetitions = std::min(repetitions, kGridMaxTracks / numberOfTracks);
</span><span class="cx">
</span><span class="cx"> if (isAutoRepeat)
</span><del>- list.append(*repeatedValues);
</del><ins>+ list.append(WTFMove(repeatedValues));
</ins><span class="cx"> else {
</span><span class="cx"> for (unsigned i = 0; i < repetitions; ++i) {
</span><span class="cx"> for (unsigned j = 0; j < repeatedValues->length(); ++j)
</span><span class="lines">@@ -6042,10 +5985,10 @@
</span><span class="cx"> if (!maxTrackBreadth)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- RefPtr<CSSValueList> parsedArguments = CSSValueList::createCommaSeparated();
</del><ins>+ auto parsedArguments = CSSValueList::createCommaSeparated();
</ins><span class="cx"> parsedArguments->append(minTrackBreadth.releaseNonNull());
</span><span class="cx"> parsedArguments->append(maxTrackBreadth.releaseNonNull());
</span><del>- return CSSFunctionValue::create("minmax(", parsedArguments);
</del><ins>+ return CSSFunctionValue::create("minmax(", WTFMove(parsedArguments));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return parseGridBreadth(currentValue, restriction);
</span><span class="lines">@@ -6095,7 +6038,7 @@
</span><span class="cx"> if (!value)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- RefPtr<CSSValueList> parsedValues = CSSValueList::createSpaceSeparated();
</del><ins>+ auto parsedValues = CSSValueList::createSpaceSeparated();
</ins><span class="cx">
</span><span class="cx"> // First parameter.
</span><span class="cx"> CSSValueID firstId = value->id;
</span><span class="lines">@@ -6110,7 +6053,7 @@
</span><span class="cx"> parsedValues->append(CSSValuePool::singleton().createIdentifierValue(CSSValueRow));
</span><span class="cx">
</span><span class="cx"> parsedValues->append(CSSValuePool::singleton().createIdentifierValue(firstId));
</span><del>- return parsedValues;
</del><ins>+ return WTFMove(parsedValues);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> switch (firstId) {
</span><span class="lines">@@ -6134,19 +6077,18 @@
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return parsedValues;
</del><ins>+ return WTFMove(parsedValues);
</ins><span class="cx"> }
</span><span class="cx"> #endif /* ENABLE(CSS_GRID_LAYOUT) */
</span><span class="cx">
</span><span class="cx"> #if ENABLE(DASHBOARD_SUPPORT)
</span><span class="cx">
</span><del>-#define DASHBOARD_REGION_NUM_PARAMETERS 6
-#define DASHBOARD_REGION_SHORT_NUM_PARAMETERS 2
</del><ins>+static const int dashboardRegionParameterCount = 6;
+static const int dashboardRegionShortParameterCount = 2;
</ins><span class="cx">
</span><span class="cx"> static CSSParserValue* skipCommaInDashboardRegion(CSSParserValueList *args)
</span><span class="cx"> {
</span><del>- if (args->size() == (DASHBOARD_REGION_NUM_PARAMETERS*2-1) ||
- args->size() == (DASHBOARD_REGION_SHORT_NUM_PARAMETERS*2-1)) {
</del><ins>+ if (args->size() == (dashboardRegionParameterCount * 2 - 1) || args->size() == (dashboardRegionShortParameterCount * 2 - 1)) {
</ins><span class="cx"> CSSParserValue& current = *args->current();
</span><span class="cx"> if (current.unit == CSSParserValue::Operator && current.iValue == ',')
</span><span class="cx"> return args->next();
</span><span class="lines">@@ -6197,8 +6139,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> int numArgs = args->size();
</span><del>- if ((numArgs != DASHBOARD_REGION_NUM_PARAMETERS && numArgs != (DASHBOARD_REGION_NUM_PARAMETERS*2-1)) &&
- (numArgs != DASHBOARD_REGION_SHORT_NUM_PARAMETERS && numArgs != (DASHBOARD_REGION_SHORT_NUM_PARAMETERS*2-1))) {
</del><ins>+ if ((numArgs != dashboardRegionParameterCount && numArgs != (dashboardRegionParameterCount*2-1))
+ && (numArgs != dashboardRegionShortParameterCount && numArgs != (dashboardRegionShortParameterCount*2-1))) {
</ins><span class="cx"> valid = false;
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -6231,7 +6173,7 @@
</span><span class="cx">
</span><span class="cx"> region->m_geometryType = arg->string;
</span><span class="cx">
</span><del>- if (numArgs == DASHBOARD_REGION_SHORT_NUM_PARAMETERS || numArgs == (DASHBOARD_REGION_SHORT_NUM_PARAMETERS*2-1)) {
</del><ins>+ if (numArgs == dashboardRegionShortParameterCount || numArgs == (dashboardRegionShortParameterCount*2-1)) {
</ins><span class="cx"> // This originally used CSSValueInvalid by accident. It might be more logical to use something else.
</span><span class="cx"> RefPtr<CSSPrimitiveValue> amount = CSSValuePool::singleton().createIdentifierValue(CSSValueInvalid);
</span><span class="cx">
</span><span class="lines">@@ -6290,19 +6232,19 @@
</span><span class="cx"> if (text[index] != ' ' && text[index] != '.') {
</span><span class="cx"> unsigned gridAreaStart = index;
</span><span class="cx"> while (index < length && text[index] != ' ' && text[index] != '.')
</span><del>- index++;
</del><ins>+ ++index;
</ins><span class="cx"> columnNames.append(text.substring(gridAreaStart, index - gridAreaStart));
</span><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (text[index] == '.') {
</span><span class="cx"> while (index < length && text[index] == '.')
</span><del>- index++;
</del><ins>+ ++index;
</ins><span class="cx"> columnNames.append(".");
</span><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- index++;
</del><ins>+ ++index;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return columnNames;
</span><span class="lines">@@ -6397,7 +6339,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif /* ENABLE(CSS_GRID_LAYOUT) */
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseCounterContent(CSSParserValueList& args, bool counters)
</del><ins>+RefPtr<CSSPrimitiveValue> CSSParser::parseCounterContent(CSSParserValueList& args, bool counters)
</ins><span class="cx"> {
</span><span class="cx"> unsigned numArgs = args.size();
</span><span class="cx"> if (counters && numArgs != 3 && numArgs != 5)
</span><span class="lines">@@ -6408,7 +6350,7 @@
</span><span class="cx"> CSSParserValue* argument = args.current();
</span><span class="cx"> if (argument->unit != CSSPrimitiveValue::CSS_IDENT)
</span><span class="cx"> return nullptr;
</span><del>- RefPtr<CSSPrimitiveValue> identifier = createPrimitiveStringValue(*argument);
</del><ins>+ auto identifier = createPrimitiveStringValue(*argument);
</ins><span class="cx">
</span><span class="cx"> RefPtr<CSSPrimitiveValue> separator;
</span><span class="cx"> if (!counters)
</span><span class="lines">@@ -6446,7 +6388,7 @@
</span><span class="cx"> listStyle = CSSValuePool::singleton().createIdentifierValue(listStyleID);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return CSSValuePool::singleton().createValue(Counter::create(identifier.release(), listStyle.release(), separator.release()));
</del><ins>+ return CSSValuePool::singleton().createValue(Counter::create(WTFMove(identifier), listStyle.releaseNonNull(), separator.releaseNonNull()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseClipShape(CSSPropertyID propId, bool important)
</span><span class="lines">@@ -6469,7 +6411,7 @@
</span><span class="cx"> valid = argument->id == CSSValueAuto || validateUnit(argumentWithCalculation, FLength);
</span><span class="cx"> if (!valid)
</span><span class="cx"> break;
</span><del>- RefPtr<CSSPrimitiveValue> length = argument->id == CSSValueAuto ? CSSValuePool::singleton().createIdentifierValue(CSSValueAuto) : createPrimitiveNumericValue(argumentWithCalculation);
</del><ins>+ Ref<CSSPrimitiveValue> length = argument->id == CSSValueAuto ? CSSValuePool::singleton().createIdentifierValue(CSSValueAuto) : createPrimitiveNumericValue(argumentWithCalculation);
</ins><span class="cx"> if (i == 0)
</span><span class="cx"> rect->setTop(WTFMove(length));
</span><span class="cx"> else if (i == 1)
</span><span class="lines">@@ -6511,7 +6453,7 @@
</span><span class="cx">
</span><span class="cx"> // FIXME: This should be refactored with CSSParser::parseBorderRadius.
</span><span class="cx"> // CSSParser::parseBorderRadius contains support for some legacy radius construction.
</span><del>-RefPtr<CSSBasicShape> CSSParser::parseInsetRoundedCorners(RefPtr<CSSBasicShapeInset>&& shape, CSSParserValueList& args)
</del><ins>+RefPtr<CSSBasicShapeInset> CSSParser::parseInsetRoundedCorners(Ref<CSSBasicShapeInset>&& shape, CSSParserValueList& args)
</ins><span class="cx"> {
</span><span class="cx"> CSSParserValue* argument = args.next();
</span><span class="cx">
</span><span class="lines">@@ -6552,10 +6494,10 @@
</span><span class="cx"> if (!validateUnit(valueWithCalculation, FLength | FPercent | FNonNeg))
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- RefPtr<CSSPrimitiveValue> radius = createPrimitiveNumericValue(valueWithCalculation);
</del><ins>+ auto radius = createPrimitiveNumericValue(valueWithCalculation);
</ins><span class="cx">
</span><span class="cx"> if (!indexAfterSlash)
</span><del>- radii[0][i] = radius;
</del><ins>+ radii[0][i] = WTFMove(radius);
</ins><span class="cx"> else
</span><span class="cx"> radii[1][i - indexAfterSlash] = WTFMove(radius);
</span><span class="cx"> }
</span><span class="lines">@@ -6572,15 +6514,15 @@
</span><span class="cx"> shape->setBottomRightRadius(createPrimitiveValuePair(WTFMove(radii[0][2]), WTFMove(radii[1][2])));
</span><span class="cx"> shape->setBottomLeftRadius(createPrimitiveValuePair(WTFMove(radii[0][3]), WTFMove(radii[1][3])));
</span><span class="cx">
</span><del>- return shape;
</del><ins>+ return WTFMove(shape);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSBasicShape> CSSParser::parseBasicShapeInset(CSSParserValueList& args)
</del><ins>+RefPtr<CSSBasicShapeInset> CSSParser::parseBasicShapeInset(CSSParserValueList& args)
</ins><span class="cx"> {
</span><del>- RefPtr<CSSBasicShapeInset> shape = CSSBasicShapeInset::create();
</del><ins>+ auto shape = CSSBasicShapeInset::create();
</ins><span class="cx">
</span><span class="cx"> CSSParserValue* argument = args.current();
</span><del>- Vector<RefPtr<CSSPrimitiveValue> > widthArguments;
</del><ins>+ Vector<Ref<CSSPrimitiveValue> > widthArguments;
</ins><span class="cx"> bool hasRoundedInset = false;
</span><span class="cx"> while (argument) {
</span><span class="cx"> if (argument->unit == CSSPrimitiveValue::CSS_IDENT && equalLettersIgnoringASCIICase(argument->string, "round")) {
</span><span class="lines">@@ -6599,19 +6541,19 @@
</span><span class="cx">
</span><span class="cx"> switch (widthArguments.size()) {
</span><span class="cx"> case 1: {
</span><del>- shape->updateShapeSize1Value(widthArguments[0].get());
</del><ins>+ shape->updateShapeSize1Value(WTFMove(widthArguments[0]));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case 2: {
</span><del>- shape->updateShapeSize2Values(widthArguments[0].get(), widthArguments[1].get());
</del><ins>+ shape->updateShapeSize2Values(WTFMove(widthArguments[0]), WTFMove(widthArguments[1]));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case 3: {
</span><del>- shape->updateShapeSize3Values(widthArguments[0].get(), widthArguments[1].get(), widthArguments[2].get());
</del><ins>+ shape->updateShapeSize3Values(WTFMove(widthArguments[0]), WTFMove(widthArguments[1]), WTFMove(widthArguments[2]));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case 4: {
</span><del>- shape->updateShapeSize4Values(widthArguments[0].get(), widthArguments[1].get(), widthArguments[2].get(), widthArguments[3].get());
</del><ins>+ shape->updateShapeSize4Values(WTFMove(widthArguments[0]), WTFMove(widthArguments[1]), WTFMove(widthArguments[2]), WTFMove(widthArguments[3]));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> default:
</span><span class="lines">@@ -6620,7 +6562,7 @@
</span><span class="cx">
</span><span class="cx"> if (hasRoundedInset)
</span><span class="cx"> return parseInsetRoundedCorners(WTFMove(shape), args);
</span><del>- return shape;
</del><ins>+ return WTFMove(shape);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSPrimitiveValue> CSSParser::parseShapeRadius(CSSParserValue& value)
</span><span class="lines">@@ -6635,13 +6577,13 @@
</span><span class="cx"> return createPrimitiveNumericValue(valueWithCalculation);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSBasicShape> CSSParser::parseBasicShapeCircle(CSSParserValueList& args)
</del><ins>+RefPtr<CSSBasicShapeCircle> CSSParser::parseBasicShapeCircle(CSSParserValueList& args)
</ins><span class="cx"> {
</span><span class="cx"> // circle(radius)
</span><span class="cx"> // circle(radius at <position>)
</span><span class="cx"> // circle(at <position>)
</span><span class="cx"> // where position defines centerX and centerY using a CSS <position> data type.
</span><del>- RefPtr<CSSBasicShapeCircle> shape = CSSBasicShapeCircle::create();
</del><ins>+ auto shape = CSSBasicShapeCircle::create();
</ins><span class="cx">
</span><span class="cx"> for (CSSParserValue* argument = args.current(); argument; argument = args.next()) {
</span><span class="cx"> // The call to parseFillPosition below should consume all of the
</span><span class="lines">@@ -6652,7 +6594,7 @@
</span><span class="cx">
</span><span class="cx"> if (!args.currentIndex() && argument->id != CSSValueAt) {
</span><span class="cx"> if (RefPtr<CSSPrimitiveValue> radius = parseShapeRadius(*argument)) {
</span><del>- shape->setRadius(WTFMove(radius));
</del><ins>+ shape->setRadius(radius.releaseNonNull());
</ins><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -6664,18 +6606,18 @@
</span><span class="cx"> RefPtr<CSSPrimitiveValue> centerY;
</span><span class="cx"> parseFillPosition(args, centerX, centerY);
</span><span class="cx"> if (centerX && centerY && !args.current()) {
</span><del>- shape->setCenterX(WTFMove(centerX));
- shape->setCenterY(WTFMove(centerY));
</del><ins>+ shape->setCenterX(centerX.releaseNonNull());
+ shape->setCenterY(centerY.releaseNonNull());
</ins><span class="cx"> } else
</span><span class="cx"> return nullptr;
</span><span class="cx"> } else
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return shape;
</del><ins>+ return WTFMove(shape);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSBasicShape> CSSParser::parseBasicShapeEllipse(CSSParserValueList& args)
</del><ins>+RefPtr<CSSBasicShapeEllipse> CSSParser::parseBasicShapeEllipse(CSSParserValueList& args)
</ins><span class="cx"> {
</span><span class="cx"> // ellipse(radiusX)
</span><span class="cx"> // ellipse(radiusX at <position>)
</span><span class="lines">@@ -6683,7 +6625,7 @@
</span><span class="cx"> // ellipse(radiusX radiusY at <position>)
</span><span class="cx"> // ellipse(at <position>)
</span><span class="cx"> // where position defines centerX and centerY using a CSS <position> data type.
</span><del>- RefPtr<CSSBasicShapeEllipse> shape = CSSBasicShapeEllipse::create();
</del><ins>+ auto shape = CSSBasicShapeEllipse::create();
</ins><span class="cx">
</span><span class="cx"> for (CSSParserValue* argument = args.current(); argument; argument = args.next()) {
</span><span class="cx"> // The call to parseFillPosition below should consume all of the
</span><span class="lines">@@ -6695,9 +6637,9 @@
</span><span class="cx"> if (args.currentIndex() < 2 && argument->id != CSSValueAt) {
</span><span class="cx"> if (RefPtr<CSSPrimitiveValue> radius = parseShapeRadius(*argument)) {
</span><span class="cx"> if (!shape->radiusX())
</span><del>- shape->setRadiusX(radius);
</del><ins>+ shape->setRadiusX(radius.releaseNonNull());
</ins><span class="cx"> else
</span><del>- shape->setRadiusY(radius);
</del><ins>+ shape->setRadiusY(radius.releaseNonNull());
</ins><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -6713,20 +6655,20 @@
</span><span class="cx"> if (!centerX || !centerY || args.current())
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- shape->setCenterX(centerX);
- shape->setCenterY(centerY);
</del><ins>+ shape->setCenterX(centerX.releaseNonNull());
+ shape->setCenterY(centerY.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- return shape;
</del><ins>+ return WTFMove(shape);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSBasicShape> CSSParser::parseBasicShapePolygon(CSSParserValueList& args)
</del><ins>+RefPtr<CSSBasicShapePolygon> CSSParser::parseBasicShapePolygon(CSSParserValueList& args)
</ins><span class="cx"> {
</span><span class="cx"> unsigned size = args.size();
</span><span class="cx"> if (!size)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- RefPtr<CSSBasicShapePolygon> shape = CSSBasicShapePolygon::create();
</del><ins>+ auto shape = CSSBasicShapePolygon::create();
</ins><span class="cx">
</span><span class="cx"> CSSParserValue* argument = args.current();
</span><span class="cx"> if (argument->id == CSSValueEvenodd || argument->id == CSSValueNonzero) {
</span><span class="lines">@@ -6749,7 +6691,7 @@
</span><span class="cx"> ValueWithCalculation argumentXWithCalculation(*argumentX);
</span><span class="cx"> if (!validateUnit(argumentXWithCalculation, FLength | FPercent))
</span><span class="cx"> return nullptr;
</span><del>- RefPtr<CSSPrimitiveValue> xLength = createPrimitiveNumericValue(argumentXWithCalculation);
</del><ins>+ auto xLength = createPrimitiveNumericValue(argumentXWithCalculation);
</ins><span class="cx">
</span><span class="cx"> CSSParserValue* argumentY = args.next();
</span><span class="cx"> if (!argumentY)
</span><span class="lines">@@ -6757,9 +6699,9 @@
</span><span class="cx"> ValueWithCalculation argumentYWithCalculation(*argumentY);
</span><span class="cx"> if (!validateUnit(argumentYWithCalculation, FLength | FPercent))
</span><span class="cx"> return nullptr;
</span><del>- RefPtr<CSSPrimitiveValue> yLength = createPrimitiveNumericValue(argumentYWithCalculation);
</del><ins>+ auto yLength = createPrimitiveNumericValue(argumentYWithCalculation);
</ins><span class="cx">
</span><del>- shape->appendPoint(xLength.release(), yLength.release());
</del><ins>+ shape->appendPoint(WTFMove(xLength), WTFMove(yLength));
</ins><span class="cx">
</span><span class="cx"> CSSParserValue* commaOrNull = args.next();
</span><span class="cx"> if (!commaOrNull)
</span><span class="lines">@@ -6770,10 +6712,10 @@
</span><span class="cx"> argumentX = args.next();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return shape;
</del><ins>+ return WTFMove(shape);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSBasicShape> CSSParser::parseBasicShapePath(CSSParserValueList& args)
</del><ins>+RefPtr<CSSBasicShapePath> CSSParser::parseBasicShapePath(CSSParserValueList& args)
</ins><span class="cx"> {
</span><span class="cx"> unsigned size = args.size();
</span><span class="cx"> if (size != 1 && size != 3)
</span><span class="lines">@@ -6797,11 +6739,11 @@
</span><span class="cx"> if (!buildSVGPathByteStreamFromString(argument->string, *byteStream, UnalteredParsing))
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- RefPtr<CSSBasicShapePath> shape = CSSBasicShapePath::create(WTFMove(byteStream));
</del><ins>+ auto shape = CSSBasicShapePath::create(WTFMove(byteStream));
</ins><span class="cx"> shape->setWindRule(windRule);
</span><span class="cx">
</span><span class="cx"> args.next();
</span><del>- return shape;
</del><ins>+ return WTFMove(shape);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static bool isBoxValue(CSSValueID valueId, CSSPropertyID propId)
</span><span class="lines">@@ -6822,7 +6764,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseBasicShapeAndOrBox(CSSPropertyID propId)
</del><ins>+RefPtr<CSSValueList> CSSParser::parseBasicShapeAndOrBox(CSSPropertyID propId)
</ins><span class="cx"> {
</span><span class="cx"> CSSParserValue* value = m_valueList->current();
</span><span class="cx">
</span><span class="lines">@@ -6830,7 +6772,7 @@
</span><span class="cx"> bool boxFound = false;
</span><span class="cx"> CSSValueID valueId;
</span><span class="cx">
</span><del>- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
</del><ins>+ auto list = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> for (unsigned i = 0; i < 2; ++i) {
</span><span class="cx"> if (!value)
</span><span class="cx"> break;
</span><span class="lines">@@ -6854,7 +6796,7 @@
</span><span class="cx">
</span><span class="cx"> if (m_valueList->current())
</span><span class="cx"> return nullptr;
</span><del>- return list;
</del><ins>+ return WTFMove(list);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><span class="lines">@@ -6987,7 +6929,7 @@
</span><span class="cx"> if (!parsedFamilyValue)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- addProperty(CSSPropertyFontFamily, parsedFamilyValue.release(), important);
</del><ins>+ addProperty(CSSPropertyFontFamily, parsedFamilyValue.releaseNonNull(), important);
</ins><span class="cx">
</span><span class="cx"> // FIXME: http://www.w3.org/TR/2011/WD-css3-fonts-20110324/#font-prop requires that
</span><span class="cx"> // "font-stretch", "font-size-adjust", and "font-kerning" be reset to their initial values
</span><span class="lines">@@ -7063,10 +7005,10 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValueList> CSSParser::parseFontFamily()
</span><span class="cx"> {
</span><del>- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
</del><ins>+ auto list = CSSValueList::createCommaSeparated();
</ins><span class="cx"> CSSParserValue* value = m_valueList->current();
</span><span class="cx">
</span><del>- FontFamilyValueBuilder familyBuilder(*list);
</del><ins>+ FontFamilyValueBuilder familyBuilder(list);
</ins><span class="cx"> bool inFamily = false;
</span><span class="cx">
</span><span class="cx"> while (value) {
</span><span class="lines">@@ -7131,8 +7073,8 @@
</span><span class="cx"> familyBuilder.commit();
</span><span class="cx">
</span><span class="cx"> if (!list->length())
</span><del>- list = nullptr;
- return list;
</del><ins>+ return nullptr;
+ return WTFMove(list);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseLineHeight(bool important)
</span><span class="lines">@@ -7217,27 +7159,27 @@
</span><span class="cx"> value = m_valueList->next();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
</del><ins>+ auto list = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> if (encounteredWeight)
</span><span class="cx"> list->append(CSSValuePool::singleton().createIdentifierValue(CSSValueWeight));
</span><span class="cx"> if (encounteredStyle)
</span><span class="cx"> list->append(CSSValuePool::singleton().createIdentifierValue(CSSValueStyle));
</span><del>- addProperty(CSSPropertyFontSynthesis, list.release(), important);
</del><ins>+ addProperty(CSSPropertyFontSynthesis, WTFMove(list), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseFontFaceSrcURI(CSSValueList& valueList)
</span><span class="cx"> {
</span><del>- RefPtr<CSSFontFaceSrcValue> uriValue(CSSFontFaceSrcValue::create(completeURL(m_valueList->current()->string)));
</del><ins>+ auto uriValue = CSSFontFaceSrcValue::create(completeURL(m_valueList->current()->string));
</ins><span class="cx">
</span><span class="cx"> CSSParserValue* value = m_valueList->next();
</span><span class="cx"> if (!value) {
</span><del>- valueList.append(uriValue.releaseNonNull());
</del><ins>+ valueList.append(WTFMove(uriValue));
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> if (value->unit == CSSParserValue::Operator && value->iValue == ',') {
</span><span class="cx"> m_valueList->next();
</span><del>- valueList.append(uriValue.releaseNonNull());
</del><ins>+ valueList.append(WTFMove(uriValue));
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -7250,7 +7192,7 @@
</span><span class="cx"> if (!args || args->size() != 1 || (args->current()->unit != CSSPrimitiveValue::CSS_STRING && args->current()->unit != CSSPrimitiveValue::CSS_IDENT))
</span><span class="cx"> return false;
</span><span class="cx"> uriValue->setFormat(args->current()->string);
</span><del>- valueList.append(uriValue.releaseNonNull());
</del><ins>+ valueList.append(WTFMove(uriValue));
</ins><span class="cx"> value = m_valueList->next();
</span><span class="cx"> if (value && value->unit == CSSParserValue::Operator && value->iValue == ',')
</span><span class="cx"> m_valueList->next();
</span><span class="lines">@@ -7287,14 +7229,14 @@
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseFontFaceSrc()
</span><span class="cx"> {
</span><del>- RefPtr<CSSValueList> values(CSSValueList::createCommaSeparated());
</del><ins>+ auto values = CSSValueList::createCommaSeparated();
</ins><span class="cx">
</span><span class="cx"> while (CSSParserValue* value = m_valueList->current()) {
</span><span class="cx"> if (value->unit == CSSPrimitiveValue::CSS_URI) {
</span><del>- if (!parseFontFaceSrcURI(*values))
</del><ins>+ if (!parseFontFaceSrcURI(values))
</ins><span class="cx"> return false;
</span><span class="cx"> } else if (value->unit == CSSParserValue::Function && equalLettersIgnoringASCIICase(value->function->name, "local(")) {
</span><del>- if (!parseFontFaceSrcLocal(*values))
</del><ins>+ if (!parseFontFaceSrcLocal(values))
</ins><span class="cx"> return false;
</span><span class="cx"> } else
</span><span class="cx"> return false;
</span><span class="lines">@@ -7302,14 +7244,14 @@
</span><span class="cx"> if (!values->length())
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- addProperty(CSSPropertySrc, values.release(), m_important);
</del><ins>+ addProperty(CSSPropertySrc, WTFMove(values), m_important);
</ins><span class="cx"> m_valueList->next();
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseFontFaceUnicodeRange()
</span><span class="cx"> {
</span><del>- RefPtr<CSSValueList> values = CSSValueList::createCommaSeparated();
</del><ins>+ auto values = CSSValueList::createCommaSeparated();
</ins><span class="cx"> bool failed = false;
</span><span class="cx"> bool operatorExpected = false;
</span><span class="cx"> for (; m_valueList->current(); m_valueList->next(), operatorExpected = !operatorExpected) {
</span><span class="lines">@@ -7396,7 +7338,7 @@
</span><span class="cx"> }
</span><span class="cx"> if (failed || !values->length())
</span><span class="cx"> return false;
</span><del>- addProperty(CSSPropertyUnicodeRange, values.release(), m_important);
</del><ins>+ addProperty(CSSPropertyUnicodeRange, WTFMove(values), m_important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -7554,13 +7496,13 @@
</span><span class="cx"> static inline bool parseAlphaValue(const CharacterType*& string, const CharacterType* end, const char terminator, int& value)
</span><span class="cx"> {
</span><span class="cx"> while (string != end && isHTMLSpace(*string))
</span><del>- string++;
</del><ins>+ ++string;
</ins><span class="cx">
</span><span class="cx"> bool negative = false;
</span><span class="cx">
</span><span class="cx"> if (string != end && *string == '-') {
</span><span class="cx"> negative = true;
</span><del>- string++;
</del><ins>+ ++string;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> value = 0;
</span><span class="lines">@@ -7910,7 +7852,7 @@
</span><span class="cx"> values = CSSValueList::createCommaSeparated();
</span><span class="cx">
</span><span class="cx"> // Construct the current shadow value and add it to the list.
</span><del>- values->append(CSSShadowValue::create(x.release(), y.release(), blur.release(), spread.release(), style.release(), color.release()));
</del><ins>+ values->append(CSSShadowValue::create(WTFMove(x), WTFMove(y), WTFMove(blur), WTFMove(spread), WTFMove(style), WTFMove(color)));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Now reset for the next shadow value.
</span><span class="lines">@@ -8059,7 +8001,7 @@
</span><span class="cx"> return nullptr; // This value is not a color or length and is invalid or
</span><span class="cx"> // it is a color, but a color isn't allowed at this point.
</span><span class="cx">
</span><del>- context.commitColor(parsedColor.release());
</del><ins>+ context.commitColor(parsedColor.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> valueList.next();
</span><span class="lines">@@ -8112,7 +8054,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- addProperty(propId, CSSReflectValue::create(direction.release(), offset.release(), mask.release()), important);
</del><ins>+ addProperty(propId, CSSReflectValue::create(direction.releaseNonNull(), offset.releaseNonNull(), WTFMove(mask)), important);
</ins><span class="cx"> m_valueList->next();
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -8158,7 +8100,7 @@
</span><span class="cx">
</span><span class="cx"> addProperty(CSSPropertyFlexGrow, CSSValuePool::singleton().createValue(clampToFloat(flexGrow), CSSPrimitiveValue::CSS_NUMBER), important);
</span><span class="cx"> addProperty(CSSPropertyFlexShrink, CSSValuePool::singleton().createValue(clampToFloat(flexShrink), CSSPrimitiveValue::CSS_NUMBER), important);
</span><del>- addProperty(CSSPropertyFlexBasis, flexBasis, important);
</del><ins>+ addProperty(CSSPropertyFlexBasis, flexBasis.releaseNonNull(), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -8188,7 +8130,7 @@
</span><span class="cx">
</span><span class="cx"> void commitImage(RefPtr<CSSValue>&& image)
</span><span class="cx"> {
</span><del>- m_image = image;
</del><ins>+ m_image = WTFMove(image);
</ins><span class="cx"> m_canAdvance = true;
</span><span class="cx"> m_allowCommit = true;
</span><span class="cx"> m_allowImage = m_allowForwardSlashOperator = m_requireWidth = m_requireOutset = false;
</span><span class="lines">@@ -8197,7 +8139,7 @@
</span><span class="cx"> }
</span><span class="cx"> void commitImageSlice(RefPtr<CSSBorderImageSliceValue>&& slice)
</span><span class="cx"> {
</span><del>- m_imageSlice = slice;
</del><ins>+ m_imageSlice = WTFMove(slice);
</ins><span class="cx"> m_canAdvance = true;
</span><span class="cx"> m_allowCommit = m_allowForwardSlashOperator = true;
</span><span class="cx"> m_allowImageSlice = m_requireWidth = m_requireOutset = false;
</span><span class="lines">@@ -8218,7 +8160,7 @@
</span><span class="cx"> }
</span><span class="cx"> void commitBorderWidth(RefPtr<CSSPrimitiveValue>&& slice)
</span><span class="cx"> {
</span><del>- m_borderSlice = slice;
</del><ins>+ m_borderSlice = WTFMove(slice);
</ins><span class="cx"> m_canAdvance = true;
</span><span class="cx"> m_allowCommit = m_allowForwardSlashOperator = true;
</span><span class="cx"> m_allowImageSlice = m_requireWidth = m_requireOutset = false;
</span><span class="lines">@@ -8227,7 +8169,7 @@
</span><span class="cx"> }
</span><span class="cx"> void commitBorderOutset(RefPtr<CSSPrimitiveValue>&& outset)
</span><span class="cx"> {
</span><del>- m_outset = outset;
</del><ins>+ m_outset = WTFMove(outset);
</ins><span class="cx"> m_canAdvance = true;
</span><span class="cx"> m_allowCommit = true;
</span><span class="cx"> m_allowImageSlice = m_allowForwardSlashOperator = m_requireWidth = m_requireOutset = false;
</span><span class="lines">@@ -8236,7 +8178,7 @@
</span><span class="cx"> }
</span><span class="cx"> void commitRepeat(RefPtr<CSSValue>&& repeat)
</span><span class="cx"> {
</span><del>- m_repeat = repeat;
</del><ins>+ m_repeat = WTFMove(repeat);
</ins><span class="cx"> m_canAdvance = true;
</span><span class="cx"> m_allowCommit = true;
</span><span class="cx"> m_allowRepeat = m_allowForwardSlashOperator = m_requireWidth = m_requireOutset = false;
</span><span class="lines">@@ -8244,7 +8186,7 @@
</span><span class="cx"> m_allowImage = !m_image;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RefPtr<CSSValue> commitWebKitBorderImage()
</del><ins>+ Ref<CSSValue> commitWebKitBorderImage()
</ins><span class="cx"> {
</span><span class="cx"> return createBorderImageValue(m_image.copyRef(), m_imageSlice.copyRef(), m_borderSlice.copyRef(), m_outset.copyRef(), m_repeat.copyRef());
</span><span class="cx"> }
</span><span class="lines">@@ -8261,7 +8203,7 @@
</span><span class="cx"> void commitBorderImageProperty(CSSPropertyID propId, CSSParser& parser, RefPtr<CSSValue>&& value, bool important)
</span><span class="cx"> {
</span><span class="cx"> if (value)
</span><del>- parser.addProperty(propId, WTFMove(value), important);
</del><ins>+ parser.addProperty(propId, value.releaseNonNull(), important);
</ins><span class="cx"> else
</span><span class="cx"> parser.addProperty(propId, CSSValuePool::singleton().createImplicitInitialValue(), important, true);
</span><span class="cx"> }
</span><span class="lines">@@ -8301,14 +8243,14 @@
</span><span class="cx"> else if (isGeneratedImageValue(*currentValue)) {
</span><span class="cx"> RefPtr<CSSValue> value;
</span><span class="cx"> if (parseGeneratedImage(*m_valueList, value))
</span><del>- context.commitImage(value.release());
</del><ins>+ context.commitImage(WTFMove(value));
</ins><span class="cx"> else
</span><span class="cx"> return false;
</span><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><span class="cx"> } else if (currentValue->unit == CSSParserValue::Function && equalLettersIgnoringASCIICase(currentValue->function->name, "-webkit-image-set(")) {
</span><span class="cx"> RefPtr<CSSValue> value = parseImageSet();
</span><span class="cx"> if (value)
</span><del>- context.commitImage(value.release());
</del><ins>+ context.commitImage(value.releaseNonNull());
</ins><span class="cx"> else
</span><span class="cx"> return false;
</span><span class="cx"> #endif
</span><span class="lines">@@ -8319,25 +8261,25 @@
</span><span class="cx"> if (!context.canAdvance() && context.allowImageSlice()) {
</span><span class="cx"> RefPtr<CSSBorderImageSliceValue> imageSlice;
</span><span class="cx"> if (parseBorderImageSlice(propId, imageSlice))
</span><del>- context.commitImageSlice(imageSlice.release());
</del><ins>+ context.commitImageSlice(WTFMove(imageSlice));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!context.canAdvance() && context.allowRepeat()) {
</span><span class="cx"> RefPtr<CSSValue> repeat;
</span><span class="cx"> if (parseBorderImageRepeat(repeat))
</span><del>- context.commitRepeat(repeat.release());
</del><ins>+ context.commitRepeat(WTFMove(repeat));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!context.canAdvance() && context.requireWidth()) {
</span><span class="cx"> RefPtr<CSSPrimitiveValue> borderSlice;
</span><span class="cx"> if (parseBorderImageWidth(borderSlice))
</span><del>- context.commitBorderWidth(borderSlice.release());
</del><ins>+ context.commitBorderWidth(WTFMove(borderSlice));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!context.canAdvance() && context.requireOutset()) {
</span><span class="cx"> RefPtr<CSSPrimitiveValue> borderOutset;
</span><span class="cx"> if (parseBorderImageOutset(borderOutset))
</span><del>- context.commitBorderOutset(borderOutset.release());
</del><ins>+ context.commitBorderOutset(WTFMove(borderOutset));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!context.canAdvance())
</span><span class="lines">@@ -8391,7 +8333,7 @@
</span><span class="cx"> } else
</span><span class="cx"> secondValue = firstValue;
</span><span class="cx">
</span><del>- result = createPrimitiveValuePair(WTFMove(firstValue), WTFMove(secondValue));
</del><ins>+ result = createPrimitiveValuePair(firstValue.releaseNonNull(), secondValue.releaseNonNull());
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -8546,7 +8488,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void setAllowFinalCommit() { m_allowFinalCommit = true; }
</span><del>- void setTop(RefPtr<CSSPrimitiveValue>&& val) { m_top = val; }
</del><ins>+ void setTop(RefPtr<CSSPrimitiveValue>&& val) { m_top = WTFMove(val); }
</ins><span class="cx">
</span><span class="cx"> Ref<CSSPrimitiveValue> commitBorderImageQuad()
</span><span class="cx"> {
</span><span class="lines">@@ -8721,7 +8663,7 @@
</span><span class="cx"> {
</span><span class="cx"> enum { ID, VAL } state = ID;
</span><span class="cx">
</span><del>- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
</del><ins>+ auto list = CSSValueList::createCommaSeparated();
</ins><span class="cx"> RefPtr<CSSPrimitiveValue> counterName;
</span><span class="cx">
</span><span class="cx"> while (true) {
</span><span class="lines">@@ -8752,7 +8694,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (list->length() > 0) {
</span><del>- addProperty(propId, list.release(), important);
</del><ins>+ addProperty(propId, WTFMove(list), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -8887,7 +8829,7 @@
</span><span class="cx"> RefPtr<CSSPrimitiveValue> point = parseDeprecatedGradientPoint(*argument, true);
</span><span class="cx"> if (!point)
</span><span class="cx"> return false;
</span><del>- result->setFirstX(point.release());
</del><ins>+ result->setFirstX(point.releaseNonNull());
</ins><span class="cx">
</span><span class="cx"> // First Y. It can be top, bottom, number or percent.
</span><span class="cx"> argument = args->next();
</span><span class="lines">@@ -8896,7 +8838,7 @@
</span><span class="cx"> point = parseDeprecatedGradientPoint(*argument, false);
</span><span class="cx"> if (!point)
</span><span class="cx"> return false;
</span><del>- result->setFirstY(point.release());
</del><ins>+ result->setFirstY(point.releaseNonNull());
</ins><span class="cx">
</span><span class="cx"> // Comma after the first point.
</span><span class="cx"> argument = args->next();
</span><span class="lines">@@ -8926,7 +8868,7 @@
</span><span class="cx"> point = parseDeprecatedGradientPoint(*argument, true);
</span><span class="cx"> if (!point)
</span><span class="cx"> return false;
</span><del>- result->setSecondX(point.release());
</del><ins>+ result->setSecondX(point.releaseNonNull());
</ins><span class="cx">
</span><span class="cx"> // Second Y. It can be top, bottom, number or percent.
</span><span class="cx"> argument = args->next();
</span><span class="lines">@@ -8935,7 +8877,7 @@
</span><span class="cx"> point = parseDeprecatedGradientPoint(*argument, false);
</span><span class="cx"> if (!point)
</span><span class="cx"> return false;
</span><del>- result->setSecondY(point.release());
</del><ins>+ result->setSecondY(point.releaseNonNull());
</ins><span class="cx">
</span><span class="cx"> // For radial gradients only, we now expect the second radius.
</span><span class="cx"> if (gradientType == CSSDeprecatedRadialGradient) {
</span><span class="lines">@@ -9009,7 +8951,7 @@
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseDeprecatedLinearGradient(CSSParserValueList& valueList, RefPtr<CSSValue>& gradient, CSSGradientRepeat repeating)
</span><span class="cx"> {
</span><del>- RefPtr<CSSLinearGradientValue> result = CSSLinearGradientValue::create(repeating, CSSPrefixedLinearGradient);
</del><ins>+ auto result = CSSLinearGradientValue::create(repeating, CSSPrefixedLinearGradient);
</ins><span class="cx">
</span><span class="cx"> // Walk the arguments.
</span><span class="cx"> CSSParserValueList* args = valueList.current()->function->args.get();
</span><span class="lines">@@ -9031,25 +8973,23 @@
</span><span class="cx"> } else {
</span><span class="cx"> // Look one or two optional keywords that indicate a side or corner.
</span><span class="cx"> RefPtr<CSSPrimitiveValue> startX, startY;
</span><del>-
- RefPtr<CSSPrimitiveValue> location;
</del><span class="cx"> bool isHorizontal = false;
</span><del>- if ((location = valueFromSideKeyword(*argument, isHorizontal))) {
</del><ins>+ if (RefPtr<CSSPrimitiveValue> location = valueFromSideKeyword(*argument, isHorizontal)) {
</ins><span class="cx"> if (isHorizontal)
</span><del>- startX = location;
</del><ins>+ startX = WTFMove(location);
</ins><span class="cx"> else
</span><del>- startY = location;
</del><ins>+ startY = WTFMove(location);
</ins><span class="cx">
</span><span class="cx"> if ((argument = args->next())) {
</span><span class="cx"> if ((location = valueFromSideKeyword(*argument, isHorizontal))) {
</span><span class="cx"> if (isHorizontal) {
</span><span class="cx"> if (startX)
</span><span class="cx"> return false;
</span><del>- startX = location;
</del><ins>+ startX = WTFMove(location);
</ins><span class="cx"> } else {
</span><span class="cx"> if (startY)
</span><span class="cx"> return false;
</span><del>- startY = location;
</del><ins>+ startY = WTFMove(location);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> args->next();
</span><span class="lines">@@ -9062,11 +9002,11 @@
</span><span class="cx"> if (!startX && !startY)
</span><span class="cx"> startY = CSSValuePool::singleton().createIdentifierValue(CSSValueTop);
</span><span class="cx">
</span><del>- result->setFirstX(startX.release());
- result->setFirstY(startY.release());
</del><ins>+ result->setFirstX(WTFMove(startX));
+ result->setFirstY(WTFMove(startY));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- if (!parseGradientColorStops(*args, *result, expectComma))
</del><ins>+ if (!parseGradientColorStops(*args, result, expectComma))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> if (!result->stopCount())
</span><span class="lines">@@ -9078,7 +9018,7 @@
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseDeprecatedRadialGradient(CSSParserValueList& valueList, RefPtr<CSSValue>& gradient, CSSGradientRepeat repeating)
</span><span class="cx"> {
</span><del>- RefPtr<CSSRadialGradientValue> result = CSSRadialGradientValue::create(repeating, CSSPrefixedRadialGradient);
</del><ins>+ auto result = CSSRadialGradientValue::create(repeating, CSSPrefixedRadialGradient);
</ins><span class="cx">
</span><span class="cx"> // Walk the arguments.
</span><span class="cx"> CSSParserValueList* args = valueList.current()->function->args.get();
</span><span class="lines">@@ -9189,7 +9129,7 @@
</span><span class="cx"> result->setEndHorizontalSize(WTFMove(horizontalSize));
</span><span class="cx"> result->setEndVerticalSize(WTFMove(verticalSize));
</span><span class="cx">
</span><del>- if (!parseGradientColorStops(*args, *result, expectComma))
</del><ins>+ if (!parseGradientColorStops(*args, result, expectComma))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> gradient = WTFMove(result);
</span><span class="lines">@@ -9198,7 +9138,7 @@
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseLinearGradient(CSSParserValueList& valueList, RefPtr<CSSValue>& gradient, CSSGradientRepeat repeating)
</span><span class="cx"> {
</span><del>- RefPtr<CSSLinearGradientValue> result = CSSLinearGradientValue::create(repeating, CSSLinearGradient);
</del><ins>+ auto result = CSSLinearGradientValue::create(repeating, CSSLinearGradient);
</ins><span class="cx">
</span><span class="cx"> CSSParserValueList* args = valueList.current()->function->args.get();
</span><span class="cx"> if (!args || !args->size())
</span><span class="lines">@@ -9222,18 +9162,16 @@
</span><span class="cx"> if (!nextArgument)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- RefPtr<CSSPrimitiveValue> endX, endY;
- RefPtr<CSSPrimitiveValue> location;
</del><span class="cx"> bool isHorizontal = false;
</span><del>-
- location = valueFromSideKeyword(*nextArgument, isHorizontal);
</del><ins>+ RefPtr<CSSPrimitiveValue> location = valueFromSideKeyword(*nextArgument, isHorizontal);
</ins><span class="cx"> if (!location)
</span><span class="cx"> return false;
</span><span class="cx">
</span><ins>+ RefPtr<CSSPrimitiveValue> endX, endY;
</ins><span class="cx"> if (isHorizontal)
</span><del>- endX = location;
</del><ins>+ endX = WTFMove(location);
</ins><span class="cx"> else
</span><del>- endY = location;
</del><ins>+ endY = WTFMove(location);
</ins><span class="cx">
</span><span class="cx"> nextArgument = args->next();
</span><span class="cx"> if (!nextArgument)
</span><span class="lines">@@ -9244,22 +9182,22 @@
</span><span class="cx"> if (isHorizontal) {
</span><span class="cx"> if (endX)
</span><span class="cx"> return false;
</span><del>- endX = location;
</del><ins>+ endX = WTFMove(location);
</ins><span class="cx"> } else {
</span><span class="cx"> if (endY)
</span><span class="cx"> return false;
</span><del>- endY = location;
</del><ins>+ endY = WTFMove(location);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> args->next();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> expectComma = true;
</span><del>- result->setFirstX(endX.release());
- result->setFirstY(endY.release());
</del><ins>+ result->setFirstX(WTFMove(endX));
+ result->setFirstY(WTFMove(endY));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- if (!parseGradientColorStops(*args, *result, expectComma))
</del><ins>+ if (!parseGradientColorStops(*args, result, expectComma))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> if (!result->stopCount())
</span><span class="lines">@@ -9271,7 +9209,7 @@
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseRadialGradient(CSSParserValueList& valueList, RefPtr<CSSValue>& gradient, CSSGradientRepeat repeating)
</span><span class="cx"> {
</span><del>- RefPtr<CSSRadialGradientValue> result = CSSRadialGradientValue::create(repeating, CSSRadialGradient);
</del><ins>+ auto result = CSSRadialGradientValue::create(repeating, CSSRadialGradient);
</ins><span class="cx">
</span><span class="cx"> CSSParserValueList* args = valueList.current()->function->args.get();
</span><span class="cx"> if (!args || !args->size())
</span><span class="lines">@@ -9388,7 +9326,7 @@
</span><span class="cx"> if (shapeValue || sizeValue || horizontalSize || centerX || centerY)
</span><span class="cx"> expectComma = true;
</span><span class="cx">
</span><del>- if (!parseGradientColorStops(*args, *result, expectComma))
</del><ins>+ if (!parseGradientColorStops(*args, result, expectComma))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> gradient = WTFMove(result);
</span><span class="lines">@@ -9522,20 +9460,16 @@
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseFilterImage(CSSParserValueList& valueList, RefPtr<CSSValue>& filter)
</span><span class="cx"> {
</span><del>- RefPtr<CSSFilterImageValue> result;
-
</del><span class="cx"> // Walk the arguments.
</span><span class="cx"> CSSParserValueList* args = valueList.current()->function->args.get();
</span><span class="cx"> if (!args)
</span><span class="cx"> return false;
</span><span class="cx"> CSSParserValue* value = args->current();
</span><del>- RefPtr<CSSValue> imageValue;
- RefPtr<CSSValue> filterValue;
-
</del><span class="cx"> if (!value)
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> // The first argument is the image. It is a fill image.
</span><ins>+ RefPtr<CSSValue> imageValue;
</ins><span class="cx"> if (!parseFillImage(*args, imageValue)) {
</span><span class="cx"> if (value->unit == CSSPrimitiveValue::CSS_STRING)
</span><span class="cx"> imageValue = CSSImageValue::create(completeURL(value->string));
</span><span class="lines">@@ -9550,30 +9484,27 @@
</span><span class="cx"> return false;
</span><span class="cx"> value = args->next();
</span><span class="cx">
</span><ins>+ RefPtr<CSSValueList> filterValue;
</ins><span class="cx"> if (!value || !parseFilter(*args, filterValue))
</span><span class="cx"> return false;
</span><span class="cx"> value = args->next();
</span><span class="cx">
</span><del>- result = CSSFilterImageValue::create(imageValue.releaseNonNull(), filterValue.releaseNonNull());
</del><ins>+ filter = CSSFilterImageValue::create(imageValue.releaseNonNull(), filterValue.releaseNonNull());
</ins><span class="cx">
</span><del>- filter = result;
-
</del><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseCrossfade(CSSParserValueList& valueList, RefPtr<CSSValue>& crossfade, bool prefixed)
</span><span class="cx"> {
</span><del>- RefPtr<CSSCrossfadeValue> result;
-
</del><span class="cx"> // Walk the arguments.
</span><span class="cx"> CSSParserValueList* args = valueList.current()->function->args.get();
</span><span class="cx"> if (!args || args->size() != 5)
</span><span class="cx"> return false;
</span><ins>+
</ins><span class="cx"> CSSParserValue* argument = args->current();
</span><del>- RefPtr<CSSValue> fromImageValue;
- RefPtr<CSSValue> toImageValue;
</del><span class="cx">
</span><span class="cx"> // The first argument is the "from" image. It is a fill image.
</span><ins>+ RefPtr<CSSValue> fromImageValue;
</ins><span class="cx"> if (!argument || !parseFillImage(*args, fromImageValue))
</span><span class="cx"> return false;
</span><span class="cx"> argument = args->next();
</span><span class="lines">@@ -9584,6 +9515,7 @@
</span><span class="cx"> argument = args->next();
</span><span class="cx">
</span><span class="cx"> // The second argument is the "to" image. It is a fill image.
</span><ins>+ RefPtr<CSSValue> toImageValue;
</ins><span class="cx"> if (!argument || !parseFillImage(*args, toImageValue))
</span><span class="cx"> return false;
</span><span class="cx"> argument = args->next();
</span><span class="lines">@@ -9594,10 +9526,10 @@
</span><span class="cx"> argument = args->next();
</span><span class="cx">
</span><span class="cx"> // The third argument is the crossfade value. It is a percentage or a fractional number.
</span><del>- RefPtr<CSSPrimitiveValue> percentage;
</del><span class="cx"> if (!argument)
</span><span class="cx"> return false;
</span><span class="cx">
</span><ins>+ RefPtr<CSSPrimitiveValue> percentage;
</ins><span class="cx"> if (argument->unit == CSSPrimitiveValue::CSS_PERCENTAGE)
</span><span class="cx"> percentage = CSSValuePool::singleton().createValue(clampTo<double>(argument->fValue / 100, 0, 1), CSSPrimitiveValue::CSS_NUMBER);
</span><span class="cx"> else if (argument->unit == CSSPrimitiveValue::CSS_NUMBER)
</span><span class="lines">@@ -9605,11 +9537,8 @@
</span><span class="cx"> else
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- result = CSSCrossfadeValue::create(fromImageValue, toImageValue, prefixed);
- result->setPercentage(percentage);
</del><ins>+ crossfade = CSSCrossfadeValue::create(fromImageValue.releaseNonNull(), toImageValue.releaseNonNull(), percentage.releaseNonNull(), prefixed);
</ins><span class="cx">
</span><del>- crossfade = result;
-
</del><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -9645,9 +9574,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_IMAGE_RESOLUTION)
</span><del>-RefPtr<CSSValue> CSSParser::parseImageResolution()
</del><ins>+RefPtr<CSSValueList> CSSParser::parseImageResolution()
</ins><span class="cx"> {
</span><del>- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
</del><ins>+ auto list = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> bool haveResolution = false;
</span><span class="cx"> bool haveFromImage = false;
</span><span class="cx"> bool haveSnap = false;
</span><span class="lines">@@ -9672,12 +9601,12 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> if (!haveFromImage && !haveResolution)
</span><span class="cx"> return nullptr;
</span><del>- return list;
</del><ins>+ return WTFMove(list);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><del>-RefPtr<CSSValue> CSSParser::parseImageSet()
</del><ins>+RefPtr<CSSImageSetValue> CSSParser::parseImageSet()
</ins><span class="cx"> {
</span><span class="cx"> CSSParserValue& value = *m_valueList->current();
</span><span class="cx"> ASSERT(value.unit == CSSParserValue::Function);
</span><span class="lines">@@ -9686,7 +9615,7 @@
</span><span class="cx"> if (!functionArgs || !functionArgs->size() || !functionArgs->current())
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- RefPtr<CSSImageSetValue> imageSet = CSSImageSetValue::create();
</del><ins>+ auto imageSet = CSSImageSetValue::create();
</ins><span class="cx"> CSSParserValue* arg = functionArgs->current();
</span><span class="cx"> while (arg) {
</span><span class="cx"> if (arg->unit != CSSPrimitiveValue::CSS_URI)
</span><span class="lines">@@ -9726,7 +9655,7 @@
</span><span class="cx"> arg = functionArgs->next();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return imageSet;
</del><ins>+ return WTFMove(imageSet);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -9994,19 +9923,19 @@
</span><span class="cx"> if (!m_valueList)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
</del><ins>+ auto list = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> for (CSSParserValue* value = m_valueList->current(); value; value = m_valueList->next()) {
</span><del>- RefPtr<CSSValue> parsedTransformValue = parseTransformValue(*value);
</del><ins>+ auto parsedTransformValue = parseTransformValue(*value);
</ins><span class="cx"> if (!parsedTransformValue)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> list->append(parsedTransformValue.releaseNonNull());
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return list;
</del><ins>+ return WTFMove(list);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseTransformValue(CSSParserValue& value)
</del><ins>+RefPtr<WebKitCSSTransformValue> CSSParser::parseTransformValue(CSSParserValue& value)
</ins><span class="cx"> {
</span><span class="cx"> if (value.unit != CSSParserValue::Function || !value.function)
</span><span class="cx"> return nullptr;
</span><span class="lines">@@ -10028,7 +9957,7 @@
</span><span class="cx"> // We collect a list of WebKitCSSTransformValues, where each value specifies a single operation.
</span><span class="cx">
</span><span class="cx"> // Create the new WebKitCSSTransformValue for this operation and add it to our list.
</span><del>- RefPtr<WebKitCSSTransformValue> transformValue = WebKitCSSTransformValue::create(info.type());
</del><ins>+ auto transformValue = WebKitCSSTransformValue::create(info.type());
</ins><span class="cx">
</span><span class="cx"> // Snag our values.
</span><span class="cx"> CSSParserValue* argument = args->current();
</span><span class="lines">@@ -10202,10 +10131,10 @@
</span><span class="cx"> return WTFMove(filterValue);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool CSSParser::parseFilter(CSSParserValueList& valueList, RefPtr<CSSValue>& result)
</del><ins>+bool CSSParser::parseFilter(CSSParserValueList& valueList, RefPtr<CSSValueList>& result)
</ins><span class="cx"> {
</span><span class="cx"> // The filter is a list of functional primitives that specify individual operations.
</span><del>- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
</del><ins>+ auto list = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> for (auto* value = valueList.current(); value; value = valueList.next()) {
</span><span class="cx"> if (value->unit != CSSPrimitiveValue::CSS_URI && (value->unit != CSSParserValue::Function || !value->function))
</span><span class="cx"> return false;
</span><span class="lines">@@ -10214,9 +10143,9 @@
</span><span class="cx">
</span><span class="cx"> // See if the specified primitive is one we understand.
</span><span class="cx"> if (value->unit == CSSPrimitiveValue::CSS_URI) {
</span><del>- RefPtr<WebKitCSSFilterValue> referenceFilterValue = WebKitCSSFilterValue::create(WebKitCSSFilterValue::ReferenceFilterOperation);
</del><ins>+ auto referenceFilterValue = WebKitCSSFilterValue::create(WebKitCSSFilterValue::ReferenceFilterOperation);
</ins><span class="cx"> referenceFilterValue->append(CSSPrimitiveValue::create(value->string, CSSPrimitiveValue::CSS_URI));
</span><del>- list->append(referenceFilterValue.releaseNonNull());
</del><ins>+ list->append(WTFMove(referenceFilterValue));
</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">@@ -10238,7 +10167,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- result = list;
</del><ins>+ result = WTFMove(list);
</ins><span class="cx">
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -10433,7 +10362,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
</del><ins>+ auto list = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> bool isValid = true;
</span><span class="cx"> while (isValid && value) {
</span><span class="cx"> switch (value->id) {
</span><span class="lines">@@ -10456,7 +10385,7 @@
</span><span class="cx">
</span><span class="cx"> // Values are either valid or in shorthand scope.
</span><span class="cx"> if (list->length() && (isValid || inShorthand())) {
</span><del>- addTextDecorationProperty(propId, list.release(), important);
</del><ins>+ addTextDecorationProperty(propId, WTFMove(list), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -10543,18 +10472,18 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (fill && shape) {
</span><del>- RefPtr<CSSValueList> parsedValues = CSSValueList::createSpaceSeparated();
</del><ins>+ auto parsedValues = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> parsedValues->append(fill.releaseNonNull());
</span><span class="cx"> parsedValues->append(shape.releaseNonNull());
</span><del>- addProperty(CSSPropertyWebkitTextEmphasisStyle, parsedValues.release(), important);
</del><ins>+ addProperty(CSSPropertyWebkitTextEmphasisStyle, WTFMove(parsedValues), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> if (fill) {
</span><del>- addProperty(CSSPropertyWebkitTextEmphasisStyle, fill.release(), important);
</del><ins>+ addProperty(CSSPropertyWebkitTextEmphasisStyle, fill.releaseNonNull(), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> if (shape) {
</span><del>- addProperty(CSSPropertyWebkitTextEmphasisStyle, shape.release(), important);
</del><ins>+ addProperty(CSSPropertyWebkitTextEmphasisStyle, shape.releaseNonNull(), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -10599,15 +10528,15 @@
</span><span class="cx"> }
</span><span class="cx"> if (!foundOverOrUnder)
</span><span class="cx"> return false;
</span><del>- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
</del><ins>+ auto list = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> list->append(CSSValuePool::singleton().createIdentifierValue(overUnderValueID));
</span><span class="cx"> if (foundLeftOrRight)
</span><span class="cx"> list->append(CSSValuePool::singleton().createIdentifierValue(leftRightValueID));
</span><del>- addProperty(CSSPropertyWebkitTextEmphasisPosition, list, important);
</del><ins>+ addProperty(CSSPropertyWebkitTextEmphasisPosition, WTFMove(list), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseTextIndent()
</del><ins>+RefPtr<CSSValueList> CSSParser::parseTextIndent()
</ins><span class="cx"> {
</span><span class="cx"> // <length> | <percentage> | inherit when CSS3_TEXT is disabled.
</span><span class="cx"> // [ <length> | <percentage> ] && [ -webkit-hanging || -webkit-each-line ]? | inherit when CSS3_TEXT is enabled.
</span><span class="lines">@@ -10655,7 +10584,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
</del><ins>+ auto list = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> bool isValid = true;
</span><span class="cx"> std::bitset<numCSSValueKeywords> seenValues;
</span><span class="cx"> while (isValid && value) {
</span><span class="lines">@@ -10683,7 +10612,7 @@
</span><span class="cx">
</span><span class="cx"> // Values are either valid or in shorthand scope.
</span><span class="cx"> if (list->length() && isValid) {
</span><del>- addProperty(CSSPropertyHangingPunctuation, list.release(), important);
</del><ins>+ addProperty(CSSPropertyHangingPunctuation, WTFMove(list), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -10772,15 +10701,15 @@
</span><span class="cx"> bool CSSParser::parseFontFeatureSettings(bool important)
</span><span class="cx"> {
</span><span class="cx"> if (m_valueList->size() == 1 && m_valueList->current()->id == CSSValueNormal) {
</span><del>- RefPtr<CSSPrimitiveValue> normalValue = CSSValuePool::singleton().createIdentifierValue(CSSValueNormal);
</del><ins>+ auto normalValue = CSSValuePool::singleton().createIdentifierValue(CSSValueNormal);
</ins><span class="cx"> m_valueList->next();
</span><del>- addProperty(CSSPropertyFontFeatureSettings, normalValue.release(), important);
</del><ins>+ addProperty(CSSPropertyFontFeatureSettings, WTFMove(normalValue), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RefPtr<CSSValueList> settings = CSSValueList::createCommaSeparated();
</del><ins>+ auto settings = CSSValueList::createCommaSeparated();
</ins><span class="cx"> for (CSSParserValue* value = m_valueList->current(); value; value = m_valueList->next()) {
</span><del>- if (!parseFontFeatureTag(*settings))
</del><ins>+ if (!parseFontFeatureTag(settings))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> // If the list isn't parsed fully, the current value should be comma.
</span><span class="lines">@@ -10789,7 +10718,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx"> if (settings->length()) {
</span><del>- addProperty(CSSPropertyFontFeatureSettings, settings.release(), important);
</del><ins>+ addProperty(CSSPropertyFontFeatureSettings, WTFMove(settings), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return false;
</span><span class="lines">@@ -11226,7 +11155,7 @@
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseWillChange(bool important)
</span><span class="cx"> {
</span><del>- RefPtr<CSSValueList> willChangePropertyValues = CSSValueList::createCommaSeparated();
</del><ins>+ auto willChangePropertyValues = CSSValueList::createCommaSeparated();
</ins><span class="cx">
</span><span class="cx"> bool expectComma = false;
</span><span class="cx"> for (CSSParserValue* value = m_valueList->current(); value; value = m_valueList->next()) {
</span><span class="lines">@@ -11259,7 +11188,7 @@
</span><span class="cx"> expectComma = true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- addProperty(CSSPropertyWillChange, willChangePropertyValues.release(), important);
</del><ins>+ addProperty(CSSPropertyWillChange, WTFMove(willChangePropertyValues), important);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -12870,18 +12799,18 @@
</span><span class="cx"> return token();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<StyleRuleBase> CSSParser::createImportRule(const CSSParserString& url, RefPtr<MediaQuerySet>&& media)
</del><ins>+RefPtr<StyleRuleImport> CSSParser::createImportRule(const CSSParserString& url, RefPtr<MediaQuerySet>&& media)
</ins><span class="cx"> {
</span><span class="cx"> if (!media || !m_allowImportRules) {
</span><span class="cx"> popRuleData();
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><del>- RefPtr<StyleRuleImport> rule = StyleRuleImport::create(url, media);
</del><ins>+ auto rule = StyleRuleImport::create(url, media);
</ins><span class="cx"> processAndAddNewRuleToSourceTreeIfNeeded();
</span><del>- return rule;
</del><ins>+ return WTFMove(rule);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<StyleRuleBase> CSSParser::createMediaRule(RefPtr<MediaQuerySet>&& media, RuleList* rules)
</del><ins>+Ref<StyleRuleMedia> CSSParser::createMediaRule(RefPtr<MediaQuerySet>&& media, RuleList* rules)
</ins><span class="cx"> {
</span><span class="cx"> m_allowImportRules = m_allowNamespaceDeclarations = false;
</span><span class="cx"> RefPtr<StyleRuleMedia> rule;
</span><span class="lines">@@ -12893,20 +12822,19 @@
</span><span class="cx"> } else
</span><span class="cx"> rule = StyleRuleMedia::create(media, rules ? *rules : emptyRules);
</span><span class="cx"> processAndAddNewRuleToSourceTreeIfNeeded();
</span><del>- return rule;
</del><ins>+ return rule.releaseNonNull();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<StyleRuleBase> CSSParser::createEmptyMediaRule(RuleList* rules)
</del><ins>+Ref<StyleRuleMedia> CSSParser::createEmptyMediaRule(RuleList* rules)
</ins><span class="cx"> {
</span><span class="cx"> return createMediaRule(MediaQuerySet::create(), rules);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<StyleRuleBase> CSSParser::createSupportsRule(bool conditionIsSupported, RuleList* rules)
</del><ins>+Ref<StyleRuleSupports> CSSParser::createSupportsRule(bool conditionIsSupported, RuleList* rules)
</ins><span class="cx"> {
</span><span class="cx"> m_allowImportRules = m_allowNamespaceDeclarations = false;
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSRuleSourceData> data = popSupportsRuleData();
</span><del>- RefPtr<StyleRuleSupports> rule;
</del><span class="cx"> String conditionText;
</span><span class="cx"> unsigned conditionOffset = data->ruleHeaderRange.start + 9;
</span><span class="cx"> unsigned conditionLength = data->ruleHeaderRange.length() - 9;
</span><span class="lines">@@ -12916,6 +12844,7 @@
</span><span class="cx"> else
</span><span class="cx"> conditionText = String(m_dataStart16.get() + conditionOffset, conditionLength).stripWhiteSpace();
</span><span class="cx">
</span><ins>+ RefPtr<StyleRuleSupports> rule;
</ins><span class="cx"> if (rules)
</span><span class="cx"> rule = StyleRuleSupports::create(conditionText, conditionIsSupported, *rules);
</span><span class="cx"> else {
</span><span class="lines">@@ -12925,7 +12854,7 @@
</span><span class="cx">
</span><span class="cx"> processAndAddNewRuleToSourceTreeIfNeeded();
</span><span class="cx">
</span><del>- return rule;
</del><ins>+ return rule.releaseNonNull();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSParser::markSupportsRuleHeaderStart()
</span><span class="lines">@@ -12933,9 +12862,9 @@
</span><span class="cx"> if (!m_supportsRuleDataStack)
</span><span class="cx"> m_supportsRuleDataStack = std::make_unique<RuleSourceDataList>();
</span><span class="cx">
</span><del>- RefPtr<CSSRuleSourceData> data = CSSRuleSourceData::create(CSSRuleSourceData::SUPPORTS_RULE);
</del><ins>+ auto data = CSSRuleSourceData::create(CSSRuleSourceData::SUPPORTS_RULE);
</ins><span class="cx"> data->ruleHeaderRange.start = tokenStartOffset();
</span><del>- m_supportsRuleDataStack->append(data);
</del><ins>+ m_supportsRuleDataStack->append(WTFMove(data));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSParser::markSupportsRuleHeaderEnd()
</span><span class="lines">@@ -12948,12 +12877,10 @@
</span><span class="cx"> m_supportsRuleDataStack->last()->ruleHeaderRange.end = tokenStart<UChar>() - m_dataStart16.get();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSRuleSourceData> CSSParser::popSupportsRuleData()
</del><ins>+Ref<CSSRuleSourceData> CSSParser::popSupportsRuleData()
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(m_supportsRuleDataStack && !m_supportsRuleDataStack->isEmpty());
</span><del>- RefPtr<CSSRuleSourceData> data = m_supportsRuleDataStack->last();
- m_supportsRuleDataStack->removeLast();
- return data;
</del><ins>+ return m_supportsRuleDataStack->takeLast();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSParser::processAndAddNewRuleToSourceTreeIfNeeded()
</span><span class="lines">@@ -12961,20 +12888,20 @@
</span><span class="cx"> if (!isExtractingSourceData())
</span><span class="cx"> return;
</span><span class="cx"> markRuleBodyEnd();
</span><del>- RefPtr<CSSRuleSourceData> rule = popRuleData();
- fixUnparsedPropertyRanges(rule.get());
- addNewRuleToSourceTree(rule.release());
</del><ins>+ Ref<CSSRuleSourceData> rule = *popRuleData();
+ fixUnparsedPropertyRanges(rule);
+ addNewRuleToSourceTree(WTFMove(rule));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void CSSParser::addNewRuleToSourceTree(RefPtr<CSSRuleSourceData>&& rule)
</del><ins>+void CSSParser::addNewRuleToSourceTree(Ref<CSSRuleSourceData>&& rule)
</ins><span class="cx"> {
</span><span class="cx"> // Precondition: (isExtractingSourceData()).
</span><span class="cx"> if (!m_ruleSourceDataResult)
</span><span class="cx"> return;
</span><span class="cx"> if (m_currentRuleDataStack->isEmpty())
</span><del>- m_ruleSourceDataResult->append(rule);
</del><ins>+ m_ruleSourceDataResult->append(WTFMove(rule));
</ins><span class="cx"> else
</span><del>- m_currentRuleDataStack->last()->childRules.append(rule);
</del><ins>+ m_currentRuleDataStack->last()->childRules.append(WTFMove(rule));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSRuleSourceData> CSSParser::popRuleData()
</span><span class="lines">@@ -12984,9 +12911,7 @@
</span><span class="cx">
</span><span class="cx"> ASSERT(!m_currentRuleDataStack->isEmpty());
</span><span class="cx"> m_currentRuleData = nullptr;
</span><del>- RefPtr<CSSRuleSourceData> data = m_currentRuleDataStack->last();
- m_currentRuleDataStack->removeLast();
- return data;
</del><ins>+ return m_currentRuleDataStack->takeLast();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSParser::syntaxError(const Location& location, SyntaxErrorType error)
</span><span class="lines">@@ -13025,19 +12950,18 @@
</span><span class="cx"> console.addMessage(MessageSource::CSS, MessageLevel::Warning, message, m_styleSheet->baseURL().string(), lineNumber + 1, columnNumber + 1);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<StyleRuleKeyframes> CSSParser::createKeyframesRule(const String& name, std::unique_ptr<Vector<RefPtr<StyleKeyframe>>> popKeyframes)
</del><ins>+Ref<StyleRuleKeyframes> CSSParser::createKeyframesRule(const String& name, std::unique_ptr<Vector<RefPtr<StyleKeyframe>>> keyframes)
</ins><span class="cx"> {
</span><del>- std::unique_ptr<Vector<RefPtr<StyleKeyframe>>> keyframes = WTFMove(popKeyframes);
</del><span class="cx"> m_allowImportRules = m_allowNamespaceDeclarations = false;
</span><del>- RefPtr<StyleRuleKeyframes> rule = StyleRuleKeyframes::create();
- for (size_t i = 0; i < keyframes->size(); ++i)
- rule->parserAppendKeyframe(keyframes->at(i));
</del><ins>+ Ref<StyleRuleKeyframes> rule = StyleRuleKeyframes::create();
+ for (auto& keyFrame : *keyframes)
+ rule->parserAppendKeyframe(WTFMove(keyFrame));
</ins><span class="cx"> rule->setName(name);
</span><span class="cx"> processAndAddNewRuleToSourceTreeIfNeeded();
</span><span class="cx"> return rule;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<StyleRuleBase> CSSParser::createStyleRule(Vector<std::unique_ptr<CSSParserSelector>>* selectors)
</del><ins>+RefPtr<StyleRule> CSSParser::createStyleRule(Vector<std::unique_ptr<CSSParserSelector>>* selectors)
</ins><span class="cx"> {
</span><span class="cx"> RefPtr<StyleRule> rule;
</span><span class="cx"> if (selectors) {
</span><span class="lines">@@ -13052,11 +12976,10 @@
</span><span class="cx"> return rule;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<StyleRuleBase> CSSParser::createFontFaceRule()
</del><ins>+RefPtr<StyleRuleFontFace> CSSParser::createFontFaceRule()
</ins><span class="cx"> {
</span><span class="cx"> m_allowImportRules = m_allowNamespaceDeclarations = false;
</span><del>- for (unsigned i = 0; i < m_parsedProperties.size(); ++i) {
- CSSProperty& property = m_parsedProperties[i];
</del><ins>+ for (auto& property : m_parsedProperties) {
</ins><span class="cx"> if (property.id() == CSSPropertyFontFamily && (!is<CSSValueList>(*property.value()) || downcast<CSSValueList>(*property.value()).length() != 1)) {
</span><span class="cx"> // Unlike font-family property, font-family descriptor in @font-face rule
</span><span class="cx"> // has to be a value list with exactly one family name. It cannot have a
</span><span class="lines">@@ -13067,10 +12990,10 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- RefPtr<StyleRuleFontFace> rule = StyleRuleFontFace::create(createStyleProperties());
</del><ins>+ auto rule = StyleRuleFontFace::create(createStyleProperties());
</ins><span class="cx"> clearProperties();
</span><span class="cx"> processAndAddNewRuleToSourceTreeIfNeeded();
</span><del>- return rule;
</del><ins>+ return WTFMove(rule);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSParser::addNamespace(const AtomicString& prefix, const AtomicString& uri)
</span><span class="lines">@@ -13145,21 +13068,23 @@
</span><span class="cx"> return specifiers;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<StyleRuleBase> CSSParser::createPageRule(std::unique_ptr<CSSParserSelector> pageSelector)
</del><ins>+RefPtr<StyleRulePage> CSSParser::createPageRule(std::unique_ptr<CSSParserSelector> pageSelector)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: Margin at-rules are ignored.
</span><span class="cx"> m_allowImportRules = m_allowNamespaceDeclarations = false;
</span><del>- RefPtr<StyleRulePage> rule;
</del><span class="cx"> if (pageSelector) {
</span><del>- rule = StyleRulePage::create(createStyleProperties());
</del><ins>+ auto rule = StyleRulePage::create(createStyleProperties());
</ins><span class="cx"> Vector<std::unique_ptr<CSSParserSelector>> selectorVector;
</span><span class="cx"> selectorVector.append(WTFMove(pageSelector));
</span><span class="cx"> rule->parserAdoptSelectorVector(selectorVector);
</span><span class="cx"> processAndAddNewRuleToSourceTreeIfNeeded();
</span><del>- } else
- popRuleData();
</del><ins>+ clearProperties();
+ return WTFMove(rule);
+ }
+
+ popRuleData();
</ins><span class="cx"> clearProperties();
</span><del>- return rule;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> std::unique_ptr<Vector<std::unique_ptr<CSSParserSelector>>> CSSParser::createSelectorVector()
</span><span class="lines">@@ -13177,7 +13102,7 @@
</span><span class="cx"> m_recycledSelectorVector = WTFMove(vector);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<StyleRuleBase> CSSParser::createRegionRule(Vector<std::unique_ptr<CSSParserSelector>>* regionSelector, RuleList* rules)
</del><ins>+RefPtr<StyleRuleRegion> CSSParser::createRegionRule(Vector<std::unique_ptr<CSSParserSelector>>* regionSelector, RuleList* rules)
</ins><span class="cx"> {
</span><span class="cx"> if (!regionSelector || !rules) {
</span><span class="cx"> popRuleData();
</span><span class="lines">@@ -13186,12 +13111,12 @@
</span><span class="cx">
</span><span class="cx"> m_allowImportRules = m_allowNamespaceDeclarations = false;
</span><span class="cx">
</span><del>- RefPtr<StyleRuleRegion> regionRule = StyleRuleRegion::create(regionSelector, *rules);
</del><ins>+ auto regionRule = StyleRuleRegion::create(regionSelector, *rules);
</ins><span class="cx">
</span><span class="cx"> if (isExtractingSourceData())
</span><span class="cx"> addNewRuleToSourceTree(CSSRuleSourceData::createUnknown());
</span><span class="cx">
</span><del>- return regionRule;
</del><ins>+ return WTFMove(regionRule);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSParser::createMarginAtRule(CSSSelector::MarginBoxType /* marginBox */)
</span><span class="lines">@@ -13212,7 +13137,7 @@
</span><span class="cx"> void CSSParser::endDeclarationsForMarginBox()
</span><span class="cx"> {
</span><span class="cx"> rollbackLastProperties(m_parsedProperties.size() - m_numParsedPropertiesBeforeMarginBox);
</span><del>- m_numParsedPropertiesBeforeMarginBox = INVALID_NUM_PARSED_PROPERTIES;
</del><ins>+ m_numParsedPropertiesBeforeMarginBox = invalidParsedPropertiesCount;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<StyleKeyframe> CSSParser::createKeyframe(CSSParserValueList& keys)
</span><span class="lines">@@ -13243,12 +13168,12 @@
</span><span class="cx"> keyString.append('%');
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RefPtr<StyleKeyframe> keyframe = StyleKeyframe::create(createStyleProperties());
</del><ins>+ auto keyframe = StyleKeyframe::create(createStyleProperties());
</ins><span class="cx"> keyframe->setKeyText(keyString.toString());
</span><span class="cx">
</span><span class="cx"> clearProperties();
</span><span class="cx">
</span><del>- return keyframe;
</del><ins>+ return WTFMove(keyframe);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSParser::invalidBlockHit()
</span><span class="lines">@@ -13262,24 +13187,24 @@
</span><span class="cx"> m_lastSelectorLineNumber = m_lineNumber;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void CSSParser::updateLastMediaLine(MediaQuerySet* media)
</del><ins>+void CSSParser::updateLastMediaLine(MediaQuerySet& media)
</ins><span class="cx"> {
</span><del>- media->setLastLine(m_lineNumber);
</del><ins>+ media.setLastLine(m_lineNumber);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template <typename CharacterType>
</span><del>-static inline void fixUnparsedProperties(const CharacterType* characters, CSSRuleSourceData* ruleData)
</del><ins>+static inline void fixUnparsedProperties(const CharacterType* characters, CSSRuleSourceData& ruleData)
</ins><span class="cx"> {
</span><del>- Vector<CSSPropertySourceData>& propertyData = ruleData->styleSourceData->propertyData;
</del><ins>+ auto& propertyData = ruleData.styleSourceData->propertyData;
</ins><span class="cx"> unsigned size = propertyData.size();
</span><span class="cx"> if (!size)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- unsigned styleStart = ruleData->ruleBodyRange.start;
- CSSPropertySourceData* nextData = &(propertyData.at(0));
</del><ins>+ unsigned styleStart = ruleData.ruleBodyRange.start;
+ auto* nextData = &propertyData[0];
</ins><span class="cx"> for (unsigned i = 0; i < size; ++i) {
</span><del>- CSSPropertySourceData* currentData = nextData;
- nextData = i < size - 1 ? &(propertyData.at(i + 1)) : 0;
</del><ins>+ auto* currentData = nextData;
+ nextData = i < size - 1 ? &propertyData[i + 1] : 0;
</ins><span class="cx">
</span><span class="cx"> if (currentData->parsedOk)
</span><span class="cx"> continue;
</span><span class="lines">@@ -13288,7 +13213,7 @@
</span><span class="cx">
</span><span class="cx"> unsigned propertyEndInStyleSheet;
</span><span class="cx"> if (!nextData)
</span><del>- propertyEndInStyleSheet = ruleData->ruleBodyRange.end - 1;
</del><ins>+ propertyEndInStyleSheet = ruleData.ruleBodyRange.end - 1;
</ins><span class="cx"> else
</span><span class="cx"> propertyEndInStyleSheet = styleStart + nextData->range.start - 1;
</span><span class="cx">
</span><span class="lines">@@ -13312,9 +13237,9 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void CSSParser::fixUnparsedPropertyRanges(CSSRuleSourceData* ruleData)
</del><ins>+void CSSParser::fixUnparsedPropertyRanges(CSSRuleSourceData& ruleData)
</ins><span class="cx"> {
</span><del>- if (!ruleData->styleSourceData)
</del><ins>+ if (!ruleData.styleSourceData)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (is8BitSource()) {
</span><span class="lines">@@ -13430,7 +13355,7 @@
</span><span class="cx"> if (tokenStartChar() == ';') // Include semicolon into the property text.
</span><span class="cx"> ++offset;
</span><span class="cx"> m_propertyRange.end = offset;
</span><del>- if (m_propertyRange.start != UINT_MAX && !m_currentRuleDataStack->isEmpty()) {
</del><ins>+ if (m_propertyRange.start != std::numeric_limits<unsigned>::max() && !m_currentRuleDataStack->isEmpty()) {
</ins><span class="cx"> // This stuff is only executed when the style data retrieval is requested by client.
</span><span class="cx"> const unsigned start = m_propertyRange.start;
</span><span class="cx"> const unsigned end = m_propertyRange.end;
</span><span class="lines">@@ -13517,14 +13442,14 @@
</span><span class="cx"> m_valueList->next();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (parsedValue) {
- if (!m_valueList->current() || inShorthand()) {
- addProperty(propId, parsedValue.release(), important);
- return true;
- }
- }
</del><ins>+ if (!parsedValue)
+ return false;
</ins><span class="cx">
</span><del>- return false;
</del><ins>+ if (m_valueList->current() && !inShorthand())
+ return false;
+
+ addProperty(propId, parsedValue.releaseNonNull(), important);
+ return true;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseViewportShorthand(CSSPropertyID propId, CSSPropertyID first, CSSPropertyID second, bool important)
</span><span class="lines">@@ -13611,7 +13536,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (!strcmp(propertyName, "-webkit-hyphenate-locale")) {
</span><span class="cx"> // Worked in iOS 4.2.
</span><del>- static const char* const webkitLocale = "-webkit-locale";
</del><ins>+ static const char webkitLocale[] = "-webkit-locale";
</ins><span class="cx"> propertyNameAlias = webkitLocale;
</span><span class="cx"> newLength = strlen(webkitLocale);
</span><span class="cx"> }
</span><span class="lines">@@ -13620,8 +13545,8 @@
</span><span class="cx">
</span><span class="cx"> static bool isAppleLegacyCssValueKeyword(const char* valueKeyword, unsigned length)
</span><span class="cx"> {
</span><del>- static const char* applePrefix = "-apple-";
- static const char* appleSystemPrefix = "-apple-system";
</del><ins>+ static const char applePrefix[] = "-apple-";
+ static const char appleSystemPrefix[] = "-apple-system";
</ins><span class="cx"> static const char* appleWirelessPlaybackTargetActive = getValueName(CSSValueAppleWirelessPlaybackTargetActive);
</span><span class="cx">
</span><span class="cx"> return hasPrefix(valueKeyword, length, applePrefix)
</span><span class="lines">@@ -13804,7 +13729,7 @@
</span><span class="cx"> unsigned length = string.length();
</span><span class="cx">
</span><span class="cx"> if (!length)
</span><del>- return String("\'\'");
</del><ins>+ return ASCIILiteral("\'\'");
</ins><span class="cx">
</span><span class="cx"> if (length > std::numeric_limits<unsigned>::max() / 3 - 2)
</span><span class="cx"> return emptyString();
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSParser.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include "Color.h"
</span><span class="cx"> #include "MediaQuery.h"
</span><span class="cx"> #include "SourceSizeList.h"
</span><ins>+#include "StyleRuleImport.h"
</ins><span class="cx"> #include "WebKitCSSFilterValue.h"
</span><span class="cx"> #include <memory>
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="lines">@@ -49,12 +50,17 @@
</span><span class="cx">
</span><span class="cx"> class AnimationParseContext;
</span><span class="cx"> class CSSBorderImageSliceValue;
</span><ins>+class CSSContentDistributionValue;
</ins><span class="cx"> class CSSPrimitiveValue;
</span><span class="cx"> class CSSSelectorList;
</span><span class="cx"> class CSSValue;
</span><span class="cx"> class CSSValueList;
</span><span class="cx"> class CSSBasicShape;
</span><ins>+class CSSBasicShapeCircle;
+class CSSBasicShapeEllipse;
</ins><span class="cx"> class CSSBasicShapeInset;
</span><ins>+class CSSBasicShapePath;
+class CSSBasicShapePolygon;
</ins><span class="cx"> class CSSGridLineNamesValue;
</span><span class="cx"> class CSSVariableDependentValue;
</span><span class="cx"> class Document;
</span><span class="lines">@@ -63,15 +69,28 @@
</span><span class="cx"> class MediaQueryExp;
</span><span class="cx"> class MediaQuerySet;
</span><span class="cx"> class MutableStyleProperties;
</span><ins>+class SVGColor;
+class SVGPaint;
</ins><span class="cx"> class StyleKeyframe;
</span><span class="cx"> class StylePropertyShorthand;
</span><ins>+class StyleRule;
</ins><span class="cx"> class StyleRuleBase;
</span><ins>+class StyleRuleFontFace;
</ins><span class="cx"> class StyleRuleKeyframes;
</span><ins>+class StyleRuleMedia;
+class StyleRulePage;
+class StyleRuleRegion;
+class StyleRuleSupports;
</ins><span class="cx"> class StyleRuleViewport;
</span><span class="cx"> class StyleKeyframe;
</span><span class="cx"> class StyleSheetContents;
</span><span class="cx"> class StyledElement;
</span><ins>+class WebKitCSSTransformValue;
</ins><span class="cx">
</span><ins>+#if ENABLE(CSS_IMAGE_SET)
+class CSSImageSetValue;
+#endif
+
</ins><span class="cx"> class CSSParser {
</span><span class="cx"> friend inline int cssyylex(void*, CSSParser*);
</span><span class="cx">
</span><span class="lines">@@ -117,8 +136,8 @@
</span><span class="cx"> RefPtr<StyleKeyframe> parseKeyframeRule(StyleSheetContents*, const String&);
</span><span class="cx"> bool parseSupportsCondition(const String&);
</span><span class="cx">
</span><del>- static ParseResult parseValue(MutableStyleProperties*, CSSPropertyID, const String&, bool important, CSSParserMode, StyleSheetContents*);
- static ParseResult parseCustomPropertyValue(MutableStyleProperties*, const AtomicString& propertyName, const String&, bool important, CSSParserMode, StyleSheetContents* contextStyleSheet);
</del><ins>+ static ParseResult parseValue(MutableStyleProperties&, CSSPropertyID, const String&, bool important, CSSParserMode, StyleSheetContents*);
+ static ParseResult parseCustomPropertyValue(MutableStyleProperties&, const AtomicString& propertyName, const String&, bool important, CSSParserMode, StyleSheetContents* contextStyleSheet);
</ins><span class="cx">
</span><span class="cx"> static bool parseColor(RGBA32& color, const String&, bool strict = false);
</span><span class="cx"> static bool isValidSystemColorValue(CSSValueID);
</span><span class="lines">@@ -126,14 +145,14 @@
</span><span class="cx"> static RefPtr<CSSValueList> parseFontFaceValue(const AtomicString&);
</span><span class="cx"> RefPtr<CSSPrimitiveValue> parseValidPrimitive(CSSValueID ident, ValueWithCalculation&);
</span><span class="cx">
</span><del>- WEBCORE_EXPORT bool parseDeclaration(MutableStyleProperties*, const String&, RefPtr<CSSRuleSourceData>&&, StyleSheetContents* contextStyleSheet);
</del><ins>+ WEBCORE_EXPORT bool parseDeclaration(MutableStyleProperties&, const String&, RefPtr<CSSRuleSourceData>&&, StyleSheetContents* contextStyleSheet);
</ins><span class="cx"> static Ref<ImmutableStyleProperties> parseInlineStyleDeclaration(const String&, Element*);
</span><span class="cx"> std::unique_ptr<MediaQuery> parseMediaQuery(const String&);
</span><span class="cx">
</span><span class="cx"> void addProperty(CSSPropertyID, RefPtr<CSSValue>&&, bool important, bool implicit = false);
</span><span class="cx"> void rollbackLastProperties(int num);
</span><span class="cx"> bool hasProperties() const { return !m_parsedProperties.isEmpty(); }
</span><del>- void addExpandedPropertyForValue(CSSPropertyID propId, RefPtr<CSSValue>&&, bool);
</del><ins>+ void addExpandedPropertyForValue(CSSPropertyID propId, Ref<CSSValue>&&, bool);
</ins><span class="cx">
</span><span class="cx"> bool parseValue(CSSPropertyID, bool important);
</span><span class="cx"> bool parseShorthand(CSSPropertyID, const StylePropertyShorthand&, bool important);
</span><span class="lines">@@ -144,9 +163,9 @@
</span><span class="cx">
</span><span class="cx"> bool parseCustomPropertyDeclaration(bool important, CSSValueID);
</span><span class="cx">
</span><del>- RefPtr<CSSValue> parseAttr(CSSParserValueList& args);
</del><ins>+ RefPtr<CSSPrimitiveValue> parseAttr(CSSParserValueList& args);
</ins><span class="cx">
</span><del>- RefPtr<CSSValue> parseBackgroundColor();
</del><ins>+ RefPtr<CSSPrimitiveValue> parseBackgroundColor();
</ins><span class="cx">
</span><span class="cx"> struct SourceSize {
</span><span class="cx"> std::unique_ptr<MediaQueryExp> expression;
</span><span class="lines">@@ -168,11 +187,11 @@
</span><span class="cx"> void parse2ValuesFillPosition(CSSParserValueList&, RefPtr<CSSPrimitiveValue>&, RefPtr<CSSPrimitiveValue>&);
</span><span class="cx"> bool isPotentialPositionValue(CSSParserValue&);
</span><span class="cx"> void parseFillPosition(CSSParserValueList&, RefPtr<CSSPrimitiveValue>&, RefPtr<CSSPrimitiveValue>&);
</span><del>- void parse3ValuesFillPosition(CSSParserValueList&, RefPtr<CSSPrimitiveValue>&, RefPtr<CSSPrimitiveValue>&, RefPtr<CSSPrimitiveValue>&&, RefPtr<CSSPrimitiveValue>&&);
- void parse4ValuesFillPosition(CSSParserValueList&, RefPtr<CSSPrimitiveValue>&, RefPtr<CSSPrimitiveValue>&, RefPtr<CSSPrimitiveValue>&&, RefPtr<CSSPrimitiveValue>&&);
</del><ins>+ void parse3ValuesFillPosition(CSSParserValueList&, RefPtr<CSSPrimitiveValue>&, RefPtr<CSSPrimitiveValue>&, Ref<CSSPrimitiveValue>&&, Ref<CSSPrimitiveValue>&&);
+ void parse4ValuesFillPosition(CSSParserValueList&, RefPtr<CSSPrimitiveValue>&, RefPtr<CSSPrimitiveValue>&, Ref<CSSPrimitiveValue>&&, Ref<CSSPrimitiveValue>&&);
</ins><span class="cx">
</span><span class="cx"> void parseFillRepeat(RefPtr<CSSValue>&, RefPtr<CSSValue>&);
</span><del>- RefPtr<CSSValue> parseFillSize(CSSPropertyID, bool &allowComma);
</del><ins>+ RefPtr<CSSPrimitiveValue> parseFillSize(CSSPropertyID, bool &allowComma);
</ins><span class="cx">
</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="lines">@@ -180,14 +199,14 @@
</span><span class="cx"> void addFillValue(RefPtr<CSSValue>& lval, Ref<CSSValue>&& rval);
</span><span class="cx"> void addAnimationValue(RefPtr<CSSValue>& lval, Ref<CSSValue>&& rval);
</span><span class="cx">
</span><del>- RefPtr<CSSValue> parseAnimationDelay();
- RefPtr<CSSValue> parseAnimationDirection();
- RefPtr<CSSValue> parseAnimationDuration();
- RefPtr<CSSValue> parseAnimationFillMode();
- RefPtr<CSSValue> parseAnimationIterationCount();
- RefPtr<CSSValue> parseAnimationName();
- RefPtr<CSSValue> parseAnimationPlayState();
- RefPtr<CSSValue> parseAnimationProperty(AnimationParseContext&);
</del><ins>+ RefPtr<CSSPrimitiveValue> parseAnimationDelay();
+ RefPtr<CSSPrimitiveValue> parseAnimationDirection();
+ RefPtr<CSSPrimitiveValue> parseAnimationDuration();
+ RefPtr<CSSPrimitiveValue> parseAnimationFillMode();
+ RefPtr<CSSPrimitiveValue> parseAnimationIterationCount();
+ RefPtr<CSSPrimitiveValue> parseAnimationName();
+ RefPtr<CSSPrimitiveValue> parseAnimationPlayState();
+ RefPtr<CSSPrimitiveValue> parseAnimationProperty(AnimationParseContext&);
</ins><span class="cx"> RefPtr<CSSValue> parseAnimationTimingFunction();
</span><span class="cx"> #if ENABLE(CSS_ANIMATIONS_LEVEL_2)
</span><span class="cx"> RefPtr<CSSValue> parseAnimationTrigger();
</span><span class="lines">@@ -200,8 +219,8 @@
</span><span class="cx"> bool parseTransitionShorthand(CSSPropertyID, bool important);
</span><span class="cx"> bool parseAnimationShorthand(CSSPropertyID, bool important);
</span><span class="cx">
</span><del>- RefPtr<CSSValue> parseColumnWidth();
- RefPtr<CSSValue> parseColumnCount();
</del><ins>+ RefPtr<CSSPrimitiveValue> parseColumnWidth();
+ RefPtr<CSSPrimitiveValue> parseColumnCount();
</ins><span class="cx"> bool parseColumnsShorthand(bool important);
</span><span class="cx">
</span><span class="cx"> #if ENABLE(IOS_TEXT_AUTOSIZING)
</span><span class="lines">@@ -236,27 +255,27 @@
</span><span class="cx">
</span><span class="cx"> bool parseLegacyPosition(CSSPropertyID, bool important);
</span><span class="cx"> bool parseItemPositionOverflowPosition(CSSPropertyID, bool important);
</span><del>- RefPtr<CSSValue> parseContentDistributionOverflowPosition();
</del><ins>+ RefPtr<CSSContentDistributionValue> parseContentDistributionOverflowPosition();
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><span class="cx"> RefPtr<CSSValue> parseShapeProperty(CSSPropertyID);
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- RefPtr<CSSValue> parseBasicShapeAndOrBox(CSSPropertyID propId);
</del><ins>+ RefPtr<CSSValueList> parseBasicShapeAndOrBox(CSSPropertyID propId);
</ins><span class="cx"> RefPtr<CSSPrimitiveValue> parseBasicShape();
</span><span class="cx"> RefPtr<CSSPrimitiveValue> parseShapeRadius(CSSParserValue&);
</span><del>- RefPtr<CSSBasicShape> parseBasicShapeCircle(CSSParserValueList&);
- RefPtr<CSSBasicShape> parseBasicShapeEllipse(CSSParserValueList&);
- RefPtr<CSSBasicShape> parseBasicShapePolygon(CSSParserValueList&);
- RefPtr<CSSBasicShape> parseBasicShapePath(CSSParserValueList&);
- RefPtr<CSSBasicShape> parseBasicShapeInset(CSSParserValueList&);
</del><ins>+ RefPtr<CSSBasicShapeCircle> parseBasicShapeCircle(CSSParserValueList&);
+ RefPtr<CSSBasicShapeEllipse> parseBasicShapeEllipse(CSSParserValueList&);
+ RefPtr<CSSBasicShapePolygon> parseBasicShapePolygon(CSSParserValueList&);
+ RefPtr<CSSBasicShapePath> parseBasicShapePath(CSSParserValueList&);
+ RefPtr<CSSBasicShapeInset> parseBasicShapeInset(CSSParserValueList&);
</ins><span class="cx">
</span><span class="cx"> bool parseFont(bool important);
</span><span class="cx"> void parseSystemFont(bool important);
</span><span class="cx"> RefPtr<CSSValueList> parseFontFamily();
</span><span class="cx">
</span><span class="cx"> bool parseCounter(CSSPropertyID, int defaultValue, bool important);
</span><del>- RefPtr<CSSValue> parseCounterContent(CSSParserValueList& args, bool counters);
</del><ins>+ RefPtr<CSSPrimitiveValue> parseCounterContent(CSSParserValueList& args, bool counters);
</ins><span class="cx">
</span><span class="cx"> bool parseColorParameters(CSSParserValue&, int* colorValues, bool parseAlpha);
</span><span class="cx"> bool parseHSLParameters(CSSParserValue&, double* colorValues, bool parseAlpha);
</span><span class="lines">@@ -275,10 +294,10 @@
</span><span class="cx"> bool parseFontFaceUnicodeRange();
</span><span class="cx">
</span><span class="cx"> bool parseSVGValue(CSSPropertyID propId, bool important);
</span><del>- RefPtr<CSSValue> parseSVGPaint();
- RefPtr<CSSValue> parseSVGColor();
- RefPtr<CSSValue> parseSVGStrokeDasharray();
- RefPtr<CSSValue> parsePaintOrder();
</del><ins>+ RefPtr<SVGPaint> parseSVGPaint();
+ RefPtr<SVGColor> parseSVGColor();
+ RefPtr<CSSValueList> parseSVGStrokeDasharray();
+ RefPtr<CSSValueList> parsePaintOrder();
</ins><span class="cx">
</span><span class="cx"> // CSS3 Parsing Routines (for properties specific to CSS3)
</span><span class="cx"> RefPtr<CSSValueList> parseShadow(CSSParserValueList&, CSSPropertyID);
</span><span class="lines">@@ -309,16 +328,16 @@
</span><span class="cx"> bool parseCrossfade(CSSParserValueList&, RefPtr<CSSValue>&, bool prefixed);
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_IMAGE_RESOLUTION)
</span><del>- RefPtr<CSSValue> parseImageResolution();
</del><ins>+ RefPtr<CSSValueList> parseImageResolution();
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><del>- RefPtr<CSSValue> parseImageSet();
</del><ins>+ RefPtr<CSSImageSetValue> parseImageSet();
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> bool parseFilterImage(CSSParserValueList&, RefPtr<CSSValue>&);
</span><span class="cx">
</span><del>- bool parseFilter(CSSParserValueList&, RefPtr<CSSValue>&);
</del><ins>+ bool parseFilter(CSSParserValueList&, RefPtr<CSSValueList>&);
</ins><span class="cx"> RefPtr<WebKitCSSFilterValue> parseBuiltinFilterArguments(CSSParserValueList&, WebKitCSSFilterValue::FilterOperationType);
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValue> parseClipPath();
</span><span class="lines">@@ -327,7 +346,7 @@
</span><span class="cx"> static bool isCompositeOperator(CSSValueID);
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValueList> parseTransform();
</span><del>- RefPtr<CSSValue> parseTransformValue(CSSParserValue&);
</del><ins>+ RefPtr<WebKitCSSTransformValue> parseTransformValue(CSSParserValue&);
</ins><span class="cx"> bool parseTransformOrigin(CSSPropertyID propId, CSSPropertyID& propId1, CSSPropertyID& propId2, CSSPropertyID& propId3, RefPtr<CSSPrimitiveValue>&, RefPtr<CSSPrimitiveValue>&, RefPtr<CSSValue>&);
</span><span class="cx"> bool parsePerspectiveOrigin(CSSPropertyID propId, CSSPropertyID& propId1, CSSPropertyID& propId2, RefPtr<CSSPrimitiveValue>&, RefPtr<CSSPrimitiveValue>&);
</span><span class="cx">
</span><span class="lines">@@ -339,7 +358,7 @@
</span><span class="cx"> bool parseTextDecorationSkip(bool important);
</span><span class="cx"> bool parseTextUnderlinePosition(bool important);
</span><span class="cx">
</span><del>- RefPtr<CSSValue> parseTextIndent();
</del><ins>+ RefPtr<CSSValueList> parseTextIndent();
</ins><span class="cx">
</span><span class="cx"> bool parseHangingPunctuation(bool important);
</span><span class="cx">
</span><span class="lines">@@ -363,22 +382,22 @@
</span><span class="cx"> std::unique_ptr<Vector<std::unique_ptr<CSSParserSelector>>> createSelectorVector();
</span><span class="cx"> void recycleSelectorVector(std::unique_ptr<Vector<std::unique_ptr<CSSParserSelector>>>);
</span><span class="cx">
</span><del>- RefPtr<StyleRuleBase> createImportRule(const CSSParserString&, RefPtr<MediaQuerySet>&&);
</del><ins>+ RefPtr<StyleRuleImport> createImportRule(const CSSParserString&, RefPtr<MediaQuerySet>&&);
</ins><span class="cx"> RefPtr<StyleKeyframe> createKeyframe(CSSParserValueList&);
</span><del>- RefPtr<StyleRuleKeyframes> createKeyframesRule(const String&, std::unique_ptr<Vector<RefPtr<StyleKeyframe>>>);
</del><ins>+ Ref<StyleRuleKeyframes> createKeyframesRule(const String&, std::unique_ptr<Vector<RefPtr<StyleKeyframe>>>);
</ins><span class="cx">
</span><span class="cx"> typedef Vector<RefPtr<StyleRuleBase>> RuleList;
</span><del>- RefPtr<StyleRuleBase> createMediaRule(RefPtr<MediaQuerySet>&&, RuleList*);
- RefPtr<StyleRuleBase> createEmptyMediaRule(RuleList*);
- RefPtr<StyleRuleBase> createStyleRule(Vector<std::unique_ptr<CSSParserSelector>>* selectors);
- RefPtr<StyleRuleBase> createFontFaceRule();
- RefPtr<StyleRuleBase> createPageRule(std::unique_ptr<CSSParserSelector> pageSelector);
- RefPtr<StyleRuleBase> createRegionRule(Vector<std::unique_ptr<CSSParserSelector>>* regionSelector, RuleList* rules);
</del><ins>+ Ref<StyleRuleMedia> createMediaRule(RefPtr<MediaQuerySet>&&, RuleList*);
+ Ref<StyleRuleMedia> createEmptyMediaRule(RuleList*);
+ RefPtr<StyleRule> createStyleRule(Vector<std::unique_ptr<CSSParserSelector>>* selectors);
+ RefPtr<StyleRuleFontFace> createFontFaceRule();
+ RefPtr<StyleRulePage> createPageRule(std::unique_ptr<CSSParserSelector> pageSelector);
+ RefPtr<StyleRuleRegion> createRegionRule(Vector<std::unique_ptr<CSSParserSelector>>* regionSelector, RuleList* rules);
</ins><span class="cx"> void createMarginAtRule(CSSSelector::MarginBoxType);
</span><del>- RefPtr<StyleRuleBase> createSupportsRule(bool conditionIsSupported, RuleList*);
</del><ins>+ Ref<StyleRuleSupports> createSupportsRule(bool conditionIsSupported, RuleList*);
</ins><span class="cx"> void markSupportsRuleHeaderStart();
</span><span class="cx"> void markSupportsRuleHeaderEnd();
</span><del>- RefPtr<CSSRuleSourceData> popSupportsRuleData();
</del><ins>+ Ref<CSSRuleSourceData> popSupportsRuleData();
</ins><span class="cx">
</span><span class="cx"> void startDeclarationsForMarginBox();
</span><span class="cx"> void endDeclarationsForMarginBox();
</span><span class="lines">@@ -393,50 +412,52 @@
</span><span class="cx"> void invalidBlockHit();
</span><span class="cx">
</span><span class="cx"> void updateLastSelectorLineAndPosition();
</span><del>- void updateLastMediaLine(MediaQuerySet*);
</del><ins>+ void updateLastMediaLine(MediaQuerySet&);
</ins><span class="cx">
</span><span class="cx"> void clearProperties();
</span><span class="cx">
</span><span class="cx"> Ref<ImmutableStyleProperties> createStyleProperties();
</span><span class="cx">
</span><ins>+ static const unsigned invalidParsedPropertiesCount;
+
</ins><span class="cx"> CSSParserContext m_context;
</span><span class="cx">
</span><del>- bool m_important;
- CSSPropertyID m_id;
</del><ins>+ bool m_important { false };
+ CSSPropertyID m_id { CSSPropertyInvalid };
</ins><span class="cx"> AtomicString m_customPropertyName;
</span><del>- StyleSheetContents* m_styleSheet;
</del><ins>+ StyleSheetContents* m_styleSheet { nullptr };
</ins><span class="cx"> RefPtr<StyleRuleBase> m_rule;
</span><span class="cx"> RefPtr<StyleKeyframe> m_keyframe;
</span><span class="cx"> std::unique_ptr<MediaQuery> m_mediaQuery;
</span><span class="cx"> std::unique_ptr<Vector<SourceSize>> m_sourceSizeList;
</span><span class="cx"> std::unique_ptr<CSSParserValueList> m_valueList;
</span><del>- bool m_supportsCondition;
</del><ins>+ bool m_supportsCondition { false };
</ins><span class="cx">
</span><span class="cx"> ParsedPropertyVector m_parsedProperties;
</span><del>- CSSSelectorList* m_selectorListForParseSelector;
</del><ins>+ CSSSelectorList* m_selectorListForParseSelector { nullptr };
</ins><span class="cx">
</span><del>- unsigned m_numParsedPropertiesBeforeMarginBox;
</del><ins>+ unsigned m_numParsedPropertiesBeforeMarginBox { invalidParsedPropertiesCount };
</ins><span class="cx">
</span><del>- int m_inParseShorthand;
- CSSPropertyID m_currentShorthand;
- bool m_implicitShorthand;
</del><ins>+ int m_inParseShorthand { 0 };
+ CSSPropertyID m_currentShorthand { CSSPropertyInvalid };
+ bool m_implicitShorthand { false };
</ins><span class="cx">
</span><del>- bool m_hadSyntacticallyValidCSSRule;
- bool m_logErrors;
- bool m_ignoreErrorsInDeclaration;
</del><ins>+ bool m_hadSyntacticallyValidCSSRule { false };
+ bool m_logErrors { false };
+ bool m_ignoreErrorsInDeclaration { false };
</ins><span class="cx">
</span><del>- AtomicString m_defaultNamespace;
</del><ins>+ AtomicString m_defaultNamespace { starAtom };
</ins><span class="cx">
</span><span class="cx"> // tokenizer methods and data
</span><del>- size_t m_parsedTextPrefixLength;
- unsigned m_nestedSelectorLevel;
</del><ins>+ size_t m_parsedTextPrefixLength { 0 };
+ unsigned m_nestedSelectorLevel { 0 };
</ins><span class="cx"> SourceRange m_selectorRange;
</span><del>- SourceRange m_propertyRange;
</del><ins>+ SourceRange m_propertyRange { std::numeric_limits<unsigned>::max(), std::numeric_limits<unsigned>::max() };
</ins><span class="cx"> std::unique_ptr<RuleSourceDataList> m_currentRuleDataStack;
</span><span class="cx"> RefPtr<CSSRuleSourceData> m_currentRuleData;
</span><del>- RuleSourceDataList* m_ruleSourceDataResult;
</del><ins>+ RuleSourceDataList* m_ruleSourceDataResult { nullptr };
</ins><span class="cx">
</span><del>- void fixUnparsedPropertyRanges(CSSRuleSourceData*);
</del><ins>+ void fixUnparsedPropertyRanges(CSSRuleSourceData&);
</ins><span class="cx"> void markRuleHeaderStart(CSSRuleSourceData::Type);
</span><span class="cx"> void markRuleHeaderEnd();
</span><span class="cx">
</span><span class="lines">@@ -450,9 +471,9 @@
</span><span class="cx"> void markPropertyStart();
</span><span class="cx"> void markPropertyEnd(bool isImportantFound, bool isPropertyParsed);
</span><span class="cx"> void processAndAddNewRuleToSourceTreeIfNeeded();
</span><del>- void addNewRuleToSourceTree(RefPtr<CSSRuleSourceData>&&);
</del><ins>+ void addNewRuleToSourceTree(Ref<CSSRuleSourceData>&&);
</ins><span class="cx"> RefPtr<CSSRuleSourceData> popRuleData();
</span><del>- void resetPropertyRange() { m_propertyRange.start = m_propertyRange.end = UINT_MAX; }
</del><ins>+ void resetPropertyRange() { m_propertyRange.start = m_propertyRange.end = std::numeric_limits<unsigned>::max(); }
</ins><span class="cx"> bool isExtractingSourceData() const { return !!m_currentRuleDataStack; }
</span><span class="cx"> void syntaxError(const Location&, SyntaxErrorType = GeneralSyntaxError);
</span><span class="cx">
</span><span class="lines">@@ -571,10 +592,10 @@
</span><span class="cx"> bool isGeneratedImageValue(CSSParserValue&) const;
</span><span class="cx"> bool parseGeneratedImage(CSSParserValueList&, RefPtr<CSSValue>&);
</span><span class="cx">
</span><del>- ParseResult parseValue(MutableStyleProperties*, CSSPropertyID, const String&, bool important, StyleSheetContents* contextStyleSheet);
</del><ins>+ ParseResult parseValue(MutableStyleProperties&, CSSPropertyID, const String&, bool important, StyleSheetContents* contextStyleSheet);
</ins><span class="cx"> Ref<ImmutableStyleProperties> parseDeclaration(const String&, StyleSheetContents* contextStyleSheet);
</span><span class="cx">
</span><del>- RefPtr<CSSBasicShape> parseInsetRoundedCorners(RefPtr<CSSBasicShapeInset>&&, CSSParserValueList&);
</del><ins>+ RefPtr<CSSBasicShapeInset> parseInsetRoundedCorners(Ref<CSSBasicShapeInset>&&, CSSParserValueList&);
</ins><span class="cx">
</span><span class="cx"> enum SizeParameterType {
</span><span class="cx"> None,
</span><span class="lines">@@ -611,36 +632,36 @@
</span><span class="cx"> NthChildMode
</span><span class="cx"> };
</span><span class="cx">
</span><del>- ParsingMode m_parsingMode;
- bool m_is8BitSource;
</del><ins>+ ParsingMode m_parsingMode { NormalMode };
+ bool m_is8BitSource { false };
</ins><span class="cx"> std::unique_ptr<LChar[]> m_dataStart8;
</span><span class="cx"> std::unique_ptr<UChar[]> m_dataStart16;
</span><del>- LChar* m_currentCharacter8;
- UChar* m_currentCharacter16;
</del><ins>+ LChar* m_currentCharacter8 { nullptr };
+ UChar* m_currentCharacter16 { nullptr };
</ins><span class="cx"> union {
</span><span class="cx"> LChar* ptr8;
</span><span class="cx"> UChar* ptr16;
</span><del>- } m_tokenStart;
- unsigned m_length;
- int m_token;
- int m_lineNumber;
- int m_tokenStartLineNumber;
- int m_tokenStartColumnNumber;
- int m_lastSelectorLineNumber;
- int m_columnOffsetForLine;
</del><ins>+ } m_tokenStart { nullptr };
+ unsigned m_length { 0 };
+ int m_token { 0 };
+ int m_lineNumber { 0 };
+ int m_tokenStartLineNumber { 0 };
+ int m_tokenStartColumnNumber { 0 };
+ int m_lastSelectorLineNumber { 0 };
+ int m_columnOffsetForLine { 0 };
</ins><span class="cx">
</span><del>- int m_sheetStartLineNumber;
- int m_sheetStartColumnNumber;
</del><ins>+ int m_sheetStartLineNumber { 0 };
+ int m_sheetStartColumnNumber { 0 };
</ins><span class="cx">
</span><del>- bool m_allowImportRules;
- bool m_allowNamespaceDeclarations;
</del><ins>+ bool m_allowImportRules { true };
+ bool m_allowNamespaceDeclarations { true };
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_DEVICE_ADAPTATION)
</span><span class="cx"> bool parseViewportProperty(CSSPropertyID propId, bool important);
</span><span class="cx"> bool parseViewportShorthand(CSSPropertyID propId, CSSPropertyID first, CSSPropertyID second, bool important);
</span><span class="cx">
</span><span class="cx"> bool inViewport() const { return m_inViewport; }
</span><del>- bool m_inViewport;
</del><ins>+ bool m_inViewport { false };
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> bool useLegacyBackgroundSizeShorthandBehavior() const;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValue.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -1189,7 +1189,7 @@
</span><span class="cx"> addSubresourceURL(urls, styleSheet->completeURL(m_value.string));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSPrimitiveValue> CSSPrimitiveValue::cloneForCSSOM() const
</del><ins>+Ref<CSSPrimitiveValue> CSSPrimitiveValue::cloneForCSSOM() const
</ins><span class="cx"> {
</span><span class="cx"> RefPtr<CSSPrimitiveValue> result;
</span><span class="cx">
</span><span class="lines">@@ -1286,10 +1286,9 @@
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> break;
</span><span class="cx"> }
</span><del>- if (result)
- result->setCSSOMSafe();
</del><span class="cx">
</span><del>- return result;
</del><ins>+ result->setCSSOMSafe();
+ return result.releaseNonNull();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSPrimitiveValue::equals(const CSSPrimitiveValue& other) const
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValue.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -373,7 +373,7 @@
</span><span class="cx">
</span><span class="cx"> void addSubresourceStyleURLs(ListHashSet<URL>&, const StyleSheetContents*) const;
</span><span class="cx">
</span><del>- RefPtr<CSSPrimitiveValue> cloneForCSSOM() const;
</del><ins>+ Ref<CSSPrimitiveValue> cloneForCSSOM() const;
</ins><span class="cx"> void setCSSOMSafe() { m_isCSSOMSafe = true; }
</span><span class="cx">
</span><span class="cx"> bool equals(const CSSPrimitiveValue&) const;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertySourceDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPropertySourceData.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPropertySourceData.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSPropertySourceData.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> struct CSSRuleSourceData;
</span><del>-typedef Vector<RefPtr<CSSRuleSourceData>> RuleSourceDataList;
</del><ins>+typedef Vector<Ref<CSSRuleSourceData>> RuleSourceDataList;
</ins><span class="cx"> typedef Vector<SourceRange> SelectorRangeList;
</span><span class="cx">
</span><span class="cx"> struct CSSRuleSourceData : public RefCounted<CSSRuleSourceData> {
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSReflectValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSReflectValue.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSReflectValue.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSReflectValue.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -46,8 +46,8 @@
</span><span class="cx">
</span><span class="cx"> bool CSSReflectValue::equals(const CSSReflectValue& other) const
</span><span class="cx"> {
</span><del>- return m_direction == other.m_direction
- && compareCSSValuePtr(m_offset, other.m_offset)
</del><ins>+ return m_direction.ptr() == other.m_direction.ptr()
+ && compareCSSValue(m_offset, other.m_offset)
</ins><span class="cx"> && compareCSSValuePtr(m_mask, other.m_mask);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSReflectValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSReflectValue.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSReflectValue.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSReflectValue.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -37,14 +37,15 @@
</span><span class="cx">
</span><span class="cx"> class CSSReflectValue : public CSSValue {
</span><span class="cx"> public:
</span><del>- static Ref<CSSReflectValue> create(PassRefPtr<CSSPrimitiveValue> direction,
- PassRefPtr<CSSPrimitiveValue> offset, PassRefPtr<CSSValue> mask)
</del><ins>+ static Ref<CSSReflectValue> create(Ref<CSSPrimitiveValue>&& direction, Ref<CSSPrimitiveValue>&& offset, RefPtr<CSSValue>&& mask)
</ins><span class="cx"> {
</span><del>- return adoptRef(*new CSSReflectValue(direction, offset, mask));
</del><ins>+ return adoptRef(*new CSSReflectValue(WTFMove(direction), WTFMove(offset), WTFMove(mask)));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- CSSPrimitiveValue* direction() const { return m_direction.get(); }
- CSSPrimitiveValue* offset() const { return m_offset.get(); }
</del><ins>+ CSSPrimitiveValue& direction() { return m_direction.get(); }
+ CSSPrimitiveValue& offset() { return m_offset.get(); }
+ const CSSPrimitiveValue& direction() const { return m_direction.get(); }
+ const CSSPrimitiveValue& offset() const { return m_offset.get(); }
</ins><span class="cx"> CSSValue* mask() const { return m_mask.get(); }
</span><span class="cx">
</span><span class="cx"> String customCSSText() const;
</span><span class="lines">@@ -54,16 +55,16 @@
</span><span class="cx"> bool equals(const CSSReflectValue&) const;
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- CSSReflectValue(PassRefPtr<CSSPrimitiveValue> direction, PassRefPtr<CSSPrimitiveValue> offset, PassRefPtr<CSSValue> mask)
</del><ins>+ CSSReflectValue(Ref<CSSPrimitiveValue>&& direction, Ref<CSSPrimitiveValue>&& offset, RefPtr<CSSValue>&& mask)
</ins><span class="cx"> : CSSValue(ReflectClass)
</span><del>- , m_direction(direction)
- , m_offset(offset)
- , m_mask(mask)
</del><ins>+ , m_direction(WTFMove(direction))
+ , m_offset(WTFMove(offset))
+ , m_mask(WTFMove(mask))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RefPtr<CSSPrimitiveValue> m_direction;
- RefPtr<CSSPrimitiveValue> m_offset;
</del><ins>+ Ref<CSSPrimitiveValue> m_direction;
+ Ref<CSSPrimitiveValue> m_offset;
</ins><span class="cx"> RefPtr<CSSValue> m_mask;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSShadowValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSShadowValue.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSShadowValue.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSShadowValue.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -26,19 +26,14 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> // Used for text-shadow and box-shadow
</span><del>-CSSShadowValue::CSSShadowValue(PassRefPtr<CSSPrimitiveValue> x,
- PassRefPtr<CSSPrimitiveValue> y,
- PassRefPtr<CSSPrimitiveValue> blur,
- PassRefPtr<CSSPrimitiveValue> spread,
- PassRefPtr<CSSPrimitiveValue> style,
- PassRefPtr<CSSPrimitiveValue> color)
</del><ins>+CSSShadowValue::CSSShadowValue(RefPtr<CSSPrimitiveValue>&& x, RefPtr<CSSPrimitiveValue>&& y, RefPtr<CSSPrimitiveValue>&& blur, RefPtr<CSSPrimitiveValue>&& spread, RefPtr<CSSPrimitiveValue>&& style, RefPtr<CSSPrimitiveValue>&& color)
</ins><span class="cx"> : CSSValue(ShadowClass)
</span><del>- , x(x)
- , y(y)
- , blur(blur)
- , spread(spread)
- , style(style)
- , color(color)
</del><ins>+ , x(WTFMove(x))
+ , y(WTFMove(y))
+ , blur(WTFMove(blur))
+ , spread(WTFMove(spread))
+ , style(WTFMove(style))
+ , color(WTFMove(color))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSShadowValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSShadowValue.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSShadowValue.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSShadowValue.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -32,14 +32,14 @@
</span><span class="cx"> // Used for text-shadow and box-shadow
</span><span class="cx"> class CSSShadowValue : public CSSValue {
</span><span class="cx"> public:
</span><del>- static Ref<CSSShadowValue> create(PassRefPtr<CSSPrimitiveValue> x,
- PassRefPtr<CSSPrimitiveValue> y,
- PassRefPtr<CSSPrimitiveValue> blur,
- PassRefPtr<CSSPrimitiveValue> spread,
- PassRefPtr<CSSPrimitiveValue> style,
- PassRefPtr<CSSPrimitiveValue> color)
</del><ins>+ static Ref<CSSShadowValue> create(RefPtr<CSSPrimitiveValue>&& x,
+ RefPtr<CSSPrimitiveValue>&& y,
+ RefPtr<CSSPrimitiveValue>&& blur,
+ RefPtr<CSSPrimitiveValue>&& spread,
+ RefPtr<CSSPrimitiveValue>&& style,
+ RefPtr<CSSPrimitiveValue>&& color)
</ins><span class="cx"> {
</span><del>- return adoptRef(*new CSSShadowValue(x, y, blur, spread, style, color));
</del><ins>+ return adoptRef(*new CSSShadowValue(WTFMove(x), WTFMove(y), WTFMove(blur), WTFMove(spread), WTFMove(style), WTFMove(color)));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String customCSSText() const;
</span><span class="lines">@@ -54,12 +54,12 @@
</span><span class="cx"> RefPtr<CSSPrimitiveValue> color;
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- CSSShadowValue(PassRefPtr<CSSPrimitiveValue> x,
- PassRefPtr<CSSPrimitiveValue> y,
- PassRefPtr<CSSPrimitiveValue> blur,
- PassRefPtr<CSSPrimitiveValue> spread,
- PassRefPtr<CSSPrimitiveValue> style,
- PassRefPtr<CSSPrimitiveValue> color);
</del><ins>+ CSSShadowValue(RefPtr<CSSPrimitiveValue>&& x,
+ RefPtr<CSSPrimitiveValue>&& y,
+ RefPtr<CSSPrimitiveValue>&& blur,
+ RefPtr<CSSPrimitiveValue>&& spread,
+ RefPtr<CSSPrimitiveValue>&& style,
+ RefPtr<CSSPrimitiveValue>&& color);
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSStyleSheetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSStyleSheet.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSStyleSheet.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSStyleSheet.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -175,7 +175,7 @@
</span><span class="cx"> if (mutationType == RuleInsertion && !contentsWereClonedForMutation && !owner->authorStyleSheets().activeStyleSheetsContains(this)) {
</span><span class="cx"> if (insertedKeyframesRule) {
</span><span class="cx"> if (StyleResolver* resolver = owner->styleResolverIfExists())
</span><del>- resolver->addKeyframeStyle(insertedKeyframesRule);
</del><ins>+ resolver->addKeyframeStyle(*insertedKeyframesRule);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> owner->scheduleOptimizedStyleSheetUpdate();
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValue.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValue.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSValue.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -257,16 +257,16 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> template<typename CSSValueType>
</span><del>-inline bool compareCSSValueVector(const Vector<RefPtr<CSSValueType>>& firstVector, const Vector<RefPtr<CSSValueType>>& secondVector)
</del><ins>+inline bool compareCSSValueVector(const Vector<Ref<CSSValueType>>& firstVector, const Vector<Ref<CSSValueType>>& secondVector)
</ins><span class="cx"> {
</span><span class="cx"> size_t size = firstVector.size();
</span><span class="cx"> if (size != secondVector.size())
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- for (size_t i = 0; i < size; i++) {
- const RefPtr<CSSValueType>& firstPtr = firstVector[i];
- const RefPtr<CSSValueType>& secondPtr = secondVector[i];
- if (firstPtr == secondPtr || (firstPtr && secondPtr && firstPtr->equals(*secondPtr)))
</del><ins>+ for (size_t i = 0; i < size; ++i) {
+ auto& firstPtr = firstVector[i];
+ auto& secondPtr = secondVector[i];
+ if (firstPtr.ptr() == secondPtr.ptr() || firstPtr->equals(secondPtr))
</ins><span class="cx"> continue;
</span><span class="cx"> return false;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSVariableDependentValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSVariableDependentValue.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSVariableDependentValue.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSVariableDependentValue.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> HashSet<AtomicString> newSeenProperties = seenProperties;
</span><span class="cx"> newSeenProperties.add(name);
</span><span class="cx">
</span><del>- bool valid = valueList()->checkVariablesForCycles(customProperties, newSeenProperties, invalidProperties);
</del><ins>+ bool valid = valueList().checkVariablesForCycles(customProperties, newSeenProperties, invalidProperties);
</ins><span class="cx"> if (!valid)
</span><span class="cx"> invalidProperties.add(name);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSVariableDependentValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSVariableDependentValue.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSVariableDependentValue.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSVariableDependentValue.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -34,16 +34,16 @@
</span><span class="cx">
</span><span class="cx"> class CSSVariableDependentValue : public CSSValue {
</span><span class="cx"> public:
</span><del>- static Ref<CSSVariableDependentValue> create(RefPtr<CSSValueList>& valueList, CSSPropertyID propId)
</del><ins>+ static Ref<CSSVariableDependentValue> create(Ref<CSSValueList>&& valueList, CSSPropertyID propId)
</ins><span class="cx"> {
</span><del>- return adoptRef(*new CSSVariableDependentValue(valueList, propId));
</del><ins>+ return adoptRef(*new CSSVariableDependentValue(WTFMove(valueList), propId));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String customCSSText() const
</span><span class="cx"> {
</span><span class="cx"> if (!m_serialized) {
</span><span class="cx"> m_serialized = true;
</span><del>- m_stringValue = m_valueList ? m_valueList->customCSSText() : emptyString();
</del><ins>+ m_stringValue = m_valueList->customCSSText();
</ins><span class="cx"> }
</span><span class="cx"> return m_stringValue;
</span><span class="cx"> }
</span><span class="lines">@@ -54,19 +54,20 @@
</span><span class="cx">
</span><span class="cx"> CSSPropertyID propertyID() const { return m_propertyID; }
</span><span class="cx">
</span><del>- CSSValueList* valueList() const { return m_valueList.get(); }
</del><ins>+ CSSValueList& valueList() { return m_valueList.get(); }
+ const CSSValueList& valueList() const { return m_valueList.get(); }
</ins><span class="cx">
</span><span class="cx"> bool checkVariablesForCycles(const AtomicString& name, CustomPropertyValueMap& customProperties, const HashSet<AtomicString>& seenProperties, HashSet<AtomicString>& invalidProperties);
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- CSSVariableDependentValue(RefPtr<CSSValueList>& valueList, CSSPropertyID propId)
</del><ins>+ CSSVariableDependentValue(Ref<CSSValueList>&& valueList, CSSPropertyID propId)
</ins><span class="cx"> : CSSValue(VariableDependentClass)
</span><del>- , m_valueList(valueList)
</del><ins>+ , m_valueList(WTFMove(valueList))
</ins><span class="cx"> , m_propertyID(propId)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RefPtr<CSSValueList> m_valueList;
</del><ins>+ Ref<CSSValueList> m_valueList;
</ins><span class="cx"> CSSPropertyID m_propertyID;
</span><span class="cx"> mutable String m_stringValue;
</span><span class="cx"> mutable bool m_serialized { false };
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSVariableValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSVariableValue.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSVariableValue.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/CSSVariableValue.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -69,17 +69,12 @@
</span><span class="cx">
</span><span class="cx"> bool CSSVariableValue::buildParserValueListSubstitutingVariables(CSSParserValueList* resultList, const CustomPropertyValueMap& customProperties) const
</span><span class="cx"> {
</span><del>- RefPtr<CSSValue> value = customProperties.get(m_name);
- if (value && value->isValueList()) {
- auto& variableList = downcast<CSSValueList>(*value);
- return variableList.buildParserValueListSubstitutingVariables(resultList, customProperties);
</del><ins>+ if (RefPtr<CSSValue> value = customProperties.get(m_name)) {
+ if (value->isValueList())
+ return downcast<CSSValueList>(*value).buildParserValueListSubstitutingVariables(resultList, customProperties);
+ if (value->isVariableDependentValue())
+ return downcast<CSSVariableDependentValue>(*value).valueList().buildParserValueListSubstitutingVariables(resultList, customProperties);
</ins><span class="cx"> }
</span><del>-
- if (value && value->isVariableDependentValue()) {
- auto* variableList = downcast<CSSVariableDependentValue>(*value).valueList();
- if (variableList)
- return variableList->buildParserValueListSubstitutingVariables(resultList, customProperties);
- }
</del><span class="cx">
</span><span class="cx"> // We failed to substitute the variable. If it has fallback arguments, use those instead.
</span><span class="cx"> if (!fallbackArguments() || !fallbackArguments()->length())
</span></span></pre></div>
<a id="trunkSourceWebCorecssCounterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/Counter.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/Counter.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/Counter.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -27,20 +27,20 @@
</span><span class="cx">
</span><span class="cx"> class Counter : public RefCounted<Counter> {
</span><span class="cx"> public:
</span><del>- static Ref<Counter> create(RefPtr<CSSPrimitiveValue>&& identifier, RefPtr<CSSPrimitiveValue>&& listStyle, RefPtr<CSSPrimitiveValue>&& separator)
</del><ins>+ static Ref<Counter> create(Ref<CSSPrimitiveValue>&& identifier, Ref<CSSPrimitiveValue>&& listStyle, Ref<CSSPrimitiveValue>&& separator)
</ins><span class="cx"> {
</span><span class="cx"> return adoptRef(*new Counter(WTFMove(identifier), WTFMove(listStyle), WTFMove(separator)));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- String identifier() const { return m_identifier ? m_identifier->getStringValue() : String(); }
- String listStyle() const { return m_listStyle ? m_listStyle->getStringValue() : String(); }
- String separator() const { return m_separator ? m_separator->getStringValue() : String(); }
</del><ins>+ String identifier() const { return m_identifier->getStringValue(); }
+ String listStyle() const { return m_listStyle->getStringValue(); }
+ String separator() const { return m_separator->getStringValue(); }
</ins><span class="cx">
</span><del>- CSSValueID listStyleIdent() const { return m_listStyle ? m_listStyle->getValueID() : CSSValueInvalid; }
</del><ins>+ CSSValueID listStyleIdent() const { return m_listStyle->getValueID(); }
</ins><span class="cx">
</span><del>- void setIdentifier(RefPtr<CSSPrimitiveValue>&& identifier) { m_identifier = WTFMove(identifier); }
- void setListStyle(RefPtr<CSSPrimitiveValue>&& listStyle) { m_listStyle = WTFMove(listStyle); }
- void setSeparator(RefPtr<CSSPrimitiveValue>&& separator) { m_separator = WTFMove(separator); }
</del><ins>+ void setIdentifier(Ref<CSSPrimitiveValue>&& identifier) { m_identifier = WTFMove(identifier); }
+ void setListStyle(Ref<CSSPrimitiveValue>&& listStyle) { m_listStyle = WTFMove(listStyle); }
+ void setSeparator(Ref<CSSPrimitiveValue>&& separator) { m_separator = WTFMove(separator); }
</ins><span class="cx">
</span><span class="cx"> bool equals(const Counter& other) const
</span><span class="cx"> {
</span><span class="lines">@@ -51,22 +51,20 @@
</span><span class="cx">
</span><span class="cx"> Ref<Counter> cloneForCSSOM() const
</span><span class="cx"> {
</span><del>- return create(m_identifier ? m_identifier->cloneForCSSOM() : nullptr
- , m_listStyle ? m_listStyle->cloneForCSSOM() : nullptr
- , m_separator ? m_separator->cloneForCSSOM() : nullptr);
</del><ins>+ return create(m_identifier->cloneForCSSOM(), m_listStyle->cloneForCSSOM(), m_separator->cloneForCSSOM());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- Counter(RefPtr<CSSPrimitiveValue>&& identifier, RefPtr<CSSPrimitiveValue>&& listStyle, RefPtr<CSSPrimitiveValue>&& separator)
</del><ins>+ Counter(Ref<CSSPrimitiveValue>&& identifier, Ref<CSSPrimitiveValue>&& listStyle, Ref<CSSPrimitiveValue>&& separator)
</ins><span class="cx"> : m_identifier(WTFMove(identifier))
</span><span class="cx"> , m_listStyle(WTFMove(listStyle))
</span><span class="cx"> , m_separator(WTFMove(separator))
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RefPtr<CSSPrimitiveValue> m_identifier; // string
- RefPtr<CSSPrimitiveValue> m_listStyle; // ident
- RefPtr<CSSPrimitiveValue> m_separator; // string
</del><ins>+ Ref<CSSPrimitiveValue> m_identifier; // string
+ Ref<CSSPrimitiveValue> m_listStyle; // ident
+ Ref<CSSPrimitiveValue> m_separator; // string
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorecssDOMCSSNamespacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/DOMCSSNamespace.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/DOMCSSNamespace.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/DOMCSSNamespace.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -66,8 +66,8 @@
</span><span class="cx"> if (normalizedValue.isEmpty())
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- RefPtr<MutableStyleProperties> dummyStyle = MutableStyleProperties::create();
- return CSSParser::parseValue(dummyStyle.get(), propertyID, normalizedValue, false, CSSStrictMode, nullptr) != CSSParser::ParseResult::Error;
</del><ins>+ auto dummyStyle = MutableStyleProperties::create();
+ return CSSParser::parseValue(dummyStyle, propertyID, normalizedValue, false, CSSStrictMode, nullptr) != CSSParser::ParseResult::Error;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool DOMCSSNamespace::supports(const String& conditionText)
</span></span></pre></div>
<a id="trunkSourceWebCorecssFontFacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/FontFace.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/FontFace.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/FontFace.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -129,7 +129,7 @@
</span><span class="cx"> RefPtr<CSSValue> FontFace::parseString(const String& string, CSSPropertyID propertyID)
</span><span class="cx"> {
</span><span class="cx"> auto style = MutableStyleProperties::create();
</span><del>- if (CSSParser::parseValue(style.ptr(), propertyID, string, true, CSSStrictMode, nullptr) == CSSParser::ParseResult::Error)
</del><ins>+ if (CSSParser::parseValue(style, propertyID, string, true, CSSStrictMode, nullptr) == CSSParser::ParseResult::Error)
</ins><span class="cx"> return nullptr;
</span><span class="cx"> return style->getPropertyCSSValue(propertyID);
</span><span class="cx"> }
</span><span class="lines">@@ -178,7 +178,7 @@
</span><span class="cx"> void FontFace::setVariant(const String& variant, ExceptionCode& ec)
</span><span class="cx"> {
</span><span class="cx"> auto style = MutableStyleProperties::create();
</span><del>- auto result = CSSParser::parseValue(style.ptr(), CSSPropertyFontVariant, variant, true, CSSStrictMode, nullptr);
</del><ins>+ auto result = CSSParser::parseValue(style, CSSPropertyFontVariant, variant, true, CSSStrictMode, nullptr);
</ins><span class="cx"> if (result == CSSParser::ParseResult::Error) {
</span><span class="cx"> ec = SYNTAX_ERR;
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebCorecssRecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/Rect.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/Rect.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/Rect.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -49,10 +49,10 @@
</span><span class="cx"> protected:
</span><span class="cx"> RectBase() { }
</span><span class="cx"> RectBase(const RectBase& cloneFrom)
</span><del>- : m_top(cloneFrom.m_top ? cloneFrom.m_top->cloneForCSSOM() : 0)
- , m_right(cloneFrom.m_right ? cloneFrom.m_right->cloneForCSSOM() : 0)
- , m_bottom(cloneFrom.m_bottom ? cloneFrom.m_bottom->cloneForCSSOM() : 0)
- , m_left(cloneFrom.m_left ? cloneFrom.m_left->cloneForCSSOM() : 0)
</del><ins>+ : m_top(cloneFrom.m_top ? RefPtr<CSSPrimitiveValue>(cloneFrom.m_top->cloneForCSSOM()) : nullptr)
+ , m_right(cloneFrom.m_right ? RefPtr<CSSPrimitiveValue>(cloneFrom.m_right->cloneForCSSOM()) : nullptr)
+ , m_bottom(cloneFrom.m_bottom ? RefPtr<CSSPrimitiveValue>(cloneFrom.m_bottom->cloneForCSSOM()) : nullptr)
+ , m_left(cloneFrom.m_left ? RefPtr<CSSPrimitiveValue>(cloneFrom.m_left->cloneForCSSOM()) : nullptr)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssRuleSetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/RuleSet.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/RuleSet.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/RuleSet.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -344,7 +344,7 @@
</span><span class="cx"> resolver->document().fontSelector().addFontFaceRule(downcast<StyleRuleFontFace>(*rule.get()), isInitiatingElementInUserAgentShadowTree);
</span><span class="cx"> resolver->invalidateMatchedPropertiesCache();
</span><span class="cx"> } else if (is<StyleRuleKeyframes>(*rule) && resolver)
</span><del>- resolver->addKeyframeStyle(downcast<StyleRuleKeyframes>(rule.get()));
</del><ins>+ resolver->addKeyframeStyle(downcast<StyleRuleKeyframes>(*rule));
</ins><span class="cx"> else if (is<StyleRuleSupports>(*rule) && downcast<StyleRuleSupports>(*rule).conditionIsSupported())
</span><span class="cx"> addChildRules(downcast<StyleRuleSupports>(*rule).childRules(), medium, resolver, hasDocumentSecurityOrigin, isInitiatingElementInUserAgentShadowTree, addRuleFlags);
</span><span class="cx"> #if ENABLE(CSS_REGIONS)
</span></span></pre></div>
<a id="trunkSourceWebCorecssSVGCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SVGCSSParser.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SVGCSSParser.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/SVGCSSParser.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -340,7 +340,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseSVGStrokeDasharray()
</del><ins>+RefPtr<CSSValueList> CSSParser::parseSVGStrokeDasharray()
</ins><span class="cx"> {
</span><span class="cx"> RefPtr<CSSValueList> ret = CSSValueList::createCommaSeparated();
</span><span class="cx"> CSSParserValue* value = m_valueList->current();
</span><span class="lines">@@ -364,7 +364,7 @@
</span><span class="cx"> return ret;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseSVGPaint()
</del><ins>+RefPtr<SVGPaint> CSSParser::parseSVGPaint()
</ins><span class="cx"> {
</span><span class="cx"> RGBA32 c = Color::transparent;
</span><span class="cx"> if (!parseColorFromValue(*m_valueList->current(), c))
</span><span class="lines">@@ -372,7 +372,7 @@
</span><span class="cx"> return SVGPaint::createColor(Color(c));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseSVGColor()
</del><ins>+RefPtr<SVGColor> CSSParser::parseSVGColor()
</ins><span class="cx"> {
</span><span class="cx"> RGBA32 c = Color::transparent;
</span><span class="cx"> if (!parseColorFromValue(*m_valueList->current(), c))
</span><span class="lines">@@ -380,7 +380,7 @@
</span><span class="cx"> return SVGColor::createFromColor(Color(c));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parsePaintOrder()
</del><ins>+RefPtr<CSSValueList> CSSParser::parsePaintOrder()
</ins><span class="cx"> {
</span><span class="cx"> CSSParserValue* value = m_valueList->current();
</span><span class="cx">
</span><span class="lines">@@ -405,7 +405,7 @@
</span><span class="cx"> // pop a last list items from CSSValueList without bigger cost, we create the
</span><span class="cx"> // list after parsing.
</span><span class="cx"> CSSValueID firstPaintOrderType = paintTypeList.at(0);
</span><del>- RefPtr<CSSValueList> paintOrderList = CSSValueList::createSpaceSeparated();
</del><ins>+ auto paintOrderList = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> switch (firstPaintOrderType) {
</span><span class="cx"> case CSSValueFill:
</span><span class="cx"> FALLTHROUGH;
</span><span class="lines">@@ -426,7 +426,7 @@
</span><span class="cx"> default:
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><del>- return paintOrderList;
</del><ins>+ return WTFMove(paintOrderList);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderConverterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderConverter.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -626,11 +626,9 @@
</span><span class="cx"> auto& reflectValue = downcast<CSSReflectValue>(value);
</span><span class="cx">
</span><span class="cx"> auto reflection = StyleReflection::create();
</span><del>- reflection->setDirection(*reflectValue.direction());
</del><ins>+ reflection->setDirection(reflectValue.direction());
+ reflection->setOffset(reflectValue.offset().convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion>(styleResolver.state().cssToLengthConversionData()));
</ins><span class="cx">
</span><del>- if (reflectValue.offset())
- reflection->setOffset(reflectValue.offset()->convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion>(styleResolver.state().cssToLengthConversionData()));
-
</del><span class="cx"> NinePieceImage mask;
</span><span class="cx"> mask.setMaskDefaults();
</span><span class="cx"> styleResolver.styleMap()->mapNinePieceImage(CSSPropertyWebkitBoxReflect, reflectValue.mask(), mask);
</span></span></pre></div>
<a id="trunkSourceWebCorecssStylePropertiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleProperties.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleProperties.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/StyleProperties.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -737,7 +737,7 @@
</span><span class="cx">
</span><span class="cx"> // When replacing an existing property value, this moves the property to the end of the list.
</span><span class="cx"> // Firefox preserves the position, and MSIE moves the property to the beginning.
</span><del>- return CSSParser::parseValue(this, propertyID, value, important, cssParserMode(), contextStyleSheet) == CSSParser::ParseResult::Changed;
</del><ins>+ return CSSParser::parseValue(*this, propertyID, value, important, cssParserMode(), contextStyleSheet) == CSSParser::ParseResult::Changed;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool MutableStyleProperties::setCustomProperty(const String& propertyName, const String& value, bool important, StyleSheetContents* contextStyleSheet)
</span><span class="lines">@@ -749,7 +749,7 @@
</span><span class="cx">
</span><span class="cx"> // When replacing an existing property value, this moves the property to the end of the list.
</span><span class="cx"> // Firefox preserves the position, and MSIE moves the property to the beginning.
</span><del>- return CSSParser::parseCustomPropertyValue(this, propertyName, value, important, cssParserMode(), contextStyleSheet) == CSSParser::ParseResult::Changed;
</del><ins>+ return CSSParser::parseCustomPropertyValue(*this, propertyName, value, important, cssParserMode(), contextStyleSheet) == CSSParser::ParseResult::Changed;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void MutableStyleProperties::setProperty(CSSPropertyID propertyID, RefPtr<CSSValue>&& value, bool important)
</span><span class="lines">@@ -812,7 +812,7 @@
</span><span class="cx"> context.mode = cssParserMode();
</span><span class="cx"> }
</span><span class="cx"> CSSParser parser(context);
</span><del>- parser.parseDeclaration(this, styleDeclaration, 0, contextStyleSheet);
</del><ins>+ parser.parseDeclaration(*this, styleDeclaration, 0, contextStyleSheet);
</ins><span class="cx">
</span><span class="cx"> // We could do better. Just changing property order does not require style invalidation.
</span><span class="cx"> return oldProperties != m_propertyVector;
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/StyleResolver.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -305,7 +305,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // This is a simplified style setting function for keyframe styles
</span><del>-void StyleResolver::addKeyframeStyle(RefPtr<StyleRuleKeyframes>&& rule)
</del><ins>+void StyleResolver::addKeyframeStyle(Ref<StyleRuleKeyframes>&& rule)
</ins><span class="cx"> {
</span><span class="cx"> AtomicString s(rule->name());
</span><span class="cx"> m_keyframesRuleMap.set(s.impl(), WTFMove(rule));
</span><span class="lines">@@ -523,17 +523,14 @@
</span><span class="cx"> const StyleRuleKeyframes* keyframesRule = it->value.get();
</span><span class="cx">
</span><span class="cx"> // Construct and populate the style for each keyframe
</span><del>- const Vector<RefPtr<StyleKeyframe>>& keyframes = keyframesRule->keyframes();
- for (unsigned i = 0; i < keyframes.size(); ++i) {
</del><ins>+ for (auto& keyframe : keyframesRule->keyframes()) {
</ins><span class="cx"> // Apply the declaration to the style. This is a simplified version of the logic in styleForElement
</span><span class="cx"> m_state = State(element, nullptr);
</span><span class="cx">
</span><del>- const StyleKeyframe* keyframe = keyframes[i].get();
-
</del><span class="cx"> // Add this keyframe style to all the indicated key times
</span><span class="cx"> for (auto& key : keyframe->keys()) {
</span><span class="cx"> KeyframeValue keyframeValue(0, nullptr);
</span><del>- keyframeValue.setStyle(styleForKeyframe(elementStyle, keyframe, keyframeValue));
</del><ins>+ keyframeValue.setStyle(styleForKeyframe(elementStyle, keyframe.ptr(), keyframeValue));
</ins><span class="cx"> keyframeValue.setKey(key);
</span><span class="cx"> list.insert(WTFMove(keyframeValue));
</span><span class="cx"> }
</span><span class="lines">@@ -1687,10 +1684,10 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<StyleImage> StyleResolver::cachedOrPendingFromValue(CSSPropertyID property, CSSImageValue& value)
</del><ins>+Ref<StyleImage> StyleResolver::cachedOrPendingFromValue(CSSPropertyID property, CSSImageValue& value)
</ins><span class="cx"> {
</span><del>- RefPtr<StyleImage> image = value.cachedOrPendingImage();
- if (image && image->isPendingImage())
</del><ins>+ Ref<StyleImage> image = value.cachedOrPendingImage();
+ if (image->isPendingImage())
</ins><span class="cx"> m_state.pendingImageProperties().set(property, &value);
</span><span class="cx"> return image;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolverh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.h (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.h        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/StyleResolver.h        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -205,7 +205,7 @@
</span><span class="cx"> bool hasViewportDependentMediaQueries() const { return !m_viewportDependentMediaQueryResults.isEmpty(); }
</span><span class="cx"> bool hasMediaQueriesAffectedByViewportChange() const;
</span><span class="cx">
</span><del>- void addKeyframeStyle(RefPtr<StyleRuleKeyframes>&&);
</del><ins>+ void addKeyframeStyle(Ref<StyleRuleKeyframes>&&);
</ins><span class="cx">
</span><span class="cx"> bool checkRegionStyle(const Element* regionElement);
</span><span class="cx">
</span><span class="lines">@@ -456,7 +456,7 @@
</span><span class="cx"> State& state() { return m_state; }
</span><span class="cx">
</span><span class="cx"> RefPtr<StyleImage> styleImage(CSSPropertyID, CSSValue&);
</span><del>- RefPtr<StyleImage> cachedOrPendingFromValue(CSSPropertyID, CSSImageValue&);
</del><ins>+ Ref<StyleImage> cachedOrPendingFromValue(CSSPropertyID, CSSImageValue&);
</ins><span class="cx"> Ref<StyleImage> generatedOrPendingFromValue(CSSPropertyID, CSSImageGeneratorValue&);
</span><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><span class="cx"> RefPtr<StyleImage> setOrPendingFromValue(CSSPropertyID, CSSImageSetValue&);
</span></span></pre></div>
<a id="trunkSourceWebCorecssWebKitCSSMatrixcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/WebKitCSSMatrix.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/WebKitCSSMatrix.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/css/WebKitCSSMatrix.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -56,8 +56,8 @@
</span><span class="cx"> if (string.isEmpty())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- RefPtr<MutableStyleProperties> styleDeclaration = MutableStyleProperties::create();
- if (CSSParser::parseValue(styleDeclaration.get(), CSSPropertyTransform, string, true, CSSStrictMode, nullptr) != CSSParser::ParseResult::Error) {
</del><ins>+ auto styleDeclaration = MutableStyleProperties::create();
+ if (CSSParser::parseValue(styleDeclaration, CSSPropertyTransform, string, true, CSSStrictMode, nullptr) != CSSParser::ParseResult::Error) {
</ins><span class="cx"> // Convert to TransformOperations. This can fail if a property
</span><span class="cx"> // requires style (i.e., param uses 'ems' or 'exs')
</span><span class="cx"> RefPtr<CSSValue> value = styleDeclaration->getPropertyCSSValue(CSSPropertyTransform);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -2146,8 +2146,8 @@
</span><span class="cx"> if (newFont == state().unparsedFont && state().font.realized())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- RefPtr<MutableStyleProperties> parsedStyle = MutableStyleProperties::create();
- CSSParser::parseValue(parsedStyle.get(), CSSPropertyFont, newFont, true, strictToCSSParserMode(!m_usesCSSCompatibilityParseMode), nullptr);
</del><ins>+ auto parsedStyle = MutableStyleProperties::create();
+ CSSParser::parseValue(parsedStyle, CSSPropertyFont, newFont, true, strictToCSSParserMode(!m_usesCSSCompatibilityParseMode), nullptr);
</ins><span class="cx"> if (parsedStyle->isEmpty())
</span><span class="cx"> return;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorStyleSheetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx"> RuleSourceDataList* sourceData() const { return m_sourceData.get(); }
</span><span class="cx"> void setSourceData(std::unique_ptr<RuleSourceDataList>);
</span><span class="cx"> bool hasSourceData() const { return m_sourceData != nullptr; }
</span><del>- RefPtr<WebCore::CSSRuleSourceData> ruleSourceDataAt(unsigned) const;
</del><ins>+ WebCore::CSSRuleSourceData* ruleSourceDataAt(unsigned) const;
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx">
</span><span class="lines">@@ -95,15 +95,15 @@
</span><span class="cx"> setSourceData(nullptr);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void flattenSourceData(RuleSourceDataList* dataList, RuleSourceDataList* target)
</del><ins>+static void flattenSourceData(RuleSourceDataList& dataList, RuleSourceDataList& target)
</ins><span class="cx"> {
</span><del>- for (auto& data : *dataList) {
</del><ins>+ for (auto& data : dataList) {
</ins><span class="cx"> if (data->type == CSSRuleSourceData::STYLE_RULE)
</span><del>- target->append(data);
</del><ins>+ target.append(data.copyRef());
</ins><span class="cx"> else if (data->type == CSSRuleSourceData::MEDIA_RULE)
</span><del>- flattenSourceData(&data->childRules, target);
</del><ins>+ flattenSourceData(data->childRules, target);
</ins><span class="cx"> else if (data->type == CSSRuleSourceData::SUPPORTS_RULE)
</span><del>- flattenSourceData(&data->childRules, target);
</del><ins>+ flattenSourceData(data->childRules, target);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -119,15 +119,15 @@
</span><span class="cx"> // FIXME: This is a temporary solution to retain the original flat sourceData structure
</span><span class="cx"> // containing only style rules, even though CSSParser now provides the full rule source data tree.
</span><span class="cx"> // Normally, we should just assign m_sourceData = sourceData;
</span><del>- flattenSourceData(sourceData.get(), m_sourceData.get());
</del><ins>+ flattenSourceData(*sourceData, *m_sourceData);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebCore::CSSRuleSourceData> ParsedStyleSheet::ruleSourceDataAt(unsigned index) const
</del><ins>+WebCore::CSSRuleSourceData* ParsedStyleSheet::ruleSourceDataAt(unsigned index) const
</ins><span class="cx"> {
</span><span class="cx"> if (!hasSourceData() || index >= m_sourceData->size())
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- return m_sourceData->at(index);
</del><ins>+ return m_sourceData->at(index).ptr();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> using namespace Inspector;
</span><span class="lines">@@ -1366,8 +1366,8 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RefPtr<MutableStyleProperties> tempDeclaration = MutableStyleProperties::create();
- createCSSParser(&m_element->document())->parseDeclaration(tempDeclaration.get(), m_styleText, result, &m_element->document().elementSheet().contents());
</del><ins>+ auto tempDeclaration = MutableStyleProperties::create();
+ createCSSParser(&m_element->document())->parseDeclaration(tempDeclaration, m_styleText, result, &m_element->document().elementSheet().contents());
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageSerializercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PageSerializer.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PageSerializer.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/page/PageSerializer.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -331,12 +331,12 @@
</span><span class="cx"> if (!is<CSSImageValue>(*cssValue))
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- StyleImage* styleImage = downcast<CSSImageValue>(*cssValue).cachedOrPendingImage();
</del><ins>+ auto& styleImage = downcast<CSSImageValue>(*cssValue).cachedOrPendingImage();
</ins><span class="cx"> // Non cached-images are just place-holders and do not contain data.
</span><span class="cx"> if (!is<StyleCachedImage>(styleImage))
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- CachedImage* image = downcast<StyleCachedImage>(*styleImage).cachedImage();
</del><ins>+ CachedImage* image = downcast<StyleCachedImage>(styleImage).cachedImage();
</ins><span class="cx">
</span><span class="cx"> URL url = document->completeURL(image->url());
</span><span class="cx"> addImageToResources(image, nullptr, url);
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationCSSPropertyAnimationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -292,9 +292,9 @@
</span><span class="cx">
</span><span class="cx"> auto fromImageValue = CSSImageValue::create(fromStyleImage->cachedImage()->url(), fromStyleImage);
</span><span class="cx"> auto toImageValue = CSSImageValue::create(toStyleImage->cachedImage()->url(), toStyleImage);
</span><ins>+ auto percentageValue = CSSPrimitiveValue::create(progress, CSSPrimitiveValue::CSS_NUMBER);
</ins><span class="cx">
</span><del>- auto crossfadeValue = CSSCrossfadeValue::create(WTFMove(fromImageValue), WTFMove(toImageValue));
- crossfadeValue.get().setPercentage(CSSPrimitiveValue::create(progress, CSSPrimitiveValue::CSS_NUMBER));
</del><ins>+ auto crossfadeValue = CSSCrossfadeValue::create(WTFMove(fromImageValue), WTFMove(toImageValue), WTFMove(percentageValue));
</ins><span class="cx"> return StyleGeneratedImage::create(WTFMove(crossfadeValue));
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -2032,28 +2032,23 @@
</span><span class="cx">
</span><span class="cx"> // Now insert invalid values.
</span><span class="cx"> if (!invalidProperties.isEmpty()) {
</span><del>- RefPtr<CSSValue> invalidValue = CSSCustomPropertyValue::createInvalid();
</del><ins>+ auto invalidValue = CSSCustomPropertyValue::createInvalid();
</ins><span class="cx"> for (auto& property : invalidProperties)
</span><del>- customProperties.set(property, invalidValue);
</del><ins>+ customProperties.set(property, invalidValue.copyRef());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Now that all of the properties have been tested for validity and replaced with
</span><span class="cx"> // invalid values if they failed, we can perform variable substitution on the valid values.
</span><del>- Vector<RefPtr<CSSCustomPropertyValue>> resolvedValues;
</del><ins>+ Vector<Ref<CSSCustomPropertyValue>> resolvedValues;
</ins><span class="cx"> for (auto entry : customProperties) {
</span><span class="cx"> if (!entry.value->isVariableDependentValue())
</span><span class="cx"> continue;
</span><span class="cx">
</span><span class="cx"> CSSParserValueList parserList;
</span><del>- RefPtr<CSSCustomPropertyValue> result;
- if (!downcast<CSSVariableDependentValue>(*entry.value).valueList()->buildParserValueListSubstitutingVariables(&parserList, customProperties)) {
- RefPtr<CSSValue> invalidResult = CSSCustomPropertyValue::createInvalid();
- result = CSSCustomPropertyValue::create(entry.key, invalidResult);
- } else {
- RefPtr<CSSValue> newValueList = CSSValueList::createFromParserValueList(parserList);
- result = CSSCustomPropertyValue::create(entry.key, newValueList);
- }
- resolvedValues.append(result);
</del><ins>+ if (!downcast<CSSVariableDependentValue>(*entry.value).valueList().buildParserValueListSubstitutingVariables(&parserList, customProperties))
+ resolvedValues.append(CSSCustomPropertyValue::create(entry.key, CSSCustomPropertyValue::createInvalid()));
+ else
+ resolvedValues.append(CSSCustomPropertyValue::create(entry.key, CSSValueList::createFromParserValueList(parserList)));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // With all results computed, we can now mutate our table to eliminate the variables and
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebCoreCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/CSSParser.cpp (201289 => 201290)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebCore/CSSParser.cpp        2016-05-23 16:59:36 UTC (rev 201289)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/CSSParser.cpp        2016-05-23 17:40:36 UTC (rev 201290)
</span><span class="lines">@@ -73,10 +73,10 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> CSSParser parser(strictCSSParserContext());
</span><del>- RefPtr<MutableStyleProperties> properties = MutableStyleProperties::create();
</del><ins>+ auto properties = MutableStyleProperties::create();
</ins><span class="cx">
</span><span class="cx"> for (auto& testCase : testCases) {
</span><del>- ASSERT_TRUE(parser.parseDeclaration(properties.get(), testCase.input, nullptr, nullptr));
</del><ins>+ ASSERT_TRUE(parser.parseDeclaration(properties, testCase.input, nullptr, nullptr));
</ins><span class="cx"> RefPtr<CSSValue> value = properties->getPropertyCSSValue(testCase.propertyID);
</span><span class="cx">
</span><span class="cx"> ASSERT_TRUE(value->isValueList());
</span></span></pre>
</div>
</div>
</body>
</html>