Ignore:
Timestamp:
Oct 1, 2013, 9:17:20 PM (12 years ago)
Author:
[email protected]
Message:

Generate toCSSFooValue for CSS child values
https://bugs.webkit.org/show_bug.cgi?id=122157

Reviewed by Darin Adler.

As a step to cleanup static_cast<> for CSSFooValue, this patch adds toCSSFooValue()
for "CSSAspectRatioValue, CSSBorderImageSliceValue, CSSFunctionValue, CSSInheritedValue,
CSSValueList, CSSVariableValue, and CSSFontFaceSrcValue".

To use CSS_VALUE_TYPE_CASTS, isFunctionValue(), isFontFaceSrcValue() are added to
generate toCSSFunctionValue, toCSSFontFaceSrcValue().

No new tests, no behavior changes.

  • css/CSSAspectRatioValue.h:
  • css/CSSBorderImageSliceValue.h:
  • css/CSSFontFaceSrcValue.h:
  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::addFontFaceRule):

  • css/CSSFunctionValue.h:
  • css/CSSInheritedValue.h:
  • css/CSSParser.cpp:

(WebCore::filterProperties):
(WebCore::CSSParser::addFillValue):
(WebCore::CSSParser::addAnimationValue):
(WebCore::CSSParser::createFontFaceRule):

  • css/CSSProperty.cpp:

(WebCore::CSSProperty::wrapValueInCommaSeparatedList):

  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::mapNinePieceImage):
(WebCore::CSSToStyleMap::mapNinePieceImageSlice):

  • css/CSSValue.cpp:

(WebCore::CSSValue::destroy):

  • css/CSSValue.h:

(WebCore::CSSValue::isFunctionValue):
(WebCore::CSSValue::isFontFaceSrcValue):

  • css/CSSValueList.h:

(WebCore::CSSValueListInspector::CSSValueListInspector):

  • css/CSSVariableValue.h:
  • css/DeprecatedStyleBuilder.cpp:

(WebCore::ApplyPropertyFillLayer::applyValue):
(WebCore::ApplyPropertyFontVariantLigatures::applyValue):
(WebCore::ApplyPropertyCounter::applyValue):
(WebCore::ApplyPropertyCursor::applyValue):
(WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
(WebCore::ApplyPropertyAspectRatio::applyValue):
(WebCore::ApplyPropertyImageResolution::applyValue):
(WebCore::ApplyPropertyTextIndent::applyValue):

  • css/MediaQueryEvaluator.cpp:

(WebCore::compareAspectRatioValue):

  • css/SVGCSSStyleSelector.cpp:

(WebCore::StyleResolver::applySVGProperty):

  • css/StylePropertySet.cpp:

(WebCore::StylePropertySet::getLayeredShorthandValue):

  • css/StyleResolver.cpp:

(WebCore::createGridPosition):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::parseCustomFilterParameter):
(WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):

  • editing/EditingStyle.cpp:

(WebCore::HTMLTextDecorationEquivalent::valueIsPresentInStyle):
(WebCore::EditingStyle::mergeStyle):
(WebCore::StyleChange::extractTextStyles):
(WebCore::diffTextDecorations):

  • editing/EditorCommand.cpp:

(WebCore::executeToggleStyleInList):

  • svg/SVGFontFaceElement.cpp:

(WebCore::SVGFontFaceElement::rebuildFontFace):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/CSSValue.cpp

    r156705 r156760  
    384384    switch (classType()) {
    385385    case AspectRatioClass:
    386         delete static_cast<CSSAspectRatioValue*>(this);
     386        delete toCSSAspectRatioValue(this);
    387387        return;
    388388    case BorderImageSliceClass:
    389         delete static_cast<CSSBorderImageSliceValue*>(this);
     389        delete toCSSBorderImageSliceValue(this);
    390390        return;
    391391    case CanvasClass:
     
    399399        return;
    400400    case FontFaceSrcClass:
    401         delete static_cast<CSSFontFaceSrcValue*>(this);
     401        delete toCSSFontFaceSrcValue(this);
    402402        return;
    403403    case FontFeatureClass:
     
    405405        return;
    406406    case FunctionClass:
    407         delete static_cast<CSSFunctionValue*>(this);
     407        delete toCSSFunctionValue(this);
    408408        return;
    409409    case LinearGradientClass:
     
    420420        return;
    421421    case InheritedClass:
    422         delete static_cast<CSSInheritedValue*>(this);
     422        delete toCSSInheritedValue(this);
    423423        return;
    424424    case InitialClass:
     
    444444        return;
    445445    case ValueListClass:
    446         delete static_cast<CSSValueList*>(this);
     446        delete toCSSValueList(this);
    447447        return;
    448448    case WebKitCSSTransformClass:
     
    484484#if ENABLE(CSS_VARIABLES)
    485485    case VariableClass:
    486         delete static_cast<CSSVariableValue*>(this);
     486        delete toCSSVariableValue(this);
    487487        return;
    488488#endif
Note: See TracChangeset for help on using the changeset viewer.