Changeset 201113 in webkit


Ignore:
Timestamp:
May 18, 2016, 4:09:09 PM (9 years ago)
Author:
achristensen@apple.com
Message:

Clean up CSS code
https://bugs.webkit.org/show_bug.cgi?id=157808

Reviewed by Chris Dumez.

Source/WebCore:

No new tests. Just cleaning up and modernizing code.

  • css/BasicShapeFunctions.cpp:

(WebCore::convertToCenterCoordinate):
(WebCore::cssValueToBasicShapeRadius):
(WebCore::basicShapeForValue):

  • css/BasicShapeFunctions.h:
  • css/CSSAnimationTriggerScrollValue.h:

(WebCore::CSSAnimationTriggerScrollValue::create):
(WebCore::CSSAnimationTriggerScrollValue::startValue):
(WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):

  • css/CSSAspectRatioValue.h:
  • css/CSSBasicShapes.h:
  • css/CSSBorderImage.cpp:

(WebCore::createBorderImageValue):

  • css/CSSBorderImage.h:
  • css/CSSBorderImageSliceValue.h:

(WebCore::CSSBorderImageSliceValue::create):

  • css/CSSCalculationValue.h:
  • css/CSSCanvasValue.h:

(WebCore::CSSCanvasValue::CSSCanvasValue):

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::valueForNinePieceImageSlice):
(WebCore::valueForNinePieceImageQuad):
(WebCore::valueForNinePieceImage):
(WebCore::zoomAdjustedPixelValue):

  • css/CSSComputedStyleDeclaration.h:
  • css/CSSFontFaceLoadEvent.cpp:

(WebCore::CSSFontFaceLoadEvent::CSSFontFaceLoadEvent):

  • css/CSSFontFaceLoadEvent.h:
  • css/CSSFontValue.h:
  • css/CSSFunctionValue.h:
  • css/CSSGradientValue.h:

(WebCore::CSSGradientValue::setFirstX):
(WebCore::CSSGradientValue::setFirstY):
(WebCore::CSSGradientValue::setSecondX):
(WebCore::CSSGradientValue::setSecondY):
(WebCore::CSSGradientValue::addStop):
(WebCore::CSSLinearGradientValue::create):
(WebCore::CSSLinearGradientValue::setAngle):
(WebCore::CSSRadialGradientValue::setFirstRadius):
(WebCore::CSSRadialGradientValue::setSecondRadius):
(WebCore::CSSRadialGradientValue::setShape):
(WebCore::CSSRadialGradientValue::setSizingBehavior):
(WebCore::CSSRadialGradientValue::setEndHorizontalSize):
(WebCore::CSSRadialGradientValue::setEndVerticalSize):

  • css/CSSGroupingRule.cpp:

(WebCore::CSSGroupingRule::item):
(WebCore::CSSGroupingRule::cssRules):

  • css/CSSKeyframesRule.cpp:

(WebCore::CSSKeyframesRule::cssRules):

  • css/CSSParser.cpp:

(WebCore::CSSParser::addProperty):
(WebCore::CSSParser::rollbackLastProperties):
(WebCore::CSSParser::parseDashboardRegions):
(WebCore::CSSParser::parseClipShape):
(WebCore::CSSParser::parseBasicShapeCircle):
(WebCore::BorderImageParseContext::commitWebKitBorderImage):
(WebCore::BorderImageParseContext::commitBorderImage):
(WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
(WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
(WebCore::CSSParser::parseDeprecatedRadialGradient):
(WebCore::CSSParser::parseRadialGradient):

  • css/CSSParser.h:

(WebCore::cssyylex):

  • css/CSSPrimitiveValue.h:
  • css/CSSProperty.cpp:
  • css/CSSProperty.h:

(WebCore::CSSProperty::CSSProperty):

  • css/CSSRule.h:
  • css/CSSRuleList.h:
  • css/CSSSegmentedFontFace.h:
  • css/Counter.h:

(WebCore::Counter::create):
(WebCore::Counter::identifier):
(WebCore::Counter::listStyleIdent):
(WebCore::Counter::setIdentifier):
(WebCore::Counter::setListStyle):
(WebCore::Counter::setSeparator):
(WebCore::Counter::equals):
(WebCore::Counter::cloneForCSSOM):
(WebCore::Counter::Counter):

  • css/Pair.h:
  • css/Rect.h:

(WebCore::RectBase::bottom):
(WebCore::RectBase::left):
(WebCore::RectBase::setTop):
(WebCore::RectBase::setRight):
(WebCore::RectBase::setBottom):
(WebCore::RectBase::setLeft):
(WebCore::RectBase::equals):

  • css/SVGCSSComputedStyleDeclaration.cpp:

(WebCore::strokeDashArrayToCSSValueList):
(WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor):

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertClipPath):
(WebCore::StyleBuilderConverter::convertShapeValue):

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::borderPropertyValue):
(WebCore::StyleProperties::getPropertyCSSValue):
(WebCore::StyleProperties::getPropertyCSSValueInternal):
(WebCore::MutableStyleProperties::setCustomProperty):
(WebCore::MutableStyleProperties::setProperty):

  • css/StyleProperties.h:

(WebCore::StyleProperties::isEmpty):
(isType):

  • css/StylePropertyShorthand.cpp:
  • css/StylePropertyShorthand.h:

(WebCore::StylePropertyShorthand::StylePropertyShorthand):
(WebCore::StylePropertyShorthand::id):

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::appendAuthorStyleSheets):
(WebCore::StyleResolver::addKeyframeStyle):
(WebCore::StyleResolver::~StyleResolver):
(WebCore::StyleResolver::resolvedVariableValue):
(WebCore::StyleResolver::styleImage):
(WebCore::StyleResolver::cachedOrPendingFromValue):
(WebCore::StyleResolver::generatedOrPendingFromValue):
(WebCore::StyleResolver::createFilterOperations):
(WebCore::StyleResolver::loadPendingImage):

  • css/StyleResolver.h:

(WebCore::StyleResolver::hasViewportDependentMediaQueries):
(WebCore::StyleResolver::state):
(WebCore::checkRegionSelector):

  • css/StyleSheetList.h:
  • css/WebKitCSSFilterValue.cpp:
  • css/WebKitCSSFilterValue.h:
  • css/WebKitCSSTransformValue.cpp:
  • css/WebKitCSSTransformValue.h:
  • rendering/shapes/Shape.cpp:

Source/WebKit2:

  • UIProcess/Cocoa/WebViewImpl.mm:
Location:
trunk/Source
Files:
49 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r201109 r201113  
     12016-05-18  Alex Christensen  <achristensen@webkit.org>
     2
     3        Clean up CSS code
     4        https://bugs.webkit.org/show_bug.cgi?id=157808
     5
     6        Reviewed by Chris Dumez.
     7
     8        No new tests. Just cleaning up and modernizing code.
     9
     10        * css/BasicShapeFunctions.cpp:
     11        (WebCore::convertToCenterCoordinate):
     12        (WebCore::cssValueToBasicShapeRadius):
     13        (WebCore::basicShapeForValue):
     14        * css/BasicShapeFunctions.h:
     15        * css/CSSAnimationTriggerScrollValue.h:
     16        (WebCore::CSSAnimationTriggerScrollValue::create):
     17        (WebCore::CSSAnimationTriggerScrollValue::startValue):
     18        (WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):
     19        * css/CSSAspectRatioValue.h:
     20        * css/CSSBasicShapes.h:
     21        * css/CSSBorderImage.cpp:
     22        (WebCore::createBorderImageValue):
     23        * css/CSSBorderImage.h:
     24        * css/CSSBorderImageSliceValue.h:
     25        (WebCore::CSSBorderImageSliceValue::create):
     26        * css/CSSCalculationValue.h:
     27        * css/CSSCanvasValue.h:
     28        (WebCore::CSSCanvasValue::CSSCanvasValue):
     29        * css/CSSComputedStyleDeclaration.cpp:
     30        (WebCore::valueForNinePieceImageSlice):
     31        (WebCore::valueForNinePieceImageQuad):
     32        (WebCore::valueForNinePieceImage):
     33        (WebCore::zoomAdjustedPixelValue):
     34        * css/CSSComputedStyleDeclaration.h:
     35        * css/CSSFontFaceLoadEvent.cpp:
     36        (WebCore::CSSFontFaceLoadEvent::CSSFontFaceLoadEvent):
     37        * css/CSSFontFaceLoadEvent.h:
     38        * css/CSSFontValue.h:
     39        * css/CSSFunctionValue.h:
     40        * css/CSSGradientValue.h:
     41        (WebCore::CSSGradientValue::setFirstX):
     42        (WebCore::CSSGradientValue::setFirstY):
     43        (WebCore::CSSGradientValue::setSecondX):
     44        (WebCore::CSSGradientValue::setSecondY):
     45        (WebCore::CSSGradientValue::addStop):
     46        (WebCore::CSSLinearGradientValue::create):
     47        (WebCore::CSSLinearGradientValue::setAngle):
     48        (WebCore::CSSRadialGradientValue::setFirstRadius):
     49        (WebCore::CSSRadialGradientValue::setSecondRadius):
     50        (WebCore::CSSRadialGradientValue::setShape):
     51        (WebCore::CSSRadialGradientValue::setSizingBehavior):
     52        (WebCore::CSSRadialGradientValue::setEndHorizontalSize):
     53        (WebCore::CSSRadialGradientValue::setEndVerticalSize):
     54        * css/CSSGroupingRule.cpp:
     55        (WebCore::CSSGroupingRule::item):
     56        (WebCore::CSSGroupingRule::cssRules):
     57        * css/CSSKeyframesRule.cpp:
     58        (WebCore::CSSKeyframesRule::cssRules):
     59        * css/CSSParser.cpp:
     60        (WebCore::CSSParser::addProperty):
     61        (WebCore::CSSParser::rollbackLastProperties):
     62        (WebCore::CSSParser::parseDashboardRegions):
     63        (WebCore::CSSParser::parseClipShape):
     64        (WebCore::CSSParser::parseBasicShapeCircle):
     65        (WebCore::BorderImageParseContext::commitWebKitBorderImage):
     66        (WebCore::BorderImageParseContext::commitBorderImage):
     67        (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
     68        (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
     69        (WebCore::CSSParser::parseDeprecatedRadialGradient):
     70        (WebCore::CSSParser::parseRadialGradient):
     71        * css/CSSParser.h:
     72        (WebCore::cssyylex):
     73        * css/CSSPrimitiveValue.h:
     74        * css/CSSProperty.cpp:
     75        * css/CSSProperty.h:
     76        (WebCore::CSSProperty::CSSProperty):
     77        * css/CSSRule.h:
     78        * css/CSSRuleList.h:
     79        * css/CSSSegmentedFontFace.h:
     80        * css/Counter.h:
     81        (WebCore::Counter::create):
     82        (WebCore::Counter::identifier):
     83        (WebCore::Counter::listStyleIdent):
     84        (WebCore::Counter::setIdentifier):
     85        (WebCore::Counter::setListStyle):
     86        (WebCore::Counter::setSeparator):
     87        (WebCore::Counter::equals):
     88        (WebCore::Counter::cloneForCSSOM):
     89        (WebCore::Counter::Counter):
     90        * css/Pair.h:
     91        * css/Rect.h:
     92        (WebCore::RectBase::bottom):
     93        (WebCore::RectBase::left):
     94        (WebCore::RectBase::setTop):
     95        (WebCore::RectBase::setRight):
     96        (WebCore::RectBase::setBottom):
     97        (WebCore::RectBase::setLeft):
     98        (WebCore::RectBase::equals):
     99        * css/SVGCSSComputedStyleDeclaration.cpp:
     100        (WebCore::strokeDashArrayToCSSValueList):
     101        (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor):
     102        * css/StyleBuilderConverter.h:
     103        (WebCore::StyleBuilderConverter::convertClipPath):
     104        (WebCore::StyleBuilderConverter::convertShapeValue):
     105        * css/StyleProperties.cpp:
     106        (WebCore::StyleProperties::borderPropertyValue):
     107        (WebCore::StyleProperties::getPropertyCSSValue):
     108        (WebCore::StyleProperties::getPropertyCSSValueInternal):
     109        (WebCore::MutableStyleProperties::setCustomProperty):
     110        (WebCore::MutableStyleProperties::setProperty):
     111        * css/StyleProperties.h:
     112        (WebCore::StyleProperties::isEmpty):
     113        (isType):
     114        * css/StylePropertyShorthand.cpp:
     115        * css/StylePropertyShorthand.h:
     116        (WebCore::StylePropertyShorthand::StylePropertyShorthand):
     117        (WebCore::StylePropertyShorthand::id):
     118        * css/StyleResolver.cpp:
     119        (WebCore::StyleResolver::appendAuthorStyleSheets):
     120        (WebCore::StyleResolver::addKeyframeStyle):
     121        (WebCore::StyleResolver::~StyleResolver):
     122        (WebCore::StyleResolver::resolvedVariableValue):
     123        (WebCore::StyleResolver::styleImage):
     124        (WebCore::StyleResolver::cachedOrPendingFromValue):
     125        (WebCore::StyleResolver::generatedOrPendingFromValue):
     126        (WebCore::StyleResolver::createFilterOperations):
     127        (WebCore::StyleResolver::loadPendingImage):
     128        * css/StyleResolver.h:
     129        (WebCore::StyleResolver::hasViewportDependentMediaQueries):
     130        (WebCore::StyleResolver::state):
     131        (WebCore::checkRegionSelector):
     132        * css/StyleSheetList.h:
     133        * css/WebKitCSSFilterValue.cpp:
     134        * css/WebKitCSSFilterValue.h:
     135        * css/WebKitCSSTransformValue.cpp:
     136        * css/WebKitCSSTransformValue.h:
     137        * rendering/shapes/Shape.cpp:
     138
    11392016-05-18  Jer Noble  <jer.noble@apple.com>
    2140
  • trunk/Source/WebCore/css/BasicShapeFunctions.cpp

    r194496 r201113  
    189189}
    190190
    191 static BasicShapeRadius cssValueToBasicShapeRadius(const CSSToLengthConversionData& conversionData, PassRefPtr<CSSPrimitiveValue> radius)
     191static BasicShapeRadius cssValueToBasicShapeRadius(const CSSToLengthConversionData& conversionData, CSSPrimitiveValue* radius)
    192192{
    193193    if (!radius)
     
    206206    }
    207207
    208     return BasicShapeRadius(convertToLength(conversionData, radius.get()));
    209 }
    210 
    211 Ref<BasicShape> basicShapeForValue(const CSSToLengthConversionData& conversionData, const CSSBasicShape* basicShapeValue)
     208    return BasicShapeRadius(convertToLength(conversionData, radius));
     209}
     210
     211Ref<BasicShape> basicShapeForValue(const CSSToLengthConversionData& conversionData, const CSSBasicShape& basicShapeValue)
    212212{
    213213    RefPtr<BasicShape> basicShape;
    214214
    215     switch (basicShapeValue->type()) {
     215    switch (basicShapeValue.type()) {
    216216    case CSSBasicShape::CSSBasicShapeCircleType: {
    217         auto& circleValue = downcast<CSSBasicShapeCircle>(*basicShapeValue);
     217        auto& circleValue = downcast<CSSBasicShapeCircle>(basicShapeValue);
    218218        auto circle = BasicShapeCircle::create();
    219219
     
    226226    }
    227227    case CSSBasicShape::CSSBasicShapeEllipseType: {
    228         auto& ellipseValue = downcast<CSSBasicShapeEllipse>(*basicShapeValue);
     228        auto& ellipseValue = downcast<CSSBasicShapeEllipse>(basicShapeValue);
    229229        auto ellipse = BasicShapeEllipse::create();
    230230
     
    239239    }
    240240    case CSSBasicShape::CSSBasicShapePolygonType: {
    241         auto& polygonValue = downcast<CSSBasicShapePolygon>(*basicShapeValue);
     241        auto& polygonValue = downcast<CSSBasicShapePolygon>(basicShapeValue);
    242242        auto polygon = BasicShapePolygon::create();
    243243
     
    251251    }
    252252    case CSSBasicShape::CSSBasicShapeInsetType: {
    253         auto& rectValue = downcast<CSSBasicShapeInset>(*basicShapeValue);
     253        auto& rectValue = downcast<CSSBasicShapeInset>(basicShapeValue);
    254254        auto rect = BasicShapeInset::create();
    255255
     
    268268    }
    269269    case CSSBasicShape::CSSBasicShapePathType: {
    270         auto& pathValue = downcast<CSSBasicShapePath>(*basicShapeValue);
     270        auto& pathValue = downcast<CSSBasicShapePath>(basicShapeValue);
    271271        auto path = BasicShapePath::create(pathValue.pathData().copy());
    272272        path->setWindRule(pathValue.windRule());
  • trunk/Source/WebCore/css/BasicShapeFunctions.h

    r185238 r201113  
    2828 */
    2929
    30 #ifndef BasicShapeFunctions_h
    31 #define BasicShapeFunctions_h
     30#pragma once
    3231
    33 #include "BasicShapes.h"
    34 #include <wtf/PassRefPtr.h>
     32#include <wtf/Ref.h>
    3533
    3634namespace WebCore {
    3735
     36class BasicShape;
     37class BasicShapeCenterCoordinate;
    3838class CSSBasicShape;
    39 class CSSToLengthConversionData;
    40 class CSSPrimitiveValue;
    4139class CSSToLengthConversionData;
    4240class CSSValue;
     
    4442
    4543Ref<CSSValue> valueForBasicShape(const RenderStyle&, const BasicShape&);
    46 Ref<BasicShape> basicShapeForValue(const CSSToLengthConversionData&, const CSSBasicShape*);
     44Ref<BasicShape> basicShapeForValue(const CSSToLengthConversionData&, const CSSBasicShape&);
     45float floatValueForCenterCoordinate(const BasicShapeCenterCoordinate&, float);
    4746
    48 float floatValueForCenterCoordinate(const BasicShapeCenterCoordinate&, float);
    4947}
    50 
    51 #endif
  • trunk/Source/WebCore/css/CSSAnimationTriggerScrollValue.h

    r181602 r201113  
    2424 */
    2525
    26 #ifndef CSSAnimationTriggerScrollValue_h
    27 #define CSSAnimationTriggerScrollValue_h
     26#pragma once
    2827
    2928#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
    3029
    3130#include "CSSValue.h"
    32 #include <wtf/PassRefPtr.h>
    3331
    3432namespace WebCore {
     
    3634class CSSAnimationTriggerScrollValue : public CSSValue {
    3735public:
    38     static Ref<CSSAnimationTriggerScrollValue> create(PassRefPtr<CSSValue> startValue, PassRefPtr<CSSValue> endValue = nullptr)
     36    static Ref<CSSAnimationTriggerScrollValue> create(Ref<CSSValue>&& startValue, RefPtr<CSSValue>&& endValue = nullptr)
    3937    {
    40         return adoptRef(*new CSSAnimationTriggerScrollValue(startValue, endValue));
     38        return adoptRef(*new CSSAnimationTriggerScrollValue(WTFMove(startValue), WTFMove(endValue)));
    4139    }
    4240
     
    5048
    5149private:
    52     CSSAnimationTriggerScrollValue(PassRefPtr<CSSValue> startValue, PassRefPtr<CSSValue> endValue)
     50    CSSAnimationTriggerScrollValue(Ref<CSSValue>&& startValue, RefPtr<CSSValue>&& endValue)
    5351        : CSSValue(AnimationTriggerScrollClass)
    54         , m_startValue(startValue)
    55         , m_endValue(endValue)
     52        , m_startValue(WTFMove(startValue))
     53        , m_endValue(WTFMove(endValue))
    5654    {
    5755    }
     
    6664
    6765#endif
    68 
    69 #endif
  • trunk/Source/WebCore/css/CSSAspectRatioValue.h

    r177259 r201113  
    2727 */
    2828
    29 #ifndef CSSAspectRatioValue_h
    30 #define CSSAspectRatioValue_h
     29#pragma once
    3130
    32 #include "CSSPrimitiveValue.h"
    3331#include "CSSValue.h"
    3432
     
    6462
    6563SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSAspectRatioValue, isAspectRatioValue())
    66 
    67 #endif
  • trunk/Source/WebCore/css/CSSBasicShapes.h

    r197563 r201113  
    2828 */
    2929
    30 #ifndef CSSBasicShapes_h
    31 #define CSSBasicShapes_h
    32 
    33 #include "CSSPrimitiveValue.h"
     30#pragma once
     31
    3432#include "WindRule.h"
    3533#include <wtf/RefPtr.h>
     
    4038namespace WebCore {
    4139
     40class CSSPrimitiveValue;
    4241class SVGPathByteStream;
    4342
     
    7877    CSSPrimitiveValue* bottomLeftRadius() const { return m_bottomLeftRadius.get(); }
    7978
    80     void setTop(PassRefPtr<CSSPrimitiveValue> top) { m_top = top; }
    81     void setRight(PassRefPtr<CSSPrimitiveValue> right) { m_right = right; }
    82     void setBottom(PassRefPtr<CSSPrimitiveValue> bottom) { m_bottom = bottom; }
    83     void setLeft(PassRefPtr<CSSPrimitiveValue> left) { m_left = left; }
     79    void setTop(RefPtr<CSSPrimitiveValue>&& top) { m_top = WTFMove(top); }
     80    void setRight(RefPtr<CSSPrimitiveValue>&& right) { m_right = WTFMove(right); }
     81    void setBottom(RefPtr<CSSPrimitiveValue>&& bottom) { m_bottom = WTFMove(bottom); }
     82    void setLeft(RefPtr<CSSPrimitiveValue>&& left) { m_left = WTFMove(left); }
    8483
    8584    void updateShapeSize4Values(CSSPrimitiveValue* top, CSSPrimitiveValue* right, CSSPrimitiveValue* bottom, CSSPrimitiveValue* left)
     
    106105    }
    107106
    108     void setTopLeftRadius(PassRefPtr<CSSPrimitiveValue> radius) { m_topLeftRadius = radius; }
    109     void setTopRightRadius(PassRefPtr<CSSPrimitiveValue> radius) { m_topRightRadius = radius; }
    110     void setBottomRightRadius(PassRefPtr<CSSPrimitiveValue> radius) { m_bottomRightRadius = radius; }
    111     void setBottomLeftRadius(PassRefPtr<CSSPrimitiveValue> radius) { m_bottomLeftRadius = radius; }
     107    void setTopLeftRadius(RefPtr<CSSPrimitiveValue>&& radius) { m_topLeftRadius = WTFMove(radius); }
     108    void setTopRightRadius(RefPtr<CSSPrimitiveValue>&& radius) { m_topRightRadius = WTFMove(radius); }
     109    void setBottomRightRadius(RefPtr<CSSPrimitiveValue>&& radius) { m_bottomRightRadius = WTFMove(radius); }
     110    void setBottomLeftRadius(RefPtr<CSSPrimitiveValue>&& radius) { m_bottomLeftRadius = WTFMove(radius); }
    112111
    113112private:
     
    137136    CSSPrimitiveValue* radius() const { return m_radius.get(); }
    138137
    139     void setCenterX(PassRefPtr<CSSPrimitiveValue> centerX) { m_centerX = centerX; }
    140     void setCenterY(PassRefPtr<CSSPrimitiveValue> centerY) { m_centerY = centerY; }
    141     void setRadius(PassRefPtr<CSSPrimitiveValue> radius) { m_radius = radius; }
     138    void setCenterX(RefPtr<CSSPrimitiveValue>&& centerX) { m_centerX = WTFMove(centerX); }
     139    void setCenterY(RefPtr<CSSPrimitiveValue>&& centerY) { m_centerY = WTFMove(centerY); }
     140    void setRadius(RefPtr<CSSPrimitiveValue>&& radius) { m_radius = WTFMove(radius); }
    142141
    143142private:
     
    249248SPECIALIZE_TYPE_TRAITS_CSS_BASIC_SHAPES(CSSBasicShapePolygon)
    250249SPECIALIZE_TYPE_TRAITS_CSS_BASIC_SHAPES(CSSBasicShapePath)
    251 
    252 #endif // CSSBasicShapes_h
  • trunk/Source/WebCore/css/CSSBorderImage.cpp

    r194496 r201113  
    2121#include "CSSBorderImage.h"
    2222
     23#include "CSSValueList.h"
     24
    2325namespace WebCore {
    2426
    25 Ref<CSSValueList> createBorderImageValue(PassRefPtr<CSSValue> image, PassRefPtr<CSSValue> imageSlice, PassRefPtr<CSSValue> borderSlice, PassRefPtr<CSSValue> outset, PassRefPtr<CSSValue> repeat)
     27Ref<CSSValueList> createBorderImageValue(RefPtr<CSSValue>&& image, RefPtr<CSSValue>&& imageSlice, RefPtr<CSSValue>&& borderSlice, RefPtr<CSSValue>&& outset, RefPtr<CSSValue>&& repeat)
    2628{
    2729    auto list = CSSValueList::createSpaceSeparated();
     
    3234        auto listSlash = CSSValueList::createSlashSeparated();
    3335        if (imageSlice)
    34             listSlash.get().append(*imageSlice);
     36            listSlash.get().append(imageSlice.releaseNonNull());
    3537
    3638        if (borderSlice)
    37             listSlash.get().append(*borderSlice);
     39            listSlash.get().append(borderSlice.releaseNonNull());
    3840
    3941        if (outset)
    40             listSlash.get().append(*outset);
     42            listSlash.get().append(outset.releaseNonNull());
    4143
    4244        list.get().append(WTFMove(listSlash));
    4345    } else if (imageSlice)
    44         list.get().append(*imageSlice);
     46        list.get().append(imageSlice.releaseNonNull());
    4547    if (repeat)
    46         list.get().append(*repeat);
     48        list.get().append(repeat.releaseNonNull());
    4749    return list;
    4850}
  • trunk/Source/WebCore/css/CSSBorderImage.h

    r177259 r201113  
    1818 */
    1919
    20 #ifndef CSSBorderImage_h
    21 #define CSSBorderImage_h
     20#pragma once
    2221
    23 #include "CSSBorderImageSliceValue.h"
    24 #include "CSSValueList.h"
    25 #include <wtf/PassRefPtr.h>
    2622#include <wtf/RefPtr.h>
    2723
    2824namespace WebCore {
    2925
    30 Ref<CSSValueList> createBorderImageValue(PassRefPtr<CSSValue> image, PassRefPtr<CSSValue> imageSlice, PassRefPtr<CSSValue> borderSlice, PassRefPtr<CSSValue> outset, PassRefPtr<CSSValue> repeat);
     26class CSSValue;
     27class CSSValueList;
     28
     29Ref<CSSValueList> createBorderImageValue(RefPtr<CSSValue>&& image, RefPtr<CSSValue>&& imageSlice, RefPtr<CSSValue>&& borderSlice, RefPtr<CSSValue>&& outset, RefPtr<CSSValue>&& repeat);
    3130
    3231} // namespace WebCore
    33 
    34 #endif // CSSBorderImage_h
  • trunk/Source/WebCore/css/CSSBorderImageSliceValue.cpp

    r165676 r201113  
    3232namespace WebCore {
    3333
    34 CSSBorderImageSliceValue::CSSBorderImageSliceValue(PassRefPtr<CSSPrimitiveValue> slices, bool fill)
     34CSSBorderImageSliceValue::CSSBorderImageSliceValue(RefPtr<CSSPrimitiveValue>&& slices, bool fill)
    3535    : CSSValue(BorderImageSliceClass)
    36     , m_slices(slices)
     36    , m_slices(WTFMove(slices))
    3737    , m_fill(fill)
    3838{
  • trunk/Source/WebCore/css/CSSBorderImageSliceValue.h

    r196991 r201113  
    2424 */
    2525
    26 #ifndef CSSBorderImageSliceValue_h
    27 #define CSSBorderImageSliceValue_h
     26#pragma once
    2827
    2928#include "CSSPrimitiveValue.h"
    30 #include <wtf/PassRefPtr.h>
    3129#include <wtf/RefPtr.h>
    3230
     
    3735class CSSBorderImageSliceValue : public CSSValue {
    3836public:
    39     static Ref<CSSBorderImageSliceValue> create(PassRefPtr<CSSPrimitiveValue> slices, bool fill)
     37    static Ref<CSSBorderImageSliceValue> create(RefPtr<CSSPrimitiveValue>&& slices, bool fill)
    4038    {
    41         return adoptRef(*new CSSBorderImageSliceValue(slices, fill));
     39        return adoptRef(*new CSSBorderImageSliceValue(WTFMove(slices), fill));
    4240    }
    4341
     
    5452
    5553private:
    56     CSSBorderImageSliceValue(PassRefPtr<CSSPrimitiveValue> slices, bool fill);
     54    CSSBorderImageSliceValue(RefPtr<CSSPrimitiveValue>&& slices, bool fill);
    5755};
    5856
     
    6058
    6159SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSBorderImageSliceValue, isBorderImageSliceValue())
    62 
    63 #endif // CSSBorderImageSliceValue_h
  • trunk/Source/WebCore/css/CSSCalculationValue.h

    r195452 r201113  
    2929 */
    3030
    31 #ifndef CSSCalculationValue_h
    32 #define CSSCalculationValue_h
     31#pragma once
    3332
    3433#include "CSSPrimitiveValue.h"
     
    135134
    136135SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSCalcValue, isCalcValue())
    137 
    138 #endif // CSSCalculationValue_h
  • trunk/Source/WebCore/css/CSSCanvasValue.h

    r197563 r201113  
    2424 */
    2525
    26 #ifndef CSSCanvasValue_h
    27 #define CSSCanvasValue_h
     26#pragma once
    2827
    2928#include "CSSImageGeneratorValue.h"
     
    3332
    3433class Document;
     34class HTMLCanvasElement;
    3535
    3636class CSSCanvasValue : public CSSImageGeneratorValue {
     
    5555        , m_canvasObserver(*this)
    5656        , m_name(name)
    57         , m_element(0)
    5857    {
    5958    }
     
    10099    String m_name;
    101100    // The document supplies the element and owns it.
    102     HTMLCanvasElement* m_element;
     101    HTMLCanvasElement* m_element { nullptr };
    103102};
    104103
     
    107106SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSCanvasValue, isCanvasValue())
    108107
    109 #endif // CSSCanvasValue_h
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r200821 r201113  
    3333#include "CSSBasicShapes.h"
    3434#include "CSSBorderImage.h"
     35#include "CSSBorderImageSliceValue.h"
    3536#include "CSSCustomPropertyValue.h"
    3637#include "CSSFontFeatureValue.h"
     
    6566#include "StyleProperties.h"
    6667#include "StylePropertyShorthand.h"
     68#include "StylePropertyShorthandFunctions.h"
    6769#include "StyleResolver.h"
    6870#include "WebKitCSSFilterValue.h"
     
    539541
    540542    auto quad = Quad::create();
    541     quad->setTop(top.release());
    542     quad->setRight(right.release());
    543     quad->setBottom(bottom.release());
    544     quad->setLeft(left.release());
     543    quad->setTop(WTFMove(top));
     544    quad->setRight(WTFMove(right));
     545    quad->setBottom(WTFMove(bottom));
     546    quad->setLeft(WTFMove(left));
    545547
    546548    return CSSBorderImageSliceValue::create(CSSValuePool::singleton().createValue(WTFMove(quad)), image.fill());
     
    592594
    593595    auto quad = Quad::create();
    594     quad->setTop(top);
    595     quad->setRight(right);
    596     quad->setBottom(bottom);
    597     quad->setLeft(left);
     596    quad->setTop(WTFMove(top));
     597    quad->setRight(WTFMove(right));
     598    quad->setBottom(WTFMove(bottom));
     599    quad->setLeft(WTFMove(left));
    598600
    599601    return cssValuePool.createValue(WTFMove(quad));
     
    635637    RefPtr<CSSValue> repeat = valueForNinePieceImageRepeat(image);
    636638
    637     return createBorderImageValue(imageValue.release(), imageSlices.release(), borderSlices.release(), outset.release(), repeat.release());
     639    return createBorderImageValue(WTFMove(imageValue), WTFMove(imageSlices), WTFMove(borderSlices), WTFMove(outset), WTFMove(repeat));
    638640}
    639641
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h

    r200098 r201113  
    7171
    7272    RefPtr<CSSValue> svgPropertyValue(CSSPropertyID, EUpdateLayout) const;
    73     RefPtr<SVGPaint> adjustSVGPaintForCurrentColor(PassRefPtr<SVGPaint>, const RenderStyle*) const;
     73    RefPtr<SVGPaint> adjustSVGPaintForCurrentColor(RefPtr<SVGPaint>&&, const RenderStyle*) const;
    7474
    7575    static Ref<CSSValue> valueForShadow(const ShadowData*, CSSPropertyID, const RenderStyle&, AdjustPixelValuesForComputedStyle = AdjustPixelValues);
  • trunk/Source/WebCore/css/CSSFontFaceLoadEvent.cpp

    r156241 r201113  
    4040}
    4141
    42 CSSFontFaceLoadEvent::CSSFontFaceLoadEvent(const AtomicString& type, PassRefPtr<CSSFontFaceRule> fontface, PassRefPtr<DOMError> error)
     42CSSFontFaceLoadEvent::CSSFontFaceLoadEvent(const AtomicString& type, RefPtr<CSSFontFaceRule>&& fontface, RefPtr<DOMError>&& error)
    4343    : Event(type, false, false)
    44     , m_fontface(fontface)
    45     , m_error(error)
     44    , m_fontface(WTFMove(fontface))
     45    , m_error(WTFMove(error))
    4646{
    4747}
  • trunk/Source/WebCore/css/CSSFontFaceLoadEvent.h

    r197563 r201113  
    2929 */
    3030
     31#pragma once
     32
    3133#if ENABLE(FONT_LOAD_EVENTS)
    32 
    33 #ifndef CSSFontFaceLoadEvent_h
    34 #define CSSFontFaceLoadEvent_h
    3534
    3635#include "CSSFontFaceRule.h"
    3736#include "CSSValue.h"
    38 #include "DOMError.h"
    3937#include "Event.h"
    4038#include "EventNames.h"
    41 #include <wtf/PassRefPtr.h>
    4239#include <wtf/RefPtr.h>
    4340
    4441namespace WebCore {
     42
     43class DOMError;
    4544
    4645struct CSSFontFaceLoadEventInit : public EventInit {
     
    6160    }
    6261
    63     static Ref<CSSFontFaceLoadEvent> createForFontFaceRule(const AtomicString& type, PassRefPtr<CSSFontFaceRule> rule)
     62    static Ref<CSSFontFaceLoadEvent> createForFontFaceRule(const AtomicString& type, RefPtr<CSSFontFaceRule>&& rule)
    6463    {
    65         return adoptRef<CSSFontFaceLoadEvent>(*new CSSFontFaceLoadEvent(type, rule, 0));
     64        return adoptRef<CSSFontFaceLoadEvent>(*new CSSFontFaceLoadEvent(type, WTFMove(rule), nullptr));
    6665    }
    6766
    68     static Ref<CSSFontFaceLoadEvent> createForError(PassRefPtr<CSSFontFaceRule> rule, PassRefPtr<DOMError> error)
     67    static Ref<CSSFontFaceLoadEvent> createForError(RefPtr<CSSFontFaceRule>&& rule, RefPtr<DOMError>&& error)
    6968    {
    70         return adoptRef<CSSFontFaceLoadEvent>(*new CSSFontFaceLoadEvent(eventNames().errorEvent, rule, error));
     69        return adoptRef<CSSFontFaceLoadEvent>(*new CSSFontFaceLoadEvent(eventNames().errorEvent, WTFMove(rule), WTFMove(error)));
    7170    }
    7271
     
    8079private:
    8180    CSSFontFaceLoadEvent();
    82     CSSFontFaceLoadEvent(const AtomicString&, PassRefPtr<CSSFontFaceRule>, PassRefPtr<DOMError>);
     81    CSSFontFaceLoadEvent(const AtomicString&, RefPtr<CSSFontFaceRule>&&, RefPtr<DOMError>&&);
    8382    CSSFontFaceLoadEvent(const AtomicString&, const CSSFontFaceLoadEventInit&);
    8483
     
    8988} // namespace WebCore
    9089
    91 #endif // CSSFontFaceLoadEvent_h
    9290#endif // ENABLE(FONT_LOAD_EVENTS)
  • trunk/Source/WebCore/css/CSSFontValue.h

    r177259 r201113  
    1919 */
    2020
    21 #ifndef CSSFontValue_h
    22 #define CSSFontValue_h
     21#pragma once
    2322
    2423#include "CSSValue.h"
    25 #include <wtf/PassRefPtr.h>
    2624#include <wtf/RefPtr.h>
    2725
     
    5957
    6058SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSFontValue, isFontValue())
    61 
    62 #endif
  • trunk/Source/WebCore/css/CSSFunctionValue.h

    r191128 r201113  
    2424 */
    2525
    26 #ifndef CSSFunctionValue_h
    27 #define CSSFunctionValue_h
     26#pragma once
    2827
    2928#include "CSSValue.h"
     
    6665
    6766SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSFunctionValue, isFunctionValue())
    68 
    69 #endif
    70 
  • trunk/Source/WebCore/css/CSSGradientValue.h

    r188315 r201113  
    2424 */
    2525
    26 #ifndef CSSGradientValue_h
    27 #define CSSGradientValue_h
     26#pragma once
    2827
    2928#include "CSSImageGeneratorValue.h"
     
    6564    RefPtr<Image> image(RenderElement*, const FloatSize&);
    6665
    67     void setFirstX(PassRefPtr<CSSPrimitiveValue> val) { m_firstX = val; }
    68     void setFirstY(PassRefPtr<CSSPrimitiveValue> val) { m_firstY = val; }
    69     void setSecondX(PassRefPtr<CSSPrimitiveValue> val) { m_secondX = val; }
    70     void setSecondY(PassRefPtr<CSSPrimitiveValue> val) { m_secondY = val; }
     66    void setFirstX(RefPtr<CSSPrimitiveValue>&& val) { m_firstX = WTFMove(val); }
     67    void setFirstY(RefPtr<CSSPrimitiveValue>&& val) { m_firstY = WTFMove(val); }
     68    void setSecondX(RefPtr<CSSPrimitiveValue>&& val) { m_secondX = WTFMove(val); }
     69    void setSecondY(RefPtr<CSSPrimitiveValue>&& val) { m_secondY = WTFMove(val); }
    7170
    7271    void addStop(const CSSGradientColorStop& stop) { m_stops.append(stop); }
     
    140139    }
    141140
    142     void setAngle(PassRefPtr<CSSPrimitiveValue> val) { m_angle = val; }
     141    void setAngle(RefPtr<CSSPrimitiveValue>&& val) { m_angle = WTFMove(val); }
    143142
    144143    String customCSSText() const;
     
    183182    String customCSSText() const;
    184183
    185     void setFirstRadius(PassRefPtr<CSSPrimitiveValue> val) { m_firstRadius = val; }
    186     void setSecondRadius(PassRefPtr<CSSPrimitiveValue> val) { m_secondRadius = val; }
    187 
    188     void setShape(PassRefPtr<CSSPrimitiveValue> val) { m_shape = val; }
    189     void setSizingBehavior(PassRefPtr<CSSPrimitiveValue> val) { m_sizingBehavior = val; }
    190 
    191     void setEndHorizontalSize(PassRefPtr<CSSPrimitiveValue> val) { m_endHorizontalSize = val; }
    192     void setEndVerticalSize(PassRefPtr<CSSPrimitiveValue> val) { m_endVerticalSize = val; }
     184    void setFirstRadius(RefPtr<CSSPrimitiveValue>&& val) { m_firstRadius = WTFMove(val); }
     185    void setSecondRadius(RefPtr<CSSPrimitiveValue>&& val) { m_secondRadius = WTFMove(val); }
     186
     187    void setShape(RefPtr<CSSPrimitiveValue>&& val) { m_shape = WTFMove(val); }
     188    void setSizingBehavior(RefPtr<CSSPrimitiveValue>&& val) { m_sizingBehavior = WTFMove(val); }
     189
     190    void setEndHorizontalSize(RefPtr<CSSPrimitiveValue>&& val) { m_endHorizontalSize = WTFMove(val); }
     191    void setEndVerticalSize(RefPtr<CSSPrimitiveValue>&& val) { m_endVerticalSize = WTFMove(val); }
    193192
    194193    // Create the gradient for a given size.
     
    235234SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSLinearGradientValue, isLinearGradientValue())
    236235SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSRadialGradientValue, isRadialGradientValue())
    237 
    238 #endif // CSSGradientValue_h
  • trunk/Source/WebCore/css/CSSGroupingRule.cpp

    r174256 r201113  
    134134{
    135135    if (index >= length())
    136         return 0;
     136        return nullptr;
    137137    ASSERT(m_childRuleCSSOMWrappers.size() == m_groupRule->childRules().size());
    138138    RefPtr<CSSRule>& rule = m_childRuleCSSOMWrappers[index];
     
    145145{
    146146    if (!m_ruleListCSSOMWrapper)
    147         m_ruleListCSSOMWrapper = std::make_unique<LiveCSSRuleList<CSSGroupingRule>>(const_cast<CSSGroupingRule*>(this));
     147        m_ruleListCSSOMWrapper = std::make_unique<LiveCSSRuleList<CSSGroupingRule>>(const_cast<CSSGroupingRule&>(*this));
    148148    return *m_ruleListCSSOMWrapper;
    149149}
  • trunk/Source/WebCore/css/CSSKeyframesRule.cpp

    r191132 r201113  
    194194{
    195195    if (!m_ruleListCSSOMWrapper)
    196         m_ruleListCSSOMWrapper = std::make_unique<LiveCSSRuleList<CSSKeyframesRule>>(this);
     196        m_ruleListCSSOMWrapper = std::make_unique<LiveCSSRuleList<CSSKeyframesRule>>(*this);
    197197    return *m_ruleListCSSOMWrapper;
    198198}
  • trunk/Source/WebCore/css/CSSParser.cpp

    r201103 r201113  
    3333#include "CSSBasicShapes.h"
    3434#include "CSSBorderImage.h"
     35#include "CSSBorderImageSliceValue.h"
    3536#include "CSSCanvasValue.h"
    3637#include "CSSContentDistributionValue.h"
     
    9192#include "StyleProperties.h"
    9293#include "StylePropertyShorthand.h"
     94#include "StylePropertyShorthandFunctions.h"
    9395#include "StyleRule.h"
    9496#include "StyleRuleImport.h"
     
    16471649    // This property doesn't belong to a shorthand or is a CSS variable (which will be resolved later).
    16481650    if (!m_currentShorthand) {
    1649         m_parsedProperties.append(CSSProperty(propId, value, important, false, CSSPropertyInvalid, m_implicitShorthand || implicit));
     1651        m_parsedProperties.append(CSSProperty(propId, WTFMove(value), important, false, CSSPropertyInvalid, m_implicitShorthand || implicit));
    16501652        return;
    16511653    }
     
    16531655    Vector<StylePropertyShorthand> shorthands = matchingShorthandsForLonghand(propId);
    16541656    if (shorthands.size() == 1)
    1655         m_parsedProperties.append(CSSProperty(propId, value, important, true, CSSPropertyInvalid, m_implicitShorthand || implicit));
     1657        m_parsedProperties.append(CSSProperty(propId, WTFMove(value), important, true, CSSPropertyInvalid, m_implicitShorthand || implicit));
    16561658    else
    1657         m_parsedProperties.append(CSSProperty(propId, value, important, true, indexOfShorthandForLonghand(m_currentShorthand, shorthands), m_implicitShorthand || implicit));
     1659        m_parsedProperties.append(CSSProperty(propId, WTFMove(value), important, true, indexOfShorthandForLonghand(m_currentShorthand, shorthands), m_implicitShorthand || implicit));
    16581660}
    16591661
     
    18811883}
    18821884
    1883 void CSSParser::addExpandedPropertyForValue(CSSPropertyID propId, RefPtr<CSSValue>&& prpValue, bool important)
     1885void CSSParser::addExpandedPropertyForValue(CSSPropertyID propId, RefPtr<CSSValue>&& value, bool important)
    18841886{
    18851887    const StylePropertyShorthand& shorthand = shorthandForProperty(propId);
    18861888    unsigned shorthandLength = shorthand.length();
    18871889    if (!shorthandLength) {
    1888         addProperty(propId, WTFMove(prpValue), important);
     1890        addProperty(propId, WTFMove(value), important);
    18891891        return;
    18901892    }
    18911893
    1892     RefPtr<CSSValue> value = prpValue;
    18931894    ShorthandScope scope(this, propId);
    18941895    const CSSPropertyID* longhands = shorthand.properties();
    18951896    for (unsigned i = 0; i < shorthandLength; ++i)
    1896         addProperty(longhands[i], WTFMove(value), important);
     1897        addProperty(longhands[i], value.copyRef(), important);
    18971898}
    18981899
     
    51155116            return nullptr;
    51165117
    5117         RefPtr<CSSValue> startValue = createPrimitiveNumericValue(firstArgumentWithCalculation);
     5118        Ref<CSSValue> startValue = createPrimitiveNumericValue(firstArgumentWithCalculation);
    51185119
    51195120        argument = args->next();
    51205121
    51215122        if (!argument)
    5122             return CSSAnimationTriggerScrollValue::create(startValue.release());
     5123            return CSSAnimationTriggerScrollValue::create(WTFMove(startValue));
    51235124
    51245125        if (!isComma(argument))
     
    51305131            return nullptr;
    51315132
    5132         RefPtr<CSSValue> endValue = createPrimitiveNumericValue(secondArgumentWithCalculation);
    5133 
    5134         return CSSAnimationTriggerScrollValue::create(startValue.release(), endValue.release());
     5133        Ref<CSSValue> endValue = createPrimitiveNumericValue(secondArgumentWithCalculation);
     5134
     5135        return CSSAnimationTriggerScrollValue::create(WTFMove(startValue), WTFMove(endValue));
    51355136    }
    51365137
     
    62356236            RefPtr<CSSPrimitiveValue> amount = CSSValuePool::singleton().createIdentifierValue(CSSValueInvalid);
    62366237
    6237             region->setTop(amount);
    6238             region->setRight(amount);
    6239             region->setBottom(amount);
    6240             region->setLeft(amount);
     6238            region->setTop(amount.copyRef());
     6239            region->setRight(amount.copyRef());
     6240            region->setBottom(amount.copyRef());
     6241            region->setLeft(WTFMove(amount));
    62416242        } else {
    62426243            // Next four arguments must be offset numbers
     
    62536254
    62546255                if (i == 0)
    6255                     region->setTop(amount);
     6256                    region->setTop(WTFMove(amount));
    62566257                else if (i == 1)
    6257                     region->setRight(amount);
     6258                    region->setRight(WTFMove(amount));
    62586259                else if (i == 2)
    6259                     region->setBottom(amount);
     6260                    region->setBottom(WTFMove(amount));
    62606261                else
    6261                     region->setLeft(amount);
     6262                    region->setLeft(WTFMove(amount));
    62626263            }
    62636264        }
     
    64716472        RefPtr<CSSPrimitiveValue> length = argument->id == CSSValueAuto ? CSSValuePool::singleton().createIdentifierValue(CSSValueAuto) : createPrimitiveNumericValue(argumentWithCalculation);
    64726473        if (i == 0)
    6473             rect->setTop(length);
     6474            rect->setTop(WTFMove(length));
    64746475        else if (i == 1)
    6475             rect->setRight(length);
     6476            rect->setRight(WTFMove(length));
    64766477        else if (i == 2)
    6477             rect->setBottom(length);
     6478            rect->setBottom(WTFMove(length));
    64786479        else
    6479             rect->setLeft(length);
     6480            rect->setLeft(WTFMove(length));
    64806481        argument = args->next();
    64816482        if (argument && args->size() == 7) {
     
    66526653        if (!args.currentIndex() && argument->id != CSSValueAt) {
    66536654            if (RefPtr<CSSPrimitiveValue> radius = parseShapeRadius(*argument)) {
    6654                 shape->setRadius(radius);
     6655                shape->setRadius(WTFMove(radius));
    66556656                continue;
    66566657            }
     
    66646665            parseFillPosition(args, centerX, centerY);
    66656666            if (centerX && centerY && !args.current()) {
    6666                 shape->setCenterX(centerX);
    6667                 shape->setCenterY(centerY);
     6667                shape->setCenterX(WTFMove(centerX));
     6668                shape->setCenterY(WTFMove(centerY));
    66686669            } else
    66696670                return nullptr;
     
    82468247    RefPtr<CSSValue> commitWebKitBorderImage()
    82478248    {
    8248         return createBorderImageValue(m_image, m_imageSlice, m_borderSlice, m_outset, m_repeat);
     8249        return createBorderImageValue(m_image.copyRef(), m_imageSlice.copyRef(), m_borderSlice.copyRef(), m_outset.copyRef(), m_repeat.copyRef());
    82498250    }
    82508251
     
    84488449        // Now build a rect value to hold all four of our primitive values.
    84498450        auto quad = Quad::create();
    8450         quad->setTop(m_top);
    8451         quad->setRight(m_right);
    8452         quad->setBottom(m_bottom);
    8453         quad->setLeft(m_left);
     8451        quad->setTop(m_top.copyRef());
     8452        quad->setRight(m_right.copyRef());
     8453        quad->setBottom(m_bottom.copyRef());
     8454        quad->setLeft(m_left.copyRef());
    84548455
    84558456        // Make our new border image value now.
     
    85668567        // Now build a quad value to hold all four of our primitive values.
    85678568        auto quad = Quad::create();
    8568         quad->setTop(m_top);
    8569         quad->setRight(m_right);
    8570         quad->setBottom(m_bottom);
    8571         quad->setLeft(m_left);
     8569        quad->setTop(m_top.copyRef());
     8570        quad->setRight(m_right.copyRef());
     8571        quad->setBottom(m_bottom.copyRef());
     8572        quad->setLeft(m_left.copyRef());
    85728573
    85738574        // Make our new value now.
     
    91109111    }
    91119112
    9112     result->setFirstX(centerX);
    9113     result->setSecondX(centerX);
     9113    result->setFirstX(centerX.copyRef());
     9114    result->setSecondX(WTFMove(centerX));
    91149115    // CSS3 radial gradients always share the same start and end point.
    9115     result->setFirstY(centerY);
    9116     result->setSecondY(centerY);
     9116    result->setFirstY(centerY.copyRef());
     9117    result->setSecondY(WTFMove(centerY));
    91179118
    91189119    RefPtr<CSSPrimitiveValue> shapeValue;
     
    91539154    }
    91549155
    9155     result->setShape(shapeValue);
    9156     result->setSizingBehavior(sizeValue);
     9156    result->setShape(shapeValue.copyRef());
     9157    result->setSizingBehavior(sizeValue.copyRef());
    91579158
    91589159    // Or, two lengths or percentages
     
    91869187        return false;
    91879188
    9188     result->setEndHorizontalSize(horizontalSize);
    9189     result->setEndVerticalSize(verticalSize);
     9189    result->setEndHorizontalSize(WTFMove(horizontalSize));
     9190    result->setEndVerticalSize(WTFMove(verticalSize));
    91909191
    91919192    if (!parseGradientColorStops(*args, *result, expectComma))
     
    93569357        return false;
    93579358
    9358     result->setShape(shapeValue);
    9359     result->setSizingBehavior(sizeValue);
    9360     result->setEndHorizontalSize(horizontalSize);
    9361     result->setEndVerticalSize(verticalSize);
     9359    result->setShape(shapeValue.copyRef());
     9360    result->setSizingBehavior(sizeValue.copyRef());
     9361    result->setEndHorizontalSize(horizontalSize.copyRef());
     9362    result->setEndVerticalSize(verticalSize.copyRef());
    93629363
    93639364    // Second part of grammar, the center-position clause:
     
    93789379            return false;
    93799380
    9380         result->setFirstX(centerX);
    9381         result->setFirstY(centerY);
     9381        result->setFirstX(centerX.copyRef());
     9382        result->setFirstY(centerY.copyRef());
    93829383        // Right now, CSS radial gradients have the same start and end centers.
    9383         result->setSecondX(centerX);
    9384         result->setSecondY(centerY);
     9384        result->setSecondX(centerX.copyRef());
     9385        result->setSecondY(centerY.copyRef());
    93859386    }
    93869387
  • trunk/Source/WebCore/css/CSSParser.h

    r201090 r201113  
    2121 */
    2222
    23 #ifndef CSSParser_h
    24 #define CSSParser_h
     23#pragma once
    2524
    2625#include "CSSCalculationValue.h"
     
    779778
    780779} // namespace WebCore
    781 
    782 #endif // CSSParser_h
  • trunk/Source/WebCore/css/CSSPrimitiveValue.h

    r200789 r201113  
    2020 */
    2121
    22 #ifndef CSSPrimitiveValue_h
    23 #define CSSPrimitiveValue_h
     22#pragma once
    2423
    2524#include "CSSPropertyNames.h"
     
    470469
    471470SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSPrimitiveValue, isPrimitiveValue())
    472 
    473 #endif // CSSPrimitiveValue_h
  • trunk/Source/WebCore/css/CSSProperty.cpp

    r194496 r201113  
    2525#include "RenderStyleConstants.h"
    2626#include "StylePropertyShorthand.h"
     27#include "StylePropertyShorthandFunctions.h"
    2728
    2829#include <wtf/NeverDestroyed.h>
  • trunk/Source/WebCore/css/CSSProperty.h

    r200977 r201113  
    2020 */
    2121
    22 #ifndef CSSProperty_h
    23 #define CSSProperty_h
     22#pragma once
    2423
    2524#include "CSSPropertyNames.h"
    2625#include "CSSValue.h"
    27 #include "RenderStyleConstants.h"
    2826#include "WritingMode.h"
    29 #include <wtf/PassRefPtr.h>
    3027#include <wtf/RefPtr.h>
    3128
     
    6562class CSSProperty {
    6663public:
    67     CSSProperty(CSSPropertyID propertyID, PassRefPtr<CSSValue> value, bool important = false, bool isSetFromShorthand = false, int indexInShorthandsVector = 0, bool implicit = false)
     64    CSSProperty(CSSPropertyID propertyID, RefPtr<CSSValue>&& value, bool important = false, bool isSetFromShorthand = false, int indexInShorthandsVector = 0, bool implicit = false)
    6865        : m_metadata(propertyID, isSetFromShorthand, indexInShorthandsVector, important, implicit, isInheritedProperty(propertyID))
    69         , m_value(value)
     66        , m_value(WTFMove(value))
    7067    {
    7168    }
     
    181178};
    182179}
    183 
    184 #endif // CSSProperty_h
  • trunk/Source/WebCore/css/CSSRule.h

    r176157 r201113  
    2121 */
    2222
    23 #ifndef CSSRule_h
    24 #define CSSRule_h
     23#pragma once
    2524
    2625#include <wtf/RefCounted.h>
     
    124123SPECIALIZE_TYPE_TRAITS_END()
    125124
    126 #endif // CSSRule_h
  • trunk/Source/WebCore/css/CSSRuleList.h

    r197563 r201113  
    2020 */
    2121
    22 #ifndef CSSRuleList_h
    23 #define CSSRuleList_h
     22#pragma once
    2423
    25 #include <wtf/PassRefPtr.h>
    2624#include <wtf/RefCounted.h>
    2725#include <wtf/RefPtr.h>
    2826#include <wtf/Vector.h>
    29 #include <wtf/text/WTFString.h>
    3027
    3128namespace WebCore {
     
    7774class LiveCSSRuleList final : public CSSRuleList {
    7875public:
    79     LiveCSSRuleList(Rule* rule) : m_rule(rule) { }
     76    LiveCSSRuleList(Rule& rule)
     77        : m_rule(rule)
     78    {
     79    }
    8080   
    81     void ref() override { m_rule->ref(); }
    82     void deref() override { m_rule->deref(); }
     81    void ref() override { m_rule.ref(); }
     82    void deref() override { m_rule.deref(); }
    8383
    8484private:
    85     unsigned length() const override { return m_rule->length(); }
    86     CSSRule* item(unsigned index) const override { return m_rule->item(index); }
    87     CSSStyleSheet* styleSheet() const override { return m_rule->parentStyleSheet(); }
     85    unsigned length() const override { return m_rule.length(); }
     86    CSSRule* item(unsigned index) const override { return m_rule.item(index); }
     87    CSSStyleSheet* styleSheet() const override { return m_rule.parentStyleSheet(); }
    8888   
    89     Rule* m_rule;
     89    Rule& m_rule;
    9090};
    9191
    9292} // namespace WebCore
    93 
    94 #endif // CSSRuleList_h
  • trunk/Source/WebCore/css/CSSSegmentedFontFace.h

    r197804 r201113  
    2929#include "CSSFontFace.h"
    3030#include "FontCache.h"
    31 #include "FontRanges.h"
    3231#include <wtf/HashMap.h>
    33 #include <wtf/PassRefPtr.h>
    3432#include <wtf/RefCounted.h>
    3533#include <wtf/Vector.h>
     
    3937class CSSFontSelector;
    4038class FontDescription;
     39class FontRanges;
    4140
    4241class CSSSegmentedFontFace final : public RefCounted<CSSSegmentedFontFace>, public CSSFontFace::Client {
  • trunk/Source/WebCore/css/Counter.h

    r178951 r201113  
    1919 */
    2020
    21 #ifndef Counter_h
    22 #define Counter_h
     21#pragma once
    2322
    2423#include "CSSPrimitiveValue.h"
     
    2928class Counter : public RefCounted<Counter> {
    3029public:
    31     static Ref<Counter> create(PassRefPtr<CSSPrimitiveValue> identifier, PassRefPtr<CSSPrimitiveValue> listStyle, PassRefPtr<CSSPrimitiveValue> separator)
     30    static Ref<Counter> create(RefPtr<CSSPrimitiveValue>&& identifier, RefPtr<CSSPrimitiveValue>&& listStyle, RefPtr<CSSPrimitiveValue>&& separator)
    3231    {
    33         return adoptRef(*new Counter(identifier, listStyle, separator));
     32        return adoptRef(*new Counter(WTFMove(identifier), WTFMove(listStyle), WTFMove(separator)));
    3433    }
    3534
     
    4039    CSSValueID listStyleIdent() const { return m_listStyle ? m_listStyle->getValueID() : CSSValueInvalid; }
    4140
    42     void setIdentifier(PassRefPtr<CSSPrimitiveValue> identifier) { m_identifier = identifier; }
    43     void setListStyle(PassRefPtr<CSSPrimitiveValue> listStyle) { m_listStyle = listStyle; }
    44     void setSeparator(PassRefPtr<CSSPrimitiveValue> separator) { m_separator = separator; }
     41    void setIdentifier(RefPtr<CSSPrimitiveValue>&& identifier) { m_identifier = WTFMove(identifier); }
     42    void setListStyle(RefPtr<CSSPrimitiveValue>&& listStyle) { m_listStyle = WTFMove(listStyle); }
     43    void setSeparator(RefPtr<CSSPrimitiveValue>&& separator) { m_separator = WTFMove(separator); }
    4544
    4645    bool equals(const Counter& other) const
     
    5958
    6059private:
    61     Counter(PassRefPtr<CSSPrimitiveValue> identifier, PassRefPtr<CSSPrimitiveValue> listStyle, PassRefPtr<CSSPrimitiveValue> separator)
    62         : m_identifier(identifier)
    63         , m_listStyle(listStyle)
    64         , m_separator(separator)
     60    Counter(RefPtr<CSSPrimitiveValue>&& identifier, RefPtr<CSSPrimitiveValue>&& listStyle, RefPtr<CSSPrimitiveValue>&& separator)
     61        : m_identifier(WTFMove(identifier))
     62        , m_listStyle(WTFMove(listStyle))
     63        , m_separator(WTFMove(separator))
    6564    {
    6665    }
     
    7271
    7372} // namespace WebCore
    74 
    75 #endif // Counter_h
  • trunk/Source/WebCore/css/Pair.h

    r194496 r201113  
    1919 */
    2020
    21 #ifndef Pair_h
    22 #define Pair_h
     21#pragma once
    2322
    2423#include <wtf/RefCounted.h>
    25 #include "CSSPrimitiveValue.h"
    26 #include <wtf/PassRefPtr.h>
    27 #include <wtf/text/StringBuilder.h>
    2824
    2925namespace WebCore {
     26
     27class CSSPrimitiveValue;
    3028
    3129// A primitive value representing a pair.  This is useful for properties like border-radius, background-size/position,
     
    7472
    7573} // namespace
    76 
    77 #endif
  • trunk/Source/WebCore/css/Rect.h

    r185238 r201113  
    1919 */
    2020
    21 #ifndef Rect_h
    22 #define Rect_h
     21#pragma once
    2322
    2423#include "CSSPrimitiveValue.h"
     
    3534    CSSPrimitiveValue* left() const { return m_left.get(); }
    3635
    37     void setTop(PassRefPtr<CSSPrimitiveValue> top) { m_top = top; }
    38     void setRight(PassRefPtr<CSSPrimitiveValue> right) { m_right = right; }
    39     void setBottom(PassRefPtr<CSSPrimitiveValue> bottom) { m_bottom = bottom; }
    40     void setLeft(PassRefPtr<CSSPrimitiveValue> left) { m_left = left; }
     36    void setTop(RefPtr<CSSPrimitiveValue>&& top) { m_top = WTFMove(top); }
     37    void setRight(RefPtr<CSSPrimitiveValue>&& right) { m_right = WTFMove(right); }
     38    void setBottom(RefPtr<CSSPrimitiveValue>&& bottom) { m_bottom = WTFMove(bottom); }
     39    void setLeft(RefPtr<CSSPrimitiveValue>&& left) { m_left = WTFMove(left); }
    4140
    4241    bool equals(const RectBase& other) const
     
    124123
    125124} // namespace WebCore
    126 
    127 #endif // Rect_h
  • trunk/Source/WebCore/css/RuleSet.cpp

    r199291 r201113  
    4343#include "StyleRuleImport.h"
    4444#include "StyleSheetContents.h"
     45#include "ViewportStyleResolver.h"
    4546
    4647#if ENABLE(VIDEO_TRACK)
  • trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp

    r200626 r201113  
    9494}
    9595
    96 RefPtr<SVGPaint> ComputedStyleExtractor::adjustSVGPaintForCurrentColor(PassRefPtr<SVGPaint> newPaint, const RenderStyle* style) const
    97 {
    98     RefPtr<SVGPaint> paint = newPaint;
     96RefPtr<SVGPaint> ComputedStyleExtractor::adjustSVGPaintForCurrentColor(RefPtr<SVGPaint>&& paint, const RenderStyle* style) const
     97{
    9998    if (paint->paintType() == SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR || paint->paintType() == SVGPaint::SVG_PAINTTYPE_URI_CURRENTCOLOR)
    10099        paint->setColor(style->color());
    101     return paint;
     100    return WTFMove(paint);
    102101}
    103102
  • trunk/Source/WebCore/css/StyleBuilderConverter.h

    r200626 r201113  
    504504        if (primitiveValue.isShape()) {
    505505            ASSERT(!operation);
    506             operation = ShapeClipPathOperation::create(basicShapeForValue(styleResolver.state().cssToLengthConversionData(), primitiveValue.getShapeValue()));
     506            operation = ShapeClipPathOperation::create(basicShapeForValue(styleResolver.state().cssToLengthConversionData(), *primitiveValue.getShapeValue()));
    507507        } else {
    508508            ASSERT(primitiveValue.getValueID() == CSSValueContentBox
     
    752752        CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(currentValue.get());
    753753        if (primitiveValue.isShape())
    754             shape = basicShapeForValue(styleResolver.state().cssToLengthConversionData(), primitiveValue.getShapeValue());
     754            shape = basicShapeForValue(styleResolver.state().cssToLengthConversionData(), *primitiveValue.getShapeValue());
    755755        else if (primitiveValue.getValueID() == CSSValueContentBox
    756756            || primitiveValue.getValueID() == CSSValueBorderBox
  • trunk/Source/WebCore/css/StyleProperties.cpp

    r200977 r201113  
    3434#include "PropertySetCSSStyleDeclaration.h"
    3535#include "StylePropertyShorthand.h"
     36#include "StylePropertyShorthandFunctions.h"
    3637#include "StyleSheetContents.h"
    3738#include <bitset>
     
    607608}
    608609
    609 PassRefPtr<CSSValue> StyleProperties::getPropertyCSSValue(CSSPropertyID propertyID) const
    610 {
    611     PassRefPtr<CSSValue> value = getPropertyCSSValueInternal(propertyID);
     610RefPtr<CSSValue> StyleProperties::getPropertyCSSValue(CSSPropertyID propertyID) const
     611{
     612    RefPtr<CSSValue> value = getPropertyCSSValueInternal(propertyID);
    612613    if (value && value->isVariableDependentValue()) {
    613614        auto& dependentValue = downcast<CSSVariableDependentValue>(*value);
     
    618619}
    619620
    620 PassRefPtr<CSSValue> StyleProperties::getPropertyCSSValueInternal(CSSPropertyID propertyID) const
     621RefPtr<CSSValue> StyleProperties::getPropertyCSSValueInternal(CSSPropertyID propertyID) const
    621622{
    622623    int foundPropertyIndex = findPropertyIndex(propertyID);
     
    752753}
    753754
    754 void MutableStyleProperties::setProperty(CSSPropertyID propertyID, PassRefPtr<CSSValue> prpValue, bool important)
     755void MutableStyleProperties::setProperty(CSSPropertyID propertyID, RefPtr<CSSValue>&& value, bool important)
    755756{
    756757    StylePropertyShorthand shorthand = shorthandForProperty(propertyID);
    757758    if (!shorthand.length()) {
    758         setProperty(CSSProperty(propertyID, prpValue, important));
     759        setProperty(CSSProperty(propertyID, WTFMove(value), important));
    759760        return;
    760761    }
     
    762763    removePropertiesInSet(shorthand.properties(), shorthand.length());
    763764
    764     RefPtr<CSSValue> value = prpValue;
    765765    for (unsigned i = 0; i < shorthand.length(); ++i)
    766         m_propertyVector.append(CSSProperty(shorthand.properties()[i], value, important));
     766        m_propertyVector.append(CSSProperty(shorthand.properties()[i], value.copyRef(), important));
    767767}
    768768
  • trunk/Source/WebCore/css/StyleProperties.h

    r200977 r201113  
    2020 */
    2121
    22 #ifndef StyleProperties_h
    23 #define StyleProperties_h
     22#pragma once
    2423
    2524#include "CSSParserMode.h"
    26 #include "CSSPrimitiveValue.h"
    2725#include "CSSProperty.h"
    28 #include "CSSPropertyNames.h"
    2926#include "CSSValueKeywords.h"
    3027#include <memory>
     
    8683    PropertyReference propertyAt(unsigned) const;
    8784
    88     WEBCORE_EXPORT PassRefPtr<CSSValue> getPropertyCSSValue(CSSPropertyID) const;
     85    WEBCORE_EXPORT RefPtr<CSSValue> getPropertyCSSValue(CSSPropertyID) const;
    8986    WEBCORE_EXPORT String getPropertyValue(CSSPropertyID) const;
    9087    bool propertyIsImportant(CSSPropertyID) const;
     
    153150    void appendFontLonghandValueIfExplicit(CSSPropertyID, StringBuilder& result, String& value) const;
    154151   
    155     PassRefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) const;
     152    RefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) const;
    156153   
    157154    friend class PropertySetCSSStyleDeclaration;
     
    206203    // These expand shorthand properties into multiple properties.
    207204    bool setProperty(CSSPropertyID, const String& value, bool important = false, StyleSheetContents* contextStyleSheet = 0);
    208     void setProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool important = false);
     205    void setProperty(CSSPropertyID, RefPtr<CSSValue>&&, bool important = false);
    209206
    210207    // These do not. FIXME: This is too messy, we can do better.
     
    306303    static bool isType(const WebCore::StyleProperties& set) { return !set.isMutable(); }
    307304SPECIALIZE_TYPE_TRAITS_END()
    308 
    309 #endif // StyleProperties_h
  • trunk/Source/WebCore/css/StylePropertyShorthand.cpp

    r200043 r201113  
    2222#include "config.h"
    2323#include "StylePropertyShorthand.h"
    24 
    25 #include <wtf/StdLibExtras.h>
     24#include "StylePropertyShorthandFunctions.h"
    2625
    2726namespace WebCore {
  • trunk/Source/WebCore/css/StylePropertyShorthand.h

    r179227 r201113  
    2020 */
    2121
    22 #ifndef StylePropertyShorthand_h
    23 #define StylePropertyShorthand_h
     22#pragma once
    2423
    2524#include "CSSPropertyNames.h"
    26 #include "StylePropertyShorthandFunctions.h"
    2725#include <wtf/Vector.h>
    2826
     
    3129class StylePropertyShorthand {
    3230public:
    33     StylePropertyShorthand()
    34         : m_properties(0)
    35         , m_propertiesForInitialization(0)
    36         , m_length(0)
    37         , m_shorthandID(CSSPropertyInvalid)
    38     {
    39     }
     31    StylePropertyShorthand() = default;
    4032
    4133    template<unsigned numProperties>
     
    5446
    5547private:
    56     const CSSPropertyID* m_properties;
    57     const StylePropertyShorthand* m_propertiesForInitialization;
    58     unsigned m_length;
    59     CSSPropertyID m_shorthandID;
     48    const CSSPropertyID* m_properties { nullptr };
     49    const StylePropertyShorthand* m_propertiesForInitialization { nullptr };
     50    unsigned m_length { 0 };
     51    CSSPropertyID m_shorthandID { CSSPropertyInvalid };
    6052};
    6153
     
    7769
    7870} // namespace WebCore
    79 
    80 #endif // StylePropertyShorthand_h
  • trunk/Source/WebCore/css/StyleResolver.cpp

    r201086 r201113  
    304304
    305305// This is a simplified style setting function for keyframe styles
    306 void StyleResolver::addKeyframeStyle(PassRefPtr<StyleRuleKeyframes> rule)
     306void StyleResolver::addKeyframeStyle(RefPtr<StyleRuleKeyframes>&& rule)
    307307{
    308308    AtomicString s(rule->name());
    309     m_keyframesRuleMap.set(s.impl(), rule);
     309    m_keyframesRuleMap.set(s.impl(), WTFMove(rule));
    310310}
    311311
     
    16641664}
    16651665
    1666 PassRefPtr<StyleImage> StyleResolver::styleImage(CSSPropertyID property, CSSValue& value)
     1666RefPtr<StyleImage> StyleResolver::styleImage(CSSPropertyID property, CSSValue& value)
    16671667{
    16681668    if (is<CSSImageValue>(value))
     
    16941694}
    16951695
    1696 PassRefPtr<StyleImage> StyleResolver::generatedOrPendingFromValue(CSSPropertyID property, CSSImageGeneratorValue& value)
     1696Ref<StyleImage> StyleResolver::generatedOrPendingFromValue(CSSPropertyID property, CSSImageGeneratorValue& value)
    16971697{
    16981698    if (is<CSSFilterImageValue>(value)) {
     
    20842084}
    20852085
    2086 PassRefPtr<StyleImage> StyleResolver::loadPendingImage(const StylePendingImage& pendingImage, const ResourceLoaderOptions& options)
     2086RefPtr<StyleImage> StyleResolver::loadPendingImage(const StylePendingImage& pendingImage, const ResourceLoaderOptions& options)
    20872087{
    20882088    if (auto imageValue = pendingImage.cssImageValue())
     
    21052105}
    21062106
    2107 PassRefPtr<StyleImage> StyleResolver::loadPendingImage(const StylePendingImage& pendingImage)
     2107RefPtr<StyleImage> StyleResolver::loadPendingImage(const StylePendingImage& pendingImage)
    21082108{
    21092109    ResourceLoaderOptions options = CachedResourceLoader::defaultCachedResourceOptions();
  • trunk/Source/WebCore/css/StyleResolver.h

    r201073 r201113  
    2020 */
    2121
    22 #ifndef StyleResolver_h
    23 #define StyleResolver_h
     22#pragma once
    2423
    2524#include "CSSToLengthConversionData.h"
    2625#include "CSSToStyleMap.h"
    27 #include "CSSValueList.h"
    2826#include "DocumentRuleSets.h"
    2927#include "InspectorCSSOMWrappers.h"
    30 #include "LinkHash.h"
    3128#include "MediaQueryEvaluator.h"
    3229#include "RenderStyle.h"
    3330#include "RuleFeature.h"
    3431#include "RuleSet.h"
    35 #include "RuntimeEnabledFeatures.h"
    36 #include "ScrollTypes.h"
    3732#include "SelectorChecker.h"
    38 #include "StyleInheritedData.h"
    39 #include "StyleRelations.h"
    40 #include "ViewportStyleResolver.h"
    4133#include <bitset>
    4234#include <memory>
     
    214206    bool hasMediaQueriesAffectedByViewportChange() const;
    215207
    216     void addKeyframeStyle(PassRefPtr<StyleRuleKeyframes>);
     208    void addKeyframeStyle(RefPtr<StyleRuleKeyframes>&&);
    217209
    218210    bool checkRegionStyle(const Element* regionElement);
     
    464456    State& state() { return m_state; }
    465457
    466     PassRefPtr<StyleImage> styleImage(CSSPropertyID, CSSValue&);
     458    RefPtr<StyleImage> styleImage(CSSPropertyID, CSSValue&);
    467459    RefPtr<StyleImage> cachedOrPendingFromValue(CSSPropertyID, CSSImageValue&);
    468     PassRefPtr<StyleImage> generatedOrPendingFromValue(CSSPropertyID, CSSImageGeneratorValue&);
     460    Ref<StyleImage> generatedOrPendingFromValue(CSSPropertyID, CSSImageGeneratorValue&);
    469461#if ENABLE(CSS_IMAGE_SET)
    470462    RefPtr<StyleImage> setOrPendingFromValue(CSSPropertyID, CSSImageSetValue&);
     
    498490    void applySVGProperty(CSSPropertyID, CSSValue*);
    499491
    500     PassRefPtr<StyleImage> loadPendingImage(const StylePendingImage&, const ResourceLoaderOptions&);
    501     PassRefPtr<StyleImage> loadPendingImage(const StylePendingImage&);
     492    RefPtr<StyleImage> loadPendingImage(const StylePendingImage&, const ResourceLoaderOptions&);
     493    RefPtr<StyleImage> loadPendingImage(const StylePendingImage&);
    502494    void loadPendingImages();
    503495#if ENABLE(CSS_SHAPES)
     
    591583
    592584} // namespace WebCore
    593 
    594 #endif // StyleResolver_h
  • trunk/Source/WebCore/css/StyleSheetList.h

    r190280 r201113  
    1919 */
    2020
    21 #ifndef StyleSheetList_h
    22 #define StyleSheetList_h
     21#pragma once
    2322
    2423#include <wtf/Forward.h>
    2524#include <wtf/RefCounted.h>
    26 #include <wtf/PassRefPtr.h>
    2725#include <wtf/Vector.h>
    2826
     
    5755
    5856} // namespace WebCore
    59 
    60 #endif // StyleSheetList_h
  • trunk/Source/WebCore/css/WebKitCSSFilterValue.cpp

    r188315 r201113  
    2828
    2929#include "CSSValueList.h"
    30 #include <wtf/PassRefPtr.h>
    3130#include <wtf/text/WTFString.h>
    3231
  • trunk/Source/WebCore/css/WebKitCSSFilterValue.h

    r188315 r201113  
    2828
    2929#include "CSSValueList.h"
    30 #include <wtf/PassRefPtr.h>
    3130#include <wtf/RefPtr.h>
    3231
  • trunk/Source/WebCore/css/WebKitCSSTransformValue.cpp

    r188315 r201113  
    2828
    2929#include "CSSValueList.h"
    30 #include <wtf/PassRefPtr.h>
    3130#include <wtf/text/WTFString.h>
    3231
     
    3534// These names must be kept in sync with TransformOperationType.
    3635const char* const transformNamePrefixes[] = {
    37     0,
     36    nullptr,
    3837    "translate(",
    3938    "translateX(",
  • trunk/Source/WebCore/css/WebKitCSSTransformValue.h

    r188315 r201113  
    2424 */
    2525
    26 #ifndef WebKitCSSTransformValue_h
    27 #define WebKitCSSTransformValue_h
     26#pragma once
    2827
    2928#include "CSSValueList.h"
    30 #include <wtf/PassRefPtr.h>
    3129#include <wtf/RefPtr.h>
    3230
     
    8381
    8482SPECIALIZE_TYPE_TRAITS_CSS_VALUE(WebKitCSSTransformValue, isWebKitCSSTransformValue())
    85 
    86 #endif
  • trunk/Source/WebCore/rendering/shapes/Shape.cpp

    r194496 r201113  
    3232
    3333#include "BasicShapeFunctions.h"
     34#include "BasicShapes.h"
    3435#include "BoxShape.h"
    3536#include "GraphicsContext.h"
  • trunk/Source/WebKit2/ChangeLog

    r201110 r201113  
     12016-05-18  Alex Christensen  <achristensen@webkit.org>
     2
     3        Clean up CSS code
     4        https://bugs.webkit.org/show_bug.cgi?id=157808
     5
     6        Reviewed by Chris Dumez.
     7
     8        * UIProcess/Cocoa/WebViewImpl.mm:
     9
    1102016-05-18  Jer Noble  <jer.noble@apple.com>
    211
  • trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm

    r200624 r201113  
    9191#import <WebKitSystemInterface.h>
    9292#import <sys/stat.h>
     93#import <wtf/NeverDestroyed.h>
    9394
    9495#if USE(APPLE_INTERNAL_SDK)
Note: See TracChangeset for help on using the changeset viewer.