Ignore:
Timestamp:
Sep 22, 2013, 6:20:19 PM (12 years ago)
Author:
[email protected]
Message:

Introduce CSS_VALUE_TYPE_CASTS macro in order to cast CSSValue type
https://bugs.webkit.org/show_bug.cgi?id=121462

Reviewed by Andreas Kling.

As r155429 introduced ELEMENT_TYPE_CASTS, CSS_VALUE_TYPE_CASTS can be used
by css value type casting as well. This type cast macros will help to detect
bad-cast bugs as well as improve a code readibility.

This patch adds the following methods,

  • CSSFooValue* toCSSFooValue(CSSValue*)
  • const CSSFooValue* toCSSFooValue(const CSSValue*)

To be consistent with other is*Value() naming style, isCSSLineBoxContainValue() and isCalculationValue()
are changed with isLineBoxContainValue() and isCalcValue().

FontValue, FontFeatureValue, ShadowValue have a manual type case function because of different
class naming style. So, toFontValue(), toFontFeatureValue() and toShadowValue() are added manually.

This patch removes unnecessary local variables.

No new tests, no behavior change.

  • css/CSSAspectRatioValue.h:
  • css/CSSBorderImageSliceValue.h:
  • css/CSSCalculationValue.cpp:

(WebCore::CSSCalcExpressionNodeParser::parseValue):

  • css/CSSCalculationValue.h:
  • css/CSSCrossfadeValue.cpp:

(WebCore::subimageKnownToBeOpaque):

  • css/CSSCrossfadeValue.h:
  • css/CSSCursorImageValue.cpp:

(WebCore::CSSCursorImageValue::~CSSCursorImageValue):
(WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
(WebCore::CSSCursorImageValue::cachedImage):
(WebCore::CSSCursorImageValue::cachedOrPendingImage):
(WebCore::CSSCursorImageValue::isSVGCursor):

  • css/CSSCursorImageValue.h:
  • css/CSSFilterImageValue.h:
  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::addFontFaceRule):

  • css/CSSGradientValue.h:
  • css/CSSImageGeneratorValue.cpp:

(WebCore::CSSImageGeneratorValue::image):
(WebCore::CSSImageGeneratorValue::fixedSize):
(WebCore::CSSImageGeneratorValue::loadSubimages):
(WebCore::CSSImageGeneratorValue::subimageIsPending):
(WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):

  • css/CSSImageGeneratorValue.h:
  • css/CSSImageSetValue.cpp:

(WebCore::CSSImageSetValue::fillImageSet):

  • css/CSSImageSetValue.h:
  • css/CSSImageValue.h:
  • css/CSSInheritedValue.h:
  • css/CSSInitialValue.h:
  • css/CSSLineBoxContainValue.h:
  • css/CSSParser.cpp:

(WebCore::CSSParser::parseColor):
(WebCore::CSSParser::addProperty):
(WebCore::CSSParser::parse3ValuesFillPosition):
(WebCore::CSSParser::parseFillPosition):
(WebCore::CSSParser::parseFillRepeat):
(WebCore::CSSParser::parseDeprecatedRadialGradient):
(WebCore::CSSParser::parseRadialGradient):

  • css/CSSPrimitiveValue.h:
  • css/CSSReflectValue.h:
  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::mapFillAttachment):
(WebCore::CSSToStyleMap::mapFillClip):
(WebCore::CSSToStyleMap::mapFillComposite):
(WebCore::CSSToStyleMap::mapFillBlendMode):
(WebCore::CSSToStyleMap::mapFillOrigin):
(WebCore::CSSToStyleMap::mapFillRepeatX):
(WebCore::CSSToStyleMap::mapFillRepeatY):
(WebCore::CSSToStyleMap::mapFillSize):
(WebCore::CSSToStyleMap::mapFillXPosition):
(WebCore::CSSToStyleMap::mapFillYPosition):
(WebCore::CSSToStyleMap::mapFillMaskSourceType):
(WebCore::CSSToStyleMap::mapAnimationDelay):
(WebCore::CSSToStyleMap::mapAnimationDirection):
(WebCore::CSSToStyleMap::mapAnimationDuration):
(WebCore::CSSToStyleMap::mapAnimationFillMode):
(WebCore::CSSToStyleMap::mapAnimationIterationCount):
(WebCore::CSSToStyleMap::mapAnimationName):
(WebCore::CSSToStyleMap::mapAnimationPlayState):
(WebCore::CSSToStyleMap::mapAnimationProperty):
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
(WebCore::CSSToStyleMap::mapNinePieceImageSlice):
(WebCore::CSSToStyleMap::mapNinePieceImageQuad):
(WebCore::CSSToStyleMap::mapNinePieceImageRepeat):

  • css/CSSValue.cpp:

(WebCore::CSSValue::destroy):

  • css/CSSValue.h:

(WebCore::CSSValue::isLineBoxContainValue):
(WebCore::CSSValue::isCalcValue):

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

(WebCore::ApplyPropertyDefault::applyValue):
(WebCore::ApplyPropertyNumber::applyValue):
(WebCore::ApplyPropertyAuto::applyValue):
(WebCore::ApplyPropertyClip::applyValue):
(WebCore::ApplyPropertyColor::applyValue):
(WebCore::ApplyPropertyLength::applyValue):
(WebCore::ApplyPropertyString::applyValue):
(WebCore::ApplyPropertyBorderRadius::applyValue):
(WebCore::ApplyPropertyComputeLength::applyValue):
(WebCore::ApplyPropertyFont::applyValue):
(WebCore::ApplyPropertyFontFamily::applyValue):
(WebCore::ApplyPropertyFontSize::applyValue):
(WebCore::ApplyPropertyFontWeight::applyValue):
(WebCore::ApplyPropertyFontVariantLigatures::applyValue):
(WebCore::ApplyPropertyCounter::applyValue):
(WebCore::ApplyPropertyCursor::applyValue):
(WebCore::ApplyPropertyTextAlign::applyValue):
(WebCore::ApplyPropertyTextDecoration::applyValue):
(WebCore::ApplyPropertyMarqueeIncrement::applyValue):
(WebCore::ApplyPropertyMarqueeRepetition::applyValue):
(WebCore::ApplyPropertyMarqueeSpeed::applyValue):
(WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
(WebCore::ApplyPropertyLineHeight::applyValue):
(WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue):
(WebCore::ApplyPropertyPageSize::applyValue):
(WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
(WebCore::ApplyPropertyResize::applyValue):
(WebCore::ApplyPropertyVerticalAlign::applyValue):
(WebCore::ApplyPropertyAspectRatio::applyValue):
(WebCore::ApplyPropertyZoom::applyValue):
(WebCore::ApplyPropertyDisplay::applyValue):
(WebCore::ApplyPropertyClipPath::applyValue):
(WebCore::ApplyPropertyShape::applyValue):
(WebCore::ApplyPropertyImageResolution::applyValue):
(WebCore::ApplyPropertyTextIndent::applyValue):

  • css/FontFeatureValue.h:

(WebCore::toFontFeatureValue):

  • css/FontValue.h:

(WebCore::toFontValue):

  • css/MediaList.cpp:

(WebCore::reportMediaQueryWarningIfNeeded):

  • css/MediaQueryEvaluator.cpp:

(WebCore::compareAspectRatioValue):
(WebCore::numberValue):
(WebCore::orientationMediaFeatureEval):
(WebCore::evalResolution):
(WebCore::device_pixel_ratioMediaFeatureEval):
(WebCore::resolutionMediaFeatureEval):
(WebCore::computeLength):
(WebCore::view_modeMediaFeatureEval):
(WebCore::pointerMediaFeatureEval):

  • css/SVGCSSStyleSelector.cpp:

(WebCore::StyleResolver::applySVGProperty):

  • css/ShadowValue.h:

(WebCore::toShadowValue):

  • css/StylePropertySet.cpp:

(WebCore::StylePropertySet::getLayeredShorthandValue):

  • css/StyleResolver.cpp:

(WebCore::createGridTrackSize):
(WebCore::createGridTrackList):
(WebCore::createGridPosition):
(WebCore::hasVariableReference):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::styleImage):
(WebCore::StyleResolver::generatedOrPendingFromValue):
(WebCore::StyleResolver::styleShader):
(WebCore::StyleResolver::parseCustomFilterArrayParameter):
(WebCore::StyleResolver::parseCustomFilterColorParameter):
(WebCore::StyleResolver::parseCustomFilterNumberParameter):
(WebCore::StyleResolver::parseCustomFilterParameter):
(WebCore::StyleResolver::parseCustomFilterParameterList):
(WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
(WebCore::StyleResolver::createFilterOperations):

  • css/TransformFunctions.cpp:

(WebCore::transformsForValue):

  • css/ViewportStyleResolver.cpp:

(WebCore::ViewportStyleResolver::getViewportArgumentValue):

  • css/WebKitCSSMatrix.cpp:

(WebCore::WebKitCSSMatrix::setMatrixValue):

  • css/WebKitCSSShaderValue.h:

(WebCore::toWebKitCSSShaderValue):

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::computedFontSize):

  • editing/EditingStyle.cpp:

(WebCore::identifierForStyleProperty):
(WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
(WebCore::cssValueToRGBA):
(WebCore::EditingStyle::extractFontSizeDelta):
(WebCore::EditingStyle::textDirection):
(WebCore::EditingStyle::prepareToApplyAt):
(WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
(WebCore::EditingStyle::legacyFontSize):
(WebCore::EditingStyle::textDirectionForSelection):
(WebCore::StyleChange::extractTextStyles):
(WebCore::fontWeightIsBold):
(WebCore::isTransparentColorValue):

  • editing/markup.cpp:

(WebCore::propertyMissingOrEqualToNone):

  • page/PageSerializer.cpp:

(WebCore::PageSerializer::retrieveResourcesForProperties):

  • rendering/style/StylePendingImage.h:

(WebCore::StylePendingImage::data):
(WebCore::StylePendingImage::cssImageValue):
(WebCore::StylePendingImage::cssImageGeneratorValue):
(WebCore::StylePendingImage::cssCursorImageValue):
(WebCore::StylePendingImage::cssImageSetValue):

File:
1 edited

Legend:

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

    r156132 r156253  
    151151    {
    152152        if (value->isPrimitiveValue())
    153             setValue(styleResolver->style(), *static_cast<CSSPrimitiveValue*>(value));
     153            setValue(styleResolver->style(), *toCSSPrimitiveValue(value));
    154154    }
    155155    static PropertyHandler createHandler()
     
    169169            return;
    170170
    171         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     171        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    172172        if (primitiveValue->getValueID() == idMapsToMinusOne)
    173173            setValue(styleResolver->style(), -1);
     
    217217            return;
    218218
    219         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     219        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    220220        if (primitiveValue->getValueID() == autoIdentity)
    221221            setAuto(styleResolver->style());
     
    256256            return;
    257257
    258         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     258        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    259259
    260260        if (Rect* rect = primitiveValue->getRectValue()) {
     
    302302            return;
    303303
    304         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     304        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    305305        if (inheritColorFromParent && primitiveValue->getValueID() == CSSValueCurrentcolor)
    306306            applyInheritValue(propertyID, styleResolver);
     
    363363            return;
    364364
    365         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     365        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    366366        if (noneEnabled && primitiveValue->getValueID() == CSSValueNone) {
    367367            if (noneUndefined)
     
    417417        if (!value->isPrimitiveValue())
    418418            return;
    419         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     419        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    420420        if ((identBehavior == MapNoneToNull && primitiveValue->getValueID() == CSSValueNone)
    421421            || (identBehavior == MapAutoToNull && primitiveValue->getValueID() == CSSValueAuto))
     
    440440            return;
    441441
    442         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
    443         Pair* pair = primitiveValue->getPairValue();
     442        Pair* pair = toCSSPrimitiveValue(value)->getPairValue();
    444443        if (!pair || !pair->first() || !pair->second())
    445444            return;
     
    603602            return;
    604603
    605         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     604        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    606605
    607606        CSSValueID ident = primitiveValue->getValueID();
     
    673672        if (!value->isPrimitiveValue())
    674673            return;
    675         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
    676674        FontDescription fontDescription = styleResolver->fontDescription();
    677         (fontDescription.*setterFunction)(*primitiveValue);
     675        (fontDescription.*setterFunction)(*toCSSPrimitiveValue(value));
    678676        styleResolver->setFontDescription(fontDescription);
    679677    }
     
    727725            if (!item->isPrimitiveValue())
    728726                continue;
    729             CSSPrimitiveValue* contentValue = static_cast<CSSPrimitiveValue*>(item);
     727            CSSPrimitiveValue* contentValue = toCSSPrimitiveValue(item);
    730728            AtomicString face;
    731729            if (contentValue->isString())
     
    837835            return;
    838836
    839         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     837        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    840838
    841839        FontDescription fontDescription = styleResolver->style()->fontDescription();
     
    850848        }
    851849
    852         if (CSSValueID ident = primitiveValue->getValueID()) {
     850        if (CSSValueID ident = toCSSPrimitiveValue(value)->getValueID()) {
    853851            // Keywords are being used.
    854852            switch (ident) {
     
    911909        if (!value->isPrimitiveValue())
    912910            return;
    913         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     911        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    914912        FontDescription fontDescription = styleResolver->fontDescription();
    915913        switch (primitiveValue->getValueID()) {
     
    972970                ASSERT(item->isPrimitiveValue());
    973971                if (item->isPrimitiveValue()) {
    974                     CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(item);
    975                     switch (primitiveValue->getValueID()) {
     972                    switch (toCSSPrimitiveValue(item)->getValueID()) {
    976973                    case CSSValueNoCommonLigatures:
    977974                        commonLigaturesState = FontDescription::DisabledLigaturesState;
     
    1002999        else {
    10031000            ASSERT_WITH_SECURITY_IMPLICATION(value->isPrimitiveValue());
    1004             ASSERT(static_cast<CSSPrimitiveValue*>(value)->getValueID() == CSSValueNormal);
     1001            ASSERT(toCSSPrimitiveValue(value)->getValueID() == CSSValueNormal);
    10051002        }
    10061003#endif
     
    11501147    static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
    11511148    {
    1152         bool setCounterIncrementToNone = counterBehavior == Increment && value->isPrimitiveValue() && static_cast<CSSPrimitiveValue*>(value)->getValueID() == CSSValueNone;
     1149        bool setCounterIncrementToNone = counterBehavior == Increment && value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueNone;
    11531150
    11541151        if (!value->isValueList() && !setCounterIncrementToNone)
     
    11751172                continue;
    11761173
    1177             Pair* pair = static_cast<CSSPrimitiveValue*>(currValue)->getPairValue();
     1174            Pair* pair = toCSSPrimitiveValue(currValue)->getPairValue();
    11781175            if (!pair || !pair->first() || !pair->second())
    11791176                continue;
     
    12171214                CSSValue* item = list->itemWithoutBoundsCheck(i);
    12181215                if (item->isCursorImageValue()) {
    1219                     CSSCursorImageValue* image = static_cast<CSSCursorImageValue*>(item);
     1216                    CSSCursorImageValue* image = toCSSCursorImageValue(item);
    12201217                    if (image->updateIfSVGCursorIsUsed(styleResolver->element())) // Elements with SVG cursors are not allowed to share style.
    12211218                        styleResolver->style()->setUnique();
    12221219                    styleResolver->style()->addCursor(styleResolver->styleImage(CSSPropertyCursor, image), image->hotSpot());
    12231220                } else if (item->isPrimitiveValue()) {
    1224                     CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(item);
     1221                    CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(item);
    12251222                    if (primitiveValue->isValueID())
    12261223                        styleResolver->style()->setCursor(*primitiveValue);
     
    12281225            }
    12291226        } else if (value->isPrimitiveValue()) {
    1230             CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     1227            CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    12311228            if (primitiveValue->isValueID() && styleResolver->style()->cursor() != ECursor(*primitiveValue))
    12321229                styleResolver->style()->setCursor(*primitiveValue);
     
    12441241            return;
    12451242
    1246         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     1243        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    12471244        ASSERT(primitiveValue->isValueID());
    12481245
     
    12711268            CSSValue* item = i.value();
    12721269            ASSERT_WITH_SECURITY_IMPLICATION(item->isPrimitiveValue());
    1273             t |= *static_cast<CSSPrimitiveValue*>(item);
     1270            t |= *toCSSPrimitiveValue(item);
    12741271        }
    12751272        styleResolver->style()->setTextDecoration(t);
     
    12891286            return;
    12901287
    1291         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     1288        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    12921289        if (primitiveValue->getValueID()) {
    12931290            switch (primitiveValue->getValueID()) {
     
    13241321            return;
    13251322
    1326         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     1323        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    13271324        if (primitiveValue->getValueID() == CSSValueInfinite)
    13281325            styleResolver->style()->setMarqueeLoopCount(-1); // -1 means repeat forever.
     
    13441341            return;
    13451342
    1346         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     1343        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    13471344        if (CSSValueID ident = primitiveValue->getValueID()) {
    13481345            switch (ident) {
     
    13781375        // This is true if value is 'auto' or 'alphabetic'.
    13791376        if (value->isPrimitiveValue()) {
    1380             TextUnderlinePosition t = *static_cast<CSSPrimitiveValue*>(value);
     1377            TextUnderlinePosition t = *toCSSPrimitiveValue(value);
    13811378            styleResolver->style()->setTextUnderlinePosition(t);
    13821379            return;
     
    14071404            return;
    14081405
    1409         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     1406        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    14101407        Length lineHeight;
    14111408
     
    14451442            return;
    14461443
    1447         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     1444        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    14481445        Length lineHeight;
    14491446
     
    15871584            if (!inspector.first()->isPrimitiveValue() || !inspector.second()->isPrimitiveValue())
    15881585                return;
    1589             CSSPrimitiveValue* first = static_cast<CSSPrimitiveValue*>(inspector.first());
    1590             CSSPrimitiveValue* second = static_cast<CSSPrimitiveValue*>(inspector.second());
     1586            CSSPrimitiveValue* first = toCSSPrimitiveValue(inspector.first());
     1587            CSSPrimitiveValue* second = toCSSPrimitiveValue(inspector.second());
    15911588            if (first->isLength()) {
    15921589                // <length>{2}
     
    16081605            if (!inspector.first()->isPrimitiveValue())
    16091606                return;
    1610             CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(inspector.first());
     1607            CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(inspector.first());
    16111608            if (primitiveValue->isLength()) {
    16121609                // <length>
     
    16721669                    continue;
    16731670
    1674                 CSSPrimitiveValue* value = static_cast<CSSPrimitiveValue*>(item);
     1671                CSSPrimitiveValue* value = toCSSPrimitiveValue(item);
    16751672                if (value->getValueID() == CSSValueFilled || value->getValueID() == CSSValueOpen)
    16761673                    styleResolver->style()->setTextEmphasisFill(*value);
     
    16841681        if (!value->isPrimitiveValue())
    16851682            return;
    1686         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     1683        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    16871684
    16881685        if (primitiveValue->isString()) {
     
    18131810            return;
    18141811
    1815         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     1812        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    18161813
    18171814        EResize r = RESIZE_NONE;
     
    18431840            return;
    18441841
    1845         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     1842        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    18461843
    18471844        if (primitiveValue->getValueID())
     
    18821879            return;
    18831880        }
    1884         CSSAspectRatioValue* aspectRatioValue = static_cast<CSSAspectRatioValue*>(value);
     1881        CSSAspectRatioValue* aspectRatioValue = toCSSAspectRatioValue(value);
    18851882        styleResolver->style()->setHasAspectRatio(true);
    18861883        styleResolver->style()->setAspectRatioDenominator(aspectRatioValue->denominatorValue());
     
    19181915    {
    19191916        ASSERT_WITH_SECURITY_IMPLICATION(value->isPrimitiveValue());
    1920         CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     1917        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    19211918
    19221919        if (primitiveValue->getValueID() == CSSValueNormal) {
     
    19791976            return;
    19801977
    1981         EDisplay display = *static_cast<CSSPrimitiveValue*>(value);
     1978        EDisplay display = *toCSSPrimitiveValue(value);
    19821979
    19831980        if (!isValidDisplayValue(styleResolver, display))
     
    20001997    {
    20011998        if (value->isPrimitiveValue()) {
    2002             CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     1999            CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    20032000            if (primitiveValue->getValueID() == CSSValueNone)
    20042001                setValue(styleResolver->style(), 0);
     
    20312028    {
    20322029        if (value->isPrimitiveValue()) {
    2033             CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
     2030            CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
    20342031            if (primitiveValue->getValueID() == CSSValueAuto)
    20352032                setValue(styleResolver->style(), 0);
     
    20842081            if (!item->isPrimitiveValue())
    20852082                continue;
    2086             CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(item);
     2083            CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(item);
    20872084            if (primitiveValue->getValueID() == CSSValueFromImage)
    20882085                source = ImageResolutionFromImage;
     
    21402137                continue;
    21412138
    2142             CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(item);
     2139            CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(item);
    21432140            if (!primitiveValue->getValueID())
    21442141                lengthOrPercentageValue = primitiveValue->convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion | ViewportPercentageConversion>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom());
Note: See TracChangeset for help on using the changeset viewer.