Reduce use of PassRefPtr in WebCore/css
authorgyuyoung.kim@webkit.org <gyuyoung.kim@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Aug 2015 01:12:58 +0000 (01:12 +0000)
committergyuyoung.kim@webkit.org <gyuyoung.kim@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Aug 2015 01:12:58 +0000 (01:12 +0000)
commit0a8fecab8f0d01d80907c35c80875e1012b574d5
treeef79ad50a358fd35ea607b61eaccc55ec4ebe73e
parentca3a35ae697c8bbb2edfedfc33c8a906187306eb
Reduce use of PassRefPtr in WebCore/css
https://bugs.webkit.org/show_bug.cgi?id=147821

Reviewed by Daniel Bates.

Use RefPtr when returning nullptr or RefPtr, if not, use Ref.

* css/CSSBasicShapes.cpp:
(WebCore::buildSerializablePositionOffset):
(WebCore::CSSBasicShapeCircle::cssText):
(WebCore::CSSBasicShapeEllipse::cssText):
* css/CSSBasicShapes.h:
* css/CSSCalculationValue.cpp:
(WebCore::determineCategory):
(WebCore::CSSCalcExpressionNodeParser::parseCalc):
(WebCore::createBlendHalf):
(WebCore::createCSS):
* css/CSSCanvasValue.cpp:
(WebCore::CSSCanvasValue::image):
* css/CSSCanvasValue.h:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::positionOffsetValue):
(WebCore::ComputedStyleExtractor::currentColorOrValidColor):
(WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
(WebCore::counterToCSSValue):
(WebCore::zoomAdjustedPaddingOrMarginPixelValue):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
(WebCore::computeRenderStyleForProperty):
(WebCore::valueForItemPositionWithOverflowAlignment):
(WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
(WebCore::ComputedStyleExtractor::propertyValue):
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand):
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValueInternal):
(WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
* css/CSSComputedStyleDeclaration.h:
* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::image):
(WebCore::CSSCrossfadeValue::blend):
* css/CSSCrossfadeValue.h:
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::image):
* css/CSSFilterImageValue.h:
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::image):
(WebCore::CSSGradientValue::gradientWithStylesResolved):
(WebCore::CSSLinearGradientValue::createGradient):
(WebCore::CSSRadialGradientValue::createGradient):
* css/CSSGradientValue.h:
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::cloneForCSSOM):
* css/CSSImageSetValue.h:
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::cloneForCSSOM):
* css/CSSImageValue.h:
* css/CSSParser.cpp:
(WebCore::CSSParser::parseRule):
(WebCore::CSSParser::parseKeyframeRule):
(WebCore::CSSParser::parseFontFaceValue):
(WebCore::CSSParser::parseValidPrimitive):
(WebCore::CSSParser::parseContentDistributionOverflowPosition):
(WebCore::CSSParser::parseAttr):
(WebCore::CSSParser::parseBackgroundColor):
(WebCore::CSSParser::parsePositionX):
(WebCore::CSSParser::parsePositionY):
(WebCore::CSSParser::parseFillPositionComponent):
(WebCore::CSSParser::parseFillSize):
(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::parseAnimationTimingFunction):
(WebCore::CSSParser::parseGridPosition):
(WebCore::gridMissingGridPositionValue):
(WebCore::CSSParser::parseGridTrackList):
(WebCore::CSSParser::parseGridTrackSize):
(WebCore::CSSParser::parseGridBreadth):
(WebCore::CSSParser::parseGridAutoFlow):
(WebCore::CSSParser::parseGridTemplateAreas):
(WebCore::CSSParser::parseCounterContent):
(WebCore::CSSParser::parseInsetRoundedCorners):
(WebCore::CSSParser::parseBasicShapeInset):
(WebCore::CSSParser::parseShapeRadius):
(WebCore::CSSParser::parseBasicShapeCircle):
(WebCore::CSSParser::parseBasicShapeEllipse):
(WebCore::CSSParser::parseBasicShapePolygon):
(WebCore::CSSParser::parseBasicShapeAndOrBox):
(WebCore::CSSParser::parseShapeProperty):
(WebCore::CSSParser::parseClipPath):
(WebCore::CSSParser::parseBasicShape):
(WebCore::CSSParser::parseFontFamily):
(WebCore::CSSParser::parseColor):
(WebCore::CSSParser::parseShadow):
(WebCore::CSSParser::parseImageResolution):
(WebCore::CSSParser::parseImageSet):
(WebCore::CSSParser::parseTransform):
(WebCore::CSSParser::parseTransformValue):
(WebCore::CSSParser::parseBuiltinFilterArguments):
(WebCore::CSSParser::parseTextIndent):
(WebCore::CSSParser::createImportRule):
(WebCore::CSSParser::createMediaRule):
(WebCore::CSSParser::createEmptyMediaRule):
(WebCore::CSSParser::createSupportsRule):
(WebCore::CSSParser::popSupportsRuleData):
(WebCore::CSSParser::createKeyframesRule):
(WebCore::CSSParser::createStyleRule):
(WebCore::CSSParser::createFontFaceRule):
(WebCore::CSSParser::createPageRule):
(WebCore::CSSParser::createRegionRule):
(WebCore::CSSParser::createKeyframe):
* css/CSSParser.h:
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::cloneForCSSOM):
* css/CSSPrimitiveValue.h:
* css/CSSStyleDeclaration.h:
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::rules):
(WebCore::CSSStyleSheet::cssRules):
* css/CSSStyleSheet.h:
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::styleImage):
* css/CSSToStyleMap.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::cloneForCSSOM):
* css/CSSValue.h:
* css/CSSValueList.cpp:
(WebCore::CSSValueList::cloneForCSSOM):
* css/CSSValueList.h:
* css/MediaList.h:
(WebCore::MediaQuerySet::copy):
* css/MediaQueryMatcher.cpp:
(WebCore::MediaQueryMatcher::matchMedia):
* css/MediaQueryMatcher.h:
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
* css/PropertySetCSSStyleDeclaration.h:
* css/RGBColor.cpp:
(WebCore::RGBColor::red):
(WebCore::RGBColor::green):
(WebCore::RGBColor::blue):
(WebCore::RGBColor::alpha):
* css/RGBColor.h:
* css/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::glyphOrientationToCSSPrimitiveValue):
(WebCore::strokeDashArrayToCSSValueList):
(WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor):
(WebCore::ComputedStyleExtractor::svgPropertyValue):
* css/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGStrokeDasharray):
(WebCore::CSSParser::parseSVGPaint):
(WebCore::CSSParser::parseSVGColor):
(WebCore::CSSParser::parsePaintOrder):
* css/WebKitCSSFilterValue.cpp:
(WebCore::WebKitCSSFilterValue::cloneForCSSOM):
* css/WebKitCSSFilterValue.h:
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::multiply):
(WebCore::WebKitCSSMatrix::inverse):
(WebCore::WebKitCSSMatrix::translate):
(WebCore::WebKitCSSMatrix::scale):
(WebCore::WebKitCSSMatrix::rotate):
(WebCore::WebKitCSSMatrix::rotateAxisAngle):
(WebCore::WebKitCSSMatrix::skewX):
(WebCore::WebKitCSSMatrix::skewY):
* css/WebKitCSSMatrix.h:
* css/WebKitCSSTransformValue.cpp:
(WebCore::WebKitCSSTransformValue::cloneForCSSOM):
* css/WebKitCSSTransformValue.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
46 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/CSSBasicShapes.cpp
Source/WebCore/css/CSSBasicShapes.h
Source/WebCore/css/CSSCalculationValue.cpp
Source/WebCore/css/CSSCanvasValue.cpp
Source/WebCore/css/CSSCanvasValue.h
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSComputedStyleDeclaration.h
Source/WebCore/css/CSSCrossfadeValue.cpp
Source/WebCore/css/CSSCrossfadeValue.h
Source/WebCore/css/CSSFilterImageValue.cpp
Source/WebCore/css/CSSFilterImageValue.h
Source/WebCore/css/CSSGradientValue.cpp
Source/WebCore/css/CSSGradientValue.h
Source/WebCore/css/CSSImageSetValue.cpp
Source/WebCore/css/CSSImageSetValue.h
Source/WebCore/css/CSSImageValue.cpp
Source/WebCore/css/CSSImageValue.h
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h
Source/WebCore/css/CSSPrimitiveValue.cpp
Source/WebCore/css/CSSPrimitiveValue.h
Source/WebCore/css/CSSStyleDeclaration.h
Source/WebCore/css/CSSStyleSheet.cpp
Source/WebCore/css/CSSStyleSheet.h
Source/WebCore/css/CSSToStyleMap.cpp
Source/WebCore/css/CSSToStyleMap.h
Source/WebCore/css/CSSValue.cpp
Source/WebCore/css/CSSValue.h
Source/WebCore/css/CSSValueList.cpp
Source/WebCore/css/CSSValueList.h
Source/WebCore/css/MediaList.h
Source/WebCore/css/MediaQueryMatcher.cpp
Source/WebCore/css/MediaQueryMatcher.h
Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp
Source/WebCore/css/PropertySetCSSStyleDeclaration.h
Source/WebCore/css/RGBColor.cpp
Source/WebCore/css/RGBColor.h
Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp
Source/WebCore/css/SVGCSSParser.cpp
Source/WebCore/css/WebKitCSSFilterValue.cpp
Source/WebCore/css/WebKitCSSFilterValue.h
Source/WebCore/css/WebKitCSSMatrix.cpp
Source/WebCore/css/WebKitCSSMatrix.h
Source/WebCore/css/WebKitCSSTransformValue.cpp
Source/WebCore/css/WebKitCSSTransformValue.h