<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[174300] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/174300">174300</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2014-10-03 16:17:00 -0700 (Fri, 03 Oct 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Use is<>() / downcast<>() for CSSValue subclasses
https://bugs.webkit.org/show_bug.cgi?id=137381
Reviewed by Benjamin Poulain.
Use is<>() / downcast<>() for CSSValue subclasses.
No new tests, no behavior change.
* css/CSSAspectRatioValue.h:
* css/CSSBorderImageSliceValue.h:
* css/CSSCalculationValue.cpp:
(WebCore::CSSCalcExpressionNodeParser::parseValue):
* css/CSSCalculationValue.h:
* css/CSSCanvasValue.h:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::getBorderRadiusShorthandValue):
(WebCore::ComputedStyleExtractor::propertyMatches):
* 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/CSSFontFaceSrcValue.h:
* css/CSSFontFeatureValue.h:
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule):
* css/CSSFontValue.h:
* css/CSSFunctionValue.h:
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::image):
(WebCore::CSSGradientValue::gradientWithStylesResolved):
* css/CSSGradientValue.h:
* css/CSSGridLineNamesValue.h:
* css/CSSGridTemplateAreasValue.h:
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::image):
(WebCore::CSSImageGeneratorValue::isFixedSize):
(WebCore::CSSImageGeneratorValue::fixedSize):
(WebCore::CSSImageGeneratorValue::isPending):
(WebCore::CSSImageGeneratorValue::knownToBeOpaque):
(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::addFillValue):
(WebCore::CSSParser::addAnimationValue):
(WebCore::CSSParser::parse3ValuesFillPosition):
(WebCore::CSSParser::parseFillPosition):
(WebCore::CSSParser::parseFillRepeat):
(WebCore::gridMissingGridPositionValue):
(WebCore::CSSParser::parseGridTemplateRowsAndAreas):
(WebCore::CSSParser::parseBasicShapeCircle):
(WebCore::CSSParser::parseBasicShapeEllipse):
(WebCore::CSSParser::parseDeprecatedGradient):
(WebCore::CSSParser::parseDeprecatedRadialGradient):
(WebCore::CSSParser::parseRadialGradient):
(WebCore::CSSParser::createFontFaceRule):
* css/CSSPrimitiveValue.h:
* css/CSSReflectValue.h:
* css/CSSShadowValue.h:
* css/CSSTimingFunctionValue.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::mapNinePieceImage):
(WebCore::CSSToStyleMap::mapNinePieceImageSlice):
(WebCore::CSSToStyleMap::mapNinePieceImageQuad):
(WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
* css/CSSUnicodeRangeValue.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::isImplicitInitialValue):
(WebCore::CSSValue::addSubresourceStyleURLs):
(WebCore::CSSValue::hasFailedOrCanceledSubresources):
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
(WebCore::CSSValue::cloneForCSSOM):
* css/CSSValue.h:
* css/CSSValueList.h:
(WebCore::CSSValueListInspector::CSSValueListInspector):
* 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::ApplyPropertyFillLayer::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::ApplyPropertyTextDecorationSkip::applyValue):
(WebCore::ApplyPropertyMarqueeIncrement::applyValue):
(WebCore::ApplyPropertyMarqueeRepetition::applyValue):
(WebCore::ApplyPropertyMarqueeSpeed::applyValue):
(WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
(WebCore::ApplyPropertyLineHeight::applyValue):
(WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue):
(WebCore::ApplyPropertyWordSpacing::applyValue):
(WebCore::ApplyPropertyPageSize::applyValue):
(WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
(WebCore::ApplyPropertyTextEmphasisPosition::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/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/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::strokeDashArrayToCSSValueList):
(WebCore::ComputedStyleExtractor::svgPropertyValue):
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/SourceSizeList.cpp:
(WebCore::computeLength):
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getLayeredShorthandValue):
* css/StyleResolver.cpp:
(WebCore::extractDirectionAndWritingMode):
(WebCore::createGridTrackSize):
(WebCore::createGridTrackList):
(WebCore::createGridPosition):
(WebCore::StyleResolver::parseSnapCoordinate):
(WebCore::StyleResolver::parseSnapPoints):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::styleImage):
(WebCore::StyleResolver::generatedOrPendingFromValue):
(WebCore::StyleResolver::createFilterOperations):
* css/TransformFunctions.cpp:
(WebCore::transformsForValue):
* css/ViewportStyleResolver.cpp:
(WebCore::ViewportStyleResolver::getViewportArgumentValue):
* css/WebKitCSSFilterValue.h:
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::setMatrixValue):
* css/WebKitCSSTransformValue.h:
(WebCore::toWebKitCSSTransformValue): Deleted.
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::computedFontSize):
* editing/EditingStyle.cpp:
(WebCore::identifierForStyleProperty):
(WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
(WebCore::HTMLTextDecorationEquivalent::valueIsPresentInStyle):
(WebCore::cssValueToRGBA):
(WebCore::EditingStyle::extractFontSizeDelta):
(WebCore::EditingStyle::textDirection):
(WebCore::EditingStyle::prepareToApplyAt):
(WebCore::EditingStyle::mergeStyle):
(WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
(WebCore::EditingStyle::legacyFontSize):
(WebCore::EditingStyle::textDirectionForSelection):
(WebCore::StyleChange::extractTextStyles):
(WebCore::diffTextDecorations):
(WebCore::fontWeightIsBold):
(WebCore::isTransparentColorValue):
* editing/EditorCommand.cpp:
(WebCore::executeToggleStyleInList):
* editing/cocoa/HTMLConverter.mm:
(stringFromCSSValue):
(HTMLConverterCaches::floatPropertyValueForNode):
(HTMLConverterCaches::colorPropertyValueForNode):
* editing/markup.cpp:
(WebCore::propertyMissingOrEqualToNone):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::retrieveResourcesForProperties):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::adjustInnerTextStyle):
* rendering/style/StylePendingImage.h:
(WebCore::StylePendingImage::cssImageValue):
(WebCore::StylePendingImage::cssCursorImageValue):
(WebCore::StylePendingImage::cssImageSetValue):
* svg/SVGColor.h:
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::rebuildFontFace):
* svg/SVGPaint.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSAspectRatioValueh">trunk/Source/WebCore/css/CSSAspectRatioValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSBorderImageSliceValueh">trunk/Source/WebCore/css/CSSBorderImageSliceValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSCalculationValuecpp">trunk/Source/WebCore/css/CSSCalculationValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSCalculationValueh">trunk/Source/WebCore/css/CSSCalculationValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSCanvasValueh">trunk/Source/WebCore/css/CSSCanvasValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSCrossfadeValuecpp">trunk/Source/WebCore/css/CSSCrossfadeValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSCrossfadeValueh">trunk/Source/WebCore/css/CSSCrossfadeValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSCursorImageValuecpp">trunk/Source/WebCore/css/CSSCursorImageValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSCursorImageValueh">trunk/Source/WebCore/css/CSSCursorImageValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSFilterImageValueh">trunk/Source/WebCore/css/CSSFilterImageValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFaceSrcValueh">trunk/Source/WebCore/css/CSSFontFaceSrcValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFeatureValueh">trunk/Source/WebCore/css/CSSFontFeatureValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontSelectorcpp">trunk/Source/WebCore/css/CSSFontSelector.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontValueh">trunk/Source/WebCore/css/CSSFontValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSFunctionValueh">trunk/Source/WebCore/css/CSSFunctionValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSGradientValuecpp">trunk/Source/WebCore/css/CSSGradientValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSGradientValueh">trunk/Source/WebCore/css/CSSGradientValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSGridLineNamesValueh">trunk/Source/WebCore/css/CSSGridLineNamesValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSGridTemplateAreasValueh">trunk/Source/WebCore/css/CSSGridTemplateAreasValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSImageGeneratorValuecpp">trunk/Source/WebCore/css/CSSImageGeneratorValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSImageGeneratorValueh">trunk/Source/WebCore/css/CSSImageGeneratorValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSImageSetValuecpp">trunk/Source/WebCore/css/CSSImageSetValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSImageSetValueh">trunk/Source/WebCore/css/CSSImageSetValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSImageValueh">trunk/Source/WebCore/css/CSSImageValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSInheritedValueh">trunk/Source/WebCore/css/CSSInheritedValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSInitialValueh">trunk/Source/WebCore/css/CSSInitialValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSLineBoxContainValueh">trunk/Source/WebCore/css/CSSLineBoxContainValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValueh">trunk/Source/WebCore/css/CSSPrimitiveValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSReflectValueh">trunk/Source/WebCore/css/CSSReflectValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSShadowValueh">trunk/Source/WebCore/css/CSSShadowValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSTimingFunctionValueh">trunk/Source/WebCore/css/CSSTimingFunctionValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSToStyleMapcpp">trunk/Source/WebCore/css/CSSToStyleMap.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSUnicodeRangeValueh">trunk/Source/WebCore/css/CSSUnicodeRangeValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSValuecpp">trunk/Source/WebCore/css/CSSValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueh">trunk/Source/WebCore/css/CSSValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueListh">trunk/Source/WebCore/css/CSSValueList.h</a></li>
<li><a href="#trunkSourceWebCorecssDeprecatedStyleBuildercpp">trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCorecssMediaListcpp">trunk/Source/WebCore/css/MediaList.cpp</a></li>
<li><a href="#trunkSourceWebCorecssMediaQueryEvaluatorcpp">trunk/Source/WebCore/css/MediaQueryEvaluator.cpp</a></li>
<li><a href="#trunkSourceWebCorecssSVGCSSStyleSelectorcpp">trunk/Source/WebCore/css/SVGCSSStyleSelector.cpp</a></li>
<li><a href="#trunkSourceWebCorecssSourceSizeListcpp">trunk/Source/WebCore/css/SourceSizeList.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStylePropertiescpp">trunk/Source/WebCore/css/StyleProperties.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolvercpp">trunk/Source/WebCore/css/StyleResolver.cpp</a></li>
<li><a href="#trunkSourceWebCorecssTransformFunctionscpp">trunk/Source/WebCore/css/TransformFunctions.cpp</a></li>
<li><a href="#trunkSourceWebCorecssViewportStyleResolvercpp">trunk/Source/WebCore/css/ViewportStyleResolver.cpp</a></li>
<li><a href="#trunkSourceWebCorecssWebKitCSSFilterValueh">trunk/Source/WebCore/css/WebKitCSSFilterValue.h</a></li>
<li><a href="#trunkSourceWebCorecssWebKitCSSMatrixcpp">trunk/Source/WebCore/css/WebKitCSSMatrix.cpp</a></li>
<li><a href="#trunkSourceWebCorecssWebKitCSSTransformValueh">trunk/Source/WebCore/css/WebKitCSSTransformValue.h</a></li>
<li><a href="#trunkSourceWebCoreeditingApplyStyleCommandcpp">trunk/Source/WebCore/editing/ApplyStyleCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditingStylecpp">trunk/Source/WebCore/editing/EditingStyle.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorCommandcpp">trunk/Source/WebCore/editing/EditorCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingcocoaHTMLConvertermm">trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm</a></li>
<li><a href="#trunkSourceWebCoreeditingmarkupcpp">trunk/Source/WebCore/editing/markup.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageSerializercpp">trunk/Source/WebCore/page/PageSerializer.cpp</a></li>
<li><a href="#trunkSourceWebCorepageanimationCSSPropertyAnimationcpp">trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTextControlcpp">trunk/Source/WebCore/rendering/RenderTextControl.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStylePendingImageh">trunk/Source/WebCore/rendering/style/StylePendingImage.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGColorh">trunk/Source/WebCore/svg/SVGColor.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFontFaceElementcpp">trunk/Source/WebCore/svg/SVGFontFaceElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGPainth">trunk/Source/WebCore/svg/SVGPaint.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/ChangeLog        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -1,3 +1,241 @@
</span><ins>+2014-10-03 Christophe Dumez <cdumez@apple.com>
+
+ Use is<>() / downcast<>() for CSSValue subclasses
+ https://bugs.webkit.org/show_bug.cgi?id=137381
+
+ Reviewed by Benjamin Poulain.
+
+ Use is<>() / downcast<>() for CSSValue subclasses.
+
+ No new tests, no behavior change.
+
+ * css/CSSAspectRatioValue.h:
+ * css/CSSBorderImageSliceValue.h:
+ * css/CSSCalculationValue.cpp:
+ (WebCore::CSSCalcExpressionNodeParser::parseValue):
+ * css/CSSCalculationValue.h:
+ * css/CSSCanvasValue.h:
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::getBorderRadiusShorthandValue):
+ (WebCore::ComputedStyleExtractor::propertyMatches):
+ * 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/CSSFontFaceSrcValue.h:
+ * css/CSSFontFeatureValue.h:
+ * css/CSSFontSelector.cpp:
+ (WebCore::CSSFontSelector::addFontFaceRule):
+ * css/CSSFontValue.h:
+ * css/CSSFunctionValue.h:
+ * css/CSSGradientValue.cpp:
+ (WebCore::CSSGradientValue::image):
+ (WebCore::CSSGradientValue::gradientWithStylesResolved):
+ * css/CSSGradientValue.h:
+ * css/CSSGridLineNamesValue.h:
+ * css/CSSGridTemplateAreasValue.h:
+ * css/CSSImageGeneratorValue.cpp:
+ (WebCore::CSSImageGeneratorValue::image):
+ (WebCore::CSSImageGeneratorValue::isFixedSize):
+ (WebCore::CSSImageGeneratorValue::fixedSize):
+ (WebCore::CSSImageGeneratorValue::isPending):
+ (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
+ (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::addFillValue):
+ (WebCore::CSSParser::addAnimationValue):
+ (WebCore::CSSParser::parse3ValuesFillPosition):
+ (WebCore::CSSParser::parseFillPosition):
+ (WebCore::CSSParser::parseFillRepeat):
+ (WebCore::gridMissingGridPositionValue):
+ (WebCore::CSSParser::parseGridTemplateRowsAndAreas):
+ (WebCore::CSSParser::parseBasicShapeCircle):
+ (WebCore::CSSParser::parseBasicShapeEllipse):
+ (WebCore::CSSParser::parseDeprecatedGradient):
+ (WebCore::CSSParser::parseDeprecatedRadialGradient):
+ (WebCore::CSSParser::parseRadialGradient):
+ (WebCore::CSSParser::createFontFaceRule):
+ * css/CSSPrimitiveValue.h:
+ * css/CSSReflectValue.h:
+ * css/CSSShadowValue.h:
+ * css/CSSTimingFunctionValue.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::mapNinePieceImage):
+ (WebCore::CSSToStyleMap::mapNinePieceImageSlice):
+ (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
+ (WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
+ * css/CSSUnicodeRangeValue.h:
+ * css/CSSValue.cpp:
+ (WebCore::CSSValue::isImplicitInitialValue):
+ (WebCore::CSSValue::addSubresourceStyleURLs):
+ (WebCore::CSSValue::hasFailedOrCanceledSubresources):
+ (WebCore::CSSValue::equals):
+ (WebCore::CSSValue::cssText):
+ (WebCore::CSSValue::destroy):
+ (WebCore::CSSValue::cloneForCSSOM):
+ * css/CSSValue.h:
+ * css/CSSValueList.h:
+ (WebCore::CSSValueListInspector::CSSValueListInspector):
+ * 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::ApplyPropertyFillLayer::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::ApplyPropertyTextDecorationSkip::applyValue):
+ (WebCore::ApplyPropertyMarqueeIncrement::applyValue):
+ (WebCore::ApplyPropertyMarqueeRepetition::applyValue):
+ (WebCore::ApplyPropertyMarqueeSpeed::applyValue):
+ (WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
+ (WebCore::ApplyPropertyLineHeight::applyValue):
+ (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue):
+ (WebCore::ApplyPropertyWordSpacing::applyValue):
+ (WebCore::ApplyPropertyPageSize::applyValue):
+ (WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
+ (WebCore::ApplyPropertyTextEmphasisPosition::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/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/SVGCSSComputedStyleDeclaration.cpp:
+ (WebCore::strokeDashArrayToCSSValueList):
+ (WebCore::ComputedStyleExtractor::svgPropertyValue):
+ * css/SVGCSSStyleSelector.cpp:
+ (WebCore::StyleResolver::applySVGProperty):
+ * css/SourceSizeList.cpp:
+ (WebCore::computeLength):
+ * css/StyleProperties.cpp:
+ (WebCore::StyleProperties::getLayeredShorthandValue):
+ * css/StyleResolver.cpp:
+ (WebCore::extractDirectionAndWritingMode):
+ (WebCore::createGridTrackSize):
+ (WebCore::createGridTrackList):
+ (WebCore::createGridPosition):
+ (WebCore::StyleResolver::parseSnapCoordinate):
+ (WebCore::StyleResolver::parseSnapPoints):
+ (WebCore::StyleResolver::applyProperty):
+ (WebCore::StyleResolver::styleImage):
+ (WebCore::StyleResolver::generatedOrPendingFromValue):
+ (WebCore::StyleResolver::createFilterOperations):
+ * css/TransformFunctions.cpp:
+ (WebCore::transformsForValue):
+ * css/ViewportStyleResolver.cpp:
+ (WebCore::ViewportStyleResolver::getViewportArgumentValue):
+ * css/WebKitCSSFilterValue.h:
+ * css/WebKitCSSMatrix.cpp:
+ (WebCore::WebKitCSSMatrix::setMatrixValue):
+ * css/WebKitCSSTransformValue.h:
+ (WebCore::toWebKitCSSTransformValue): Deleted.
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::ApplyStyleCommand::computedFontSize):
+ * editing/EditingStyle.cpp:
+ (WebCore::identifierForStyleProperty):
+ (WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
+ (WebCore::HTMLTextDecorationEquivalent::valueIsPresentInStyle):
+ (WebCore::cssValueToRGBA):
+ (WebCore::EditingStyle::extractFontSizeDelta):
+ (WebCore::EditingStyle::textDirection):
+ (WebCore::EditingStyle::prepareToApplyAt):
+ (WebCore::EditingStyle::mergeStyle):
+ (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
+ (WebCore::EditingStyle::legacyFontSize):
+ (WebCore::EditingStyle::textDirectionForSelection):
+ (WebCore::StyleChange::extractTextStyles):
+ (WebCore::diffTextDecorations):
+ (WebCore::fontWeightIsBold):
+ (WebCore::isTransparentColorValue):
+ * editing/EditorCommand.cpp:
+ (WebCore::executeToggleStyleInList):
+ * editing/cocoa/HTMLConverter.mm:
+ (stringFromCSSValue):
+ (HTMLConverterCaches::floatPropertyValueForNode):
+ (HTMLConverterCaches::colorPropertyValueForNode):
+ * editing/markup.cpp:
+ (WebCore::propertyMissingOrEqualToNone):
+ * page/PageSerializer.cpp:
+ (WebCore::PageSerializer::retrieveResourcesForProperties):
+ * page/animation/CSSPropertyAnimation.cpp:
+ (WebCore::blendFunc):
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::adjustInnerTextStyle):
+ * rendering/style/StylePendingImage.h:
+ (WebCore::StylePendingImage::cssImageValue):
+ (WebCore::StylePendingImage::cssCursorImageValue):
+ (WebCore::StylePendingImage::cssImageSetValue):
+ * svg/SVGColor.h:
+ * svg/SVGFontFaceElement.cpp:
+ (WebCore::SVGFontFaceElement::rebuildFontFace):
+ * svg/SVGPaint.h:
+
</ins><span class="cx"> 2014-10-03 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> Clean up interface to Font::expansionOpportunityCount()
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSAspectRatioValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSAspectRatioValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSAspectRatioValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSAspectRatioValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -60,8 +60,8 @@
</span><span class="cx"> float m_denominatorValue;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSAspectRatioValue, isAspectRatioValue())
</del><ins>+} // namespace WebCore
</ins><span class="cx">
</span><del>-}
</del><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSAspectRatioValue, isAspectRatioValue())
</ins><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSBorderImageSliceValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSBorderImageSliceValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSBorderImageSliceValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSBorderImageSliceValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -56,8 +56,8 @@
</span><span class="cx"> CSSBorderImageSliceValue(PassRefPtr<CSSPrimitiveValue> slices, bool fill);
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSBorderImageSliceValue, isBorderImageSliceValue())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSBorderImageSliceValue, isBorderImageSliceValue())
+
</ins><span class="cx"> #endif // CSSBorderImageSliceValue_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSCalculationValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSCalculationValue.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSCalculationValue.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSCalculationValue.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -602,11 +602,11 @@
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValue> value = parserValue->createCSSValue();
</span><del>- if (!value || !value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(value.get()))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value.get());
- result->value = CSSCalcPrimitiveValue::create(primitiveValue, parserValue->isInt);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ result->value = CSSCalcPrimitiveValue::create(&primitiveValue, parserValue->isInt);
</ins><span class="cx">
</span><span class="cx"> ++*index;
</span><span class="cx"> return true;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSCalculationValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSCalculationValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSCalculationValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSCalculationValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -122,8 +122,8 @@
</span><span class="cx"> m_shouldClampToNonNegative ? CalculationRangeNonNegative : CalculationRangeAll);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSCalcValue, isCalcValue())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSCalcValue, isCalcValue())
+
</ins><span class="cx"> #endif // CSSCalculationValue_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSCanvasValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSCanvasValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSCanvasValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSCanvasValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -102,8 +102,8 @@
</span><span class="cx"> HTMLCanvasElement* m_element;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSCanvasValue, isCanvasValue())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSCanvasValue, isCanvasValue())
+
</ins><span class="cx"> #endif // CSSCanvasValue_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -773,7 +773,7 @@
</span><span class="cx"> if (showVerticalBottomLeft)
</span><span class="cx"> verticalRadiiList->append(*bottomLeftRadius->item(1));
</span><span class="cx">
</span><del>- if (!verticalRadiiList->equals(*toCSSValueList(list.get().item(0))))
</del><ins>+ if (!verticalRadiiList->equals(downcast<CSSValueList>(*list.get().item(0))))
</ins><span class="cx"> list.get().append(verticalRadiiList.releaseNonNull());
</span><span class="cx">
</span><span class="cx"> return list;
</span><span class="lines">@@ -3149,13 +3149,13 @@
</span><span class="cx">
</span><span class="cx"> bool ComputedStyleExtractor::propertyMatches(CSSPropertyID propertyID, const CSSValue* value) const
</span><span class="cx"> {
</span><del>- if (propertyID == CSSPropertyFontSize && value->isPrimitiveValue() && m_node) {
</del><ins>+ if (propertyID == CSSPropertyFontSize && is<CSSPrimitiveValue>(*value) && m_node) {
</ins><span class="cx"> m_node->document().updateLayoutIgnorePendingStylesheets();
</span><span class="cx"> RenderStyle* style = m_node->computedStyle(m_pseudoElementSpecifier);
</span><span class="cx"> if (style && style->fontDescription().keywordSize()) {
</span><span class="cx"> CSSValueID sizeValue = cssIdentifierForFontSizeKeyword(style->fontDescription().keywordSize());
</span><del>- const CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- if (primitiveValue->isValueID() && primitiveValue->getValueID() == sizeValue)
</del><ins>+ const CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ if (primitiveValue.isValueID() && primitiveValue.getValueID() == sizeValue)
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSCrossfadeValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSCrossfadeValue.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSCrossfadeValue.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSCrossfadeValue.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -47,11 +47,11 @@
</span><span class="cx">
</span><span class="cx"> static bool subimageKnownToBeOpaque(CSSValue& value, const RenderElement* renderer)
</span><span class="cx"> {
</span><del>- if (value.isImageValue())
- return toCSSImageValue(value).knownToBeOpaque(renderer);
</del><ins>+ if (is<CSSImageValue>(value))
+ return downcast<CSSImageValue>(value).knownToBeOpaque(renderer);
</ins><span class="cx">
</span><del>- if (value.isImageGeneratorValue())
- return toCSSImageGeneratorValue(value).knownToBeOpaque(renderer);
</del><ins>+ if (is<CSSImageGeneratorValue>(value))
+ return downcast<CSSImageGeneratorValue>(value).knownToBeOpaque(renderer);
</ins><span class="cx">
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSCrossfadeValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSCrossfadeValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSCrossfadeValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSCrossfadeValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -110,8 +110,8 @@
</span><span class="cx"> CrossfadeSubimageObserverProxy m_crossfadeSubimageObserver;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSCrossfadeValue, isCrossfadeValue())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSCrossfadeValue, isCrossfadeValue())
+
</ins><span class="cx"> #endif // CSSCrossfadeValue_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSCursorImageValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSCursorImageValue.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSCursorImageValue.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSCursorImageValue.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx"> for (; it != end; ++it) {
</span><span class="cx"> SVGElement* referencedElement = *it;
</span><span class="cx"> referencedElement->cursorImageValueRemoved();
</span><del>- if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(toCSSImageValue(m_imageValue.get()).url(), referencedElement->document()))
</del><ins>+ if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(downcast<CSSImageValue>(m_imageValue.get()).url(), referencedElement->document()))
</ins><span class="cx"> cursorElement->removeClient(referencedElement);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx"> if (!isSVGCursor())
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(toCSSImageValue(m_imageValue.get()).url(), element->document())) {
</del><ins>+ if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(downcast<CSSImageValue>(m_imageValue.get()).url(), element->document())) {
</ins><span class="cx"> // FIXME: This will override hot spot specified in CSS, which is probably incorrect.
</span><span class="cx"> SVGLengthContext lengthContext(0);
</span><span class="cx"> m_hasHotSpot = true;
</span><span class="lines">@@ -133,8 +133,8 @@
</span><span class="cx"> StyleImage* CSSCursorImageValue::cachedImage(CachedResourceLoader* loader)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><del>- if (m_imageValue.get().isImageSetValue())
- return toCSSImageSetValue(m_imageValue.get()).cachedImageSet(loader);
</del><ins>+ if (is<CSSImageSetValue>(m_imageValue.get()))
+ return downcast<CSSImageSetValue>(m_imageValue.get()).cachedImageSet(loader);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> if (!m_accessedImage) {
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx"> // we create an alternate CSSImageValue to use.
</span><span class="cx"> if (isSVGCursor() && loader && loader->document()) {
</span><span class="cx"> // FIXME: This will fail if the <cursor> element is in a shadow DOM (bug 59827)
</span><del>- if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(toCSSImageValue(m_imageValue.get()).url(), *loader->document())) {
</del><ins>+ if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(downcast<CSSImageValue>(m_imageValue.get()).url(), *loader->document())) {
</ins><span class="cx"> detachPendingImage();
</span><span class="cx"> Ref<CSSImageValue> svgImageValue(CSSImageValue::create(cursorElement->href()));
</span><span class="cx"> StyleCachedImage* cachedImage = svgImageValue->cachedImage(loader);
</span><span class="lines">@@ -154,9 +154,9 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (m_imageValue.get().isImageValue()) {
</del><ins>+ if (is<CSSImageValue>(m_imageValue.get())) {
</ins><span class="cx"> detachPendingImage();
</span><del>- m_image = toCSSImageValue(m_imageValue.get()).cachedImage(loader);
</del><ins>+ m_image = downcast<CSSImageValue>(m_imageValue.get()).cachedImage(loader);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -170,8 +170,8 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><span class="cx"> // Need to delegate completely so that changes in device scale factor can be handled appropriately.
</span><del>- if (m_imageValue.get().isImageSetValue())
- return toCSSImageSetValue(m_imageValue.get()).cachedOrPendingImageSet(document);
</del><ins>+ if (is<CSSImageSetValue>(m_imageValue.get()))
+ return downcast<CSSImageSetValue>(m_imageValue.get()).cachedOrPendingImageSet(document);
</ins><span class="cx"> #else
</span><span class="cx"> UNUSED_PARAM(document);
</span><span class="cx"> #endif
</span><span class="lines">@@ -184,8 +184,8 @@
</span><span class="cx">
</span><span class="cx"> bool CSSCursorImageValue::isSVGCursor() const
</span><span class="cx"> {
</span><del>- if (m_imageValue.get().isImageValue()) {
- URL kurl(ParsedURLString, toCSSImageValue(m_imageValue.get()).url());
</del><ins>+ if (is<CSSImageValue>(m_imageValue.get())) {
+ URL kurl(ParsedURLString, downcast<CSSImageValue>(m_imageValue.get()).url());
</ins><span class="cx"> return kurl.hasFragmentIdentifier();
</span><span class="cx"> }
</span><span class="cx"> return false;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSCursorImageValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSCursorImageValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSCursorImageValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSCursorImageValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -78,8 +78,8 @@
</span><span class="cx"> HashSet<SVGElement*> m_referencedElements;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSCursorImageValue, isCursorImageValue())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSCursorImageValue, isCursorImageValue())
+
</ins><span class="cx"> #endif // CSSCursorImageValue_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFilterImageValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFilterImageValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFilterImageValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSFilterImageValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -117,8 +117,8 @@
</span><span class="cx"> FilterSubimageObserverProxy m_filterSubimageObserver;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSFilterImageValue, isFilterImageValue())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSFilterImageValue, isFilterImageValue())
+
</ins><span class="cx"> #endif // CSSFilterImageValue_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceSrcValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFaceSrcValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFaceSrcValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSFontFaceSrcValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -95,8 +95,8 @@
</span><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSFontFaceSrcValue, isFontFaceSrcValue())
</del><ins>+} // namespace WebCore
</ins><span class="cx">
</span><del>-}
</del><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSFontFaceSrcValue, isFontFaceSrcValue())
</ins><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFeatureValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFeatureValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFeatureValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSFontFeatureValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -51,8 +51,8 @@
</span><span class="cx"> const int m_value;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSFontFeatureValue, isFontFeatureValue())
</del><ins>+} // namespace WebCore
</ins><span class="cx">
</span><del>-} // namespace
</del><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSFontFeatureValue, isFontFeatureValue())
</ins><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontSelectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontSelector.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontSelector.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSFontSelector.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -91,26 +91,26 @@
</span><span class="cx"> RefPtr<CSSValue> fontFamily = style.getPropertyCSSValue(CSSPropertyFontFamily);
</span><span class="cx"> RefPtr<CSSValue> src = style.getPropertyCSSValue(CSSPropertySrc);
</span><span class="cx"> RefPtr<CSSValue> unicodeRange = style.getPropertyCSSValue(CSSPropertyUnicodeRange);
</span><del>- if (!fontFamily || !src || !fontFamily->isValueList() || !src->isValueList() || (unicodeRange && !unicodeRange->isValueList()))
</del><ins>+ if (!is<CSSValueList>(fontFamily.get()) || !is<CSSValueList>(src.get()) || (unicodeRange && !is<CSSValueList>(*unicodeRange)))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSValueList* familyList = toCSSValueList(fontFamily.get());
- if (!familyList->length())
</del><ins>+ CSSValueList& familyList = downcast<CSSValueList>(*fontFamily);
+ if (!familyList.length())
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSValueList* srcList = toCSSValueList(src.get());
- if (!srcList->length())
</del><ins>+ CSSValueList& srcList = downcast<CSSValueList>(*src);
+ if (!srcList.length())
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSValueList* rangeList = toCSSValueList(unicodeRange.get());
</del><ins>+ CSSValueList* rangeList = downcast<CSSValueList>(unicodeRange.get());
</ins><span class="cx">
</span><span class="cx"> unsigned traitsMask = 0;
</span><span class="cx">
</span><span class="cx"> if (RefPtr<CSSValue> fontStyle = style.getPropertyCSSValue(CSSPropertyFontStyle)) {
</span><del>- if (!fontStyle->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*fontStyle))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- switch (toCSSPrimitiveValue(fontStyle.get())->getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(*fontStyle).getValueID()) {
</ins><span class="cx"> case CSSValueNormal:
</span><span class="cx"> traitsMask |= FontStyleNormalMask;
</span><span class="cx"> break;
</span><span class="lines">@@ -125,10 +125,10 @@
</span><span class="cx"> traitsMask |= FontStyleNormalMask;
</span><span class="cx">
</span><span class="cx"> if (RefPtr<CSSValue> fontWeight = style.getPropertyCSSValue(CSSPropertyFontWeight)) {
</span><del>- if (!fontWeight->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*fontWeight))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- switch (toCSSPrimitiveValue(fontWeight.get())->getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(*fontWeight).getValueID()) {
</ins><span class="cx"> case CSSValueBold:
</span><span class="cx"> case CSSValue700:
</span><span class="cx"> traitsMask |= FontWeight700Mask;
</span><span class="lines">@@ -170,16 +170,16 @@
</span><span class="cx"> RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
</span><span class="cx"> list->append(fontVariant.releaseNonNull());
</span><span class="cx"> fontVariant = list.releaseNonNull();
</span><del>- } else if (!fontVariant->isValueList())
</del><ins>+ } else if (!is<CSSValueList>(*fontVariant))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSValueList* variantList = toCSSValueList(fontVariant.get());
- unsigned numVariants = variantList->length();
</del><ins>+ CSSValueList& variantList = downcast<CSSValueList>(*fontVariant);
+ unsigned numVariants = variantList.length();
</ins><span class="cx"> if (!numVariants)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> for (unsigned i = 0; i < numVariants; ++i) {
</span><del>- switch (toCSSPrimitiveValue(variantList->itemWithoutBoundsCheck(i))->getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(variantList.itemWithoutBoundsCheck(i))->getValueID()) {
</ins><span class="cx"> case CSSValueNormal:
</span><span class="cx"> traitsMask |= FontVariantNormalMask;
</span><span class="cx"> break;
</span><span class="lines">@@ -196,25 +196,25 @@
</span><span class="cx"> // Each item in the src property's list is a single CSSFontFaceSource. Put them all into a CSSFontFace.
</span><span class="cx"> RefPtr<CSSFontFace> fontFace;
</span><span class="cx">
</span><del>- int srcLength = srcList->length();
</del><ins>+ int srcLength = srcList.length();
</ins><span class="cx">
</span><span class="cx"> bool foundSVGFont = false;
</span><span class="cx">
</span><span class="cx"> for (int i = 0; i < srcLength; i++) {
</span><span class="cx"> // An item in the list either specifies a string (local font name) or a URL (remote font to download).
</span><del>- CSSFontFaceSrcValue* item = toCSSFontFaceSrcValue(srcList->itemWithoutBoundsCheck(i));
</del><ins>+ CSSFontFaceSrcValue& item = downcast<CSSFontFaceSrcValue>(*srcList.itemWithoutBoundsCheck(i));
</ins><span class="cx"> std::unique_ptr<CSSFontFaceSource> source;
</span><span class="cx">
</span><span class="cx"> #if ENABLE(SVG_FONTS)
</span><del>- foundSVGFont = item->isSVGFontFaceSrc() || item->svgFontFaceElement();
</del><ins>+ foundSVGFont = item.isSVGFontFaceSrc() || item.svgFontFaceElement();
</ins><span class="cx"> #endif
</span><del>- if (!item->isLocal()) {
</del><ins>+ if (!item.isLocal()) {
</ins><span class="cx"> Settings* settings = m_document ? m_document->frame() ? &m_document->frame()->settings() : 0 : 0;
</span><span class="cx"> bool allowDownloading = foundSVGFont || (settings && settings->downloadableBinaryFontsEnabled());
</span><del>- if (allowDownloading && item->isSupportedFormat() && m_document) {
- CachedFont* cachedFont = item->cachedFont(m_document);
</del><ins>+ if (allowDownloading && item.isSupportedFormat() && m_document) {
+ CachedFont* cachedFont = item.cachedFont(m_document);
</ins><span class="cx"> if (cachedFont) {
</span><del>- source = std::make_unique<CSSFontFaceSource>(item->resource(), cachedFont);
</del><ins>+ source = std::make_unique<CSSFontFaceSource>(item.resource(), cachedFont);
</ins><span class="cx"> #if ENABLE(SVG_FONTS)
</span><span class="cx"> if (foundSVGFont)
</span><span class="cx"> source->setHasExternalSVGFont(true);
</span><span class="lines">@@ -222,7 +222,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><del>- source = std::make_unique<CSSFontFaceSource>(item->resource());
</del><ins>+ source = std::make_unique<CSSFontFaceSource>(item.resource());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!fontFace) {
</span><span class="lines">@@ -237,7 +237,7 @@
</span><span class="cx">
</span><span class="cx"> if (source) {
</span><span class="cx"> #if ENABLE(SVG_FONTS)
</span><del>- source->setSVGFontFaceElement(item->svgFontFaceElement());
</del><ins>+ source->setSVGFontFaceElement(item.svgFontFaceElement());
</ins><span class="cx"> #endif
</span><span class="cx"> fontFace->addSource(WTF::move(source));
</span><span class="cx"> }
</span><span class="lines">@@ -251,15 +251,15 @@
</span><span class="cx"> if (rangeList) {
</span><span class="cx"> unsigned numRanges = rangeList->length();
</span><span class="cx"> for (unsigned i = 0; i < numRanges; i++) {
</span><del>- CSSUnicodeRangeValue* range = toCSSUnicodeRangeValue(rangeList->itemWithoutBoundsCheck(i));
- fontFace->addRange(range->from(), range->to());
</del><ins>+ CSSUnicodeRangeValue& range = downcast<CSSUnicodeRangeValue>(*rangeList->itemWithoutBoundsCheck(i));
+ fontFace->addRange(range.from(), range.to());
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Hash under every single family name.
</span><del>- int familyLength = familyList->length();
</del><ins>+ int familyLength = familyList.length();
</ins><span class="cx"> for (int i = 0; i < familyLength; i++) {
</span><del>- CSSPrimitiveValue* item = toCSSPrimitiveValue(familyList->itemWithoutBoundsCheck(i));
</del><ins>+ CSSPrimitiveValue* item = downcast<CSSPrimitiveValue>(familyList.itemWithoutBoundsCheck(i));
</ins><span class="cx"> String familyName;
</span><span class="cx"> if (item->isString()) {
</span><span class="cx"> familyName = item->getStringValue();
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSFontValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -55,8 +55,8 @@
</span><span class="cx"> }
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSFontValue, isFontValue())
</del><ins>+} // namespace WebCore
</ins><span class="cx">
</span><del>-} // namespace
</del><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSFontValue, isFontValue())
</ins><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFunctionValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFunctionValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFunctionValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSFunctionValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -59,8 +59,9 @@
</span><span class="cx"> RefPtr<CSSValueList> m_args;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSFunctionValue, isFunctionValue())
</del><ins>+} // namespace WebCore
</ins><span class="cx">
</span><del>-}
</del><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSFunctionValue, isFunctionValue())
+
</ins><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGradientValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGradientValue.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGradientValue.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSGradientValue.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -46,12 +46,12 @@
</span><span class="cx"> PassRefPtr<Image> CSSGradientValue::image(RenderElement* renderer, const FloatSize& size)
</span><span class="cx"> {
</span><span class="cx"> if (size.isEmpty())
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> bool cacheable = isCacheable();
</span><span class="cx"> if (cacheable) {
</span><span class="cx"> if (!clients().contains(renderer))
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> Image* result = cachedImageForSize(size);
</span><span class="cx"> if (result)
</span><span class="lines">@@ -60,10 +60,10 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<Gradient> gradient;
</span><span class="cx">
</span><del>- if (isLinearGradientValue())
- gradient = toCSSLinearGradientValue(this)->createGradient(*renderer, size);
</del><ins>+ if (is<CSSLinearGradientValue>(*this))
+ gradient = downcast<CSSLinearGradientValue>(*this).createGradient(*renderer, size);
</ins><span class="cx"> else
</span><del>- gradient = toCSSRadialGradientValue(this)->createGradient(*renderer, size);
</del><ins>+ gradient = downcast<CSSRadialGradientValue>(*this).createGradient(*renderer, size);
</ins><span class="cx">
</span><span class="cx"> RefPtr<GradientImage> newImage = GradientImage::create(gradient, size);
</span><span class="cx"> if (cacheable)
</span><span class="lines">@@ -118,13 +118,13 @@
</span><span class="cx"> RefPtr<CSSGradientValue> result;
</span><span class="cx"> if (!derived)
</span><span class="cx"> result = this;
</span><del>- else if (isLinearGradientValue())
- result = toCSSLinearGradientValue(this)->clone();
- else if (isRadialGradientValue())
- result = toCSSRadialGradientValue(this)->clone();
</del><ins>+ else if (is<CSSLinearGradientValue>(*this))
+ result = downcast<CSSLinearGradientValue>(*this).clone();
+ else if (is<CSSRadialGradientValue>(*this))
+ result = downcast<CSSRadialGradientValue>(*this).clone();
</ins><span class="cx"> else {
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> for (auto& stop : result->m_stops) {
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGradientValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGradientValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGradientValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSGradientValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -131,8 +131,6 @@
</span><span class="cx"> bool m_repeating;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSGradientValue, isGradientValue())
-
</del><span class="cx"> class CSSLinearGradientValue : public CSSGradientValue {
</span><span class="cx"> public:
</span><span class="cx">
</span><span class="lines">@@ -170,8 +168,6 @@
</span><span class="cx"> RefPtr<CSSPrimitiveValue> m_angle; // may be null.
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSLinearGradientValue, isLinearGradientValue())
-
</del><span class="cx"> class CSSRadialGradientValue : public CSSGradientValue {
</span><span class="cx"> public:
</span><span class="cx"> static PassRef<CSSRadialGradientValue> create(CSSGradientRepeat repeat, CSSGradientType gradientType = CSSRadialGradient)
</span><span class="lines">@@ -233,8 +229,10 @@
</span><span class="cx"> RefPtr<CSSPrimitiveValue> m_endVerticalSize;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSRadialGradientValue, isRadialGradientValue())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSGradientValue, isGradientValue())
+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSLinearGradientValue, isLinearGradientValue())
+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSRadialGradientValue, isRadialGradientValue())
+
</ins><span class="cx"> #endif // CSSGradientValue_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGridLineNamesValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGridLineNamesValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGridLineNamesValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSGridLineNamesValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -52,9 +52,9 @@
</span><span class="cx"> CSSGridLineNamesValue();
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSGridLineNamesValue, isGridLineNamesValue());
</del><ins>+} // namespace WebCore
</ins><span class="cx">
</span><del>-}
</del><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSGridLineNamesValue, isGridLineNamesValue());
</ins><span class="cx">
</span><del>-#endif
-#endif
</del><ins>+#endif // ENABLE(CSS_GRID_LAYOUT)
+#endif // CSSGridLineNamesValue_h
</ins></span></pre></div>
<a id="trunkSourceWebCorecssCSSGridTemplateAreasValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGridTemplateAreasValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGridTemplateAreasValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSGridTemplateAreasValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -62,10 +62,10 @@
</span><span class="cx"> size_t m_columnCount;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSGridTemplateAreasValue, isGridTemplateAreasValue())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSGridTemplateAreasValue, isGridTemplateAreasValue())
+
</ins><span class="cx"> #endif /* ENABLE(CSS_GRID_LAYOUT) */
</span><span class="cx">
</span><span class="cx"> #endif // CSSGridTemplateAreasValue_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSImageGeneratorValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSImageGeneratorValue.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSImageGeneratorValue.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSImageGeneratorValue.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -109,15 +109,15 @@
</span><span class="cx"> {
</span><span class="cx"> switch (classType()) {
</span><span class="cx"> case CanvasClass:
</span><del>- return toCSSCanvasValue(this)->image(renderer, size);
</del><ins>+ return downcast<CSSCanvasValue>(*this).image(renderer, size);
</ins><span class="cx"> case CrossfadeClass:
</span><del>- return toCSSCrossfadeValue(this)->image(renderer, size);
</del><ins>+ return downcast<CSSCrossfadeValue>(*this).image(renderer, size);
</ins><span class="cx"> case FilterImageClass:
</span><del>- return toCSSFilterImageValue(this)->image(renderer, size);
</del><ins>+ return downcast<CSSFilterImageValue>(*this).image(renderer, size);
</ins><span class="cx"> case LinearGradientClass:
</span><del>- return toCSSLinearGradientValue(this)->image(renderer, size);
</del><ins>+ return downcast<CSSLinearGradientValue>(*this).image(renderer, size);
</ins><span class="cx"> case RadialGradientClass:
</span><del>- return toCSSRadialGradientValue(this)->image(renderer, size);
</del><ins>+ return downcast<CSSRadialGradientValue>(*this).image(renderer, size);
</ins><span class="cx"> default:
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><span class="lines">@@ -128,15 +128,15 @@
</span><span class="cx"> {
</span><span class="cx"> switch (classType()) {
</span><span class="cx"> case CanvasClass:
</span><del>- return toCSSCanvasValue(this)->isFixedSize();
</del><ins>+ return downcast<CSSCanvasValue>(*this).isFixedSize();
</ins><span class="cx"> case CrossfadeClass:
</span><del>- return toCSSCrossfadeValue(this)->isFixedSize();
</del><ins>+ return downcast<CSSCrossfadeValue>(*this).isFixedSize();
</ins><span class="cx"> case FilterImageClass:
</span><del>- return toCSSFilterImageValue(this)->isFixedSize();
</del><ins>+ return downcast<CSSFilterImageValue>(*this).isFixedSize();
</ins><span class="cx"> case LinearGradientClass:
</span><del>- return toCSSLinearGradientValue(this)->isFixedSize();
</del><ins>+ return downcast<CSSLinearGradientValue>(*this).isFixedSize();
</ins><span class="cx"> case RadialGradientClass:
</span><del>- return toCSSRadialGradientValue(this)->isFixedSize();
</del><ins>+ return downcast<CSSRadialGradientValue>(*this).isFixedSize();
</ins><span class="cx"> default:
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><span class="lines">@@ -147,15 +147,15 @@
</span><span class="cx"> {
</span><span class="cx"> switch (classType()) {
</span><span class="cx"> case CanvasClass:
</span><del>- return toCSSCanvasValue(this)->fixedSize(renderer);
</del><ins>+ return downcast<CSSCanvasValue>(*this).fixedSize(renderer);
</ins><span class="cx"> case CrossfadeClass:
</span><del>- return toCSSCrossfadeValue(this)->fixedSize(renderer);
</del><ins>+ return downcast<CSSCrossfadeValue>(*this).fixedSize(renderer);
</ins><span class="cx"> case FilterImageClass:
</span><del>- return toCSSFilterImageValue(this)->fixedSize(renderer);
</del><ins>+ return downcast<CSSFilterImageValue>(*this).fixedSize(renderer);
</ins><span class="cx"> case LinearGradientClass:
</span><del>- return toCSSLinearGradientValue(this)->fixedSize(renderer);
</del><ins>+ return downcast<CSSLinearGradientValue>(*this).fixedSize(renderer);
</ins><span class="cx"> case RadialGradientClass:
</span><del>- return toCSSRadialGradientValue(this)->fixedSize(renderer);
</del><ins>+ return downcast<CSSRadialGradientValue>(*this).fixedSize(renderer);
</ins><span class="cx"> default:
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><span class="lines">@@ -166,15 +166,15 @@
</span><span class="cx"> {
</span><span class="cx"> switch (classType()) {
</span><span class="cx"> case CrossfadeClass:
</span><del>- return toCSSCrossfadeValue(this)->isPending();
</del><ins>+ return downcast<CSSCrossfadeValue>(*this).isPending();
</ins><span class="cx"> case CanvasClass:
</span><del>- return toCSSCanvasValue(this)->isPending();
</del><ins>+ return downcast<CSSCanvasValue>(*this).isPending();
</ins><span class="cx"> case FilterImageClass:
</span><del>- return toCSSFilterImageValue(this)->isPending();
</del><ins>+ return downcast<CSSFilterImageValue>(*this).isPending();
</ins><span class="cx"> case LinearGradientClass:
</span><del>- return toCSSLinearGradientValue(this)->isPending();
</del><ins>+ return downcast<CSSLinearGradientValue>(*this).isPending();
</ins><span class="cx"> case RadialGradientClass:
</span><del>- return toCSSRadialGradientValue(this)->isPending();
</del><ins>+ return downcast<CSSRadialGradientValue>(*this).isPending();
</ins><span class="cx"> default:
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><span class="lines">@@ -185,15 +185,15 @@
</span><span class="cx"> {
</span><span class="cx"> switch (classType()) {
</span><span class="cx"> case CrossfadeClass:
</span><del>- return toCSSCrossfadeValue(this)->knownToBeOpaque(renderer);
</del><ins>+ return downcast<CSSCrossfadeValue>(*this).knownToBeOpaque(renderer);
</ins><span class="cx"> case CanvasClass:
</span><span class="cx"> return false;
</span><span class="cx"> case FilterImageClass:
</span><del>- return toCSSFilterImageValue(this)->knownToBeOpaque(renderer);
</del><ins>+ return downcast<CSSFilterImageValue>(*this).knownToBeOpaque(renderer);
</ins><span class="cx"> case LinearGradientClass:
</span><del>- return toCSSLinearGradientValue(this)->knownToBeOpaque(renderer);
</del><ins>+ return downcast<CSSLinearGradientValue>(*this).knownToBeOpaque(renderer);
</ins><span class="cx"> case RadialGradientClass:
</span><del>- return toCSSRadialGradientValue(this)->knownToBeOpaque(renderer);
</del><ins>+ return downcast<CSSRadialGradientValue>(*this).knownToBeOpaque(renderer);
</ins><span class="cx"> default:
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><span class="lines">@@ -204,19 +204,19 @@
</span><span class="cx"> {
</span><span class="cx"> switch (classType()) {
</span><span class="cx"> case CrossfadeClass:
</span><del>- toCSSCrossfadeValue(this)->loadSubimages(cachedResourceLoader);
</del><ins>+ downcast<CSSCrossfadeValue>(*this).loadSubimages(cachedResourceLoader);
</ins><span class="cx"> break;
</span><span class="cx"> case CanvasClass:
</span><del>- toCSSCanvasValue(this)->loadSubimages(cachedResourceLoader);
</del><ins>+ downcast<CSSCanvasValue>(*this).loadSubimages(cachedResourceLoader);
</ins><span class="cx"> break;
</span><span class="cx"> case FilterImageClass:
</span><del>- toCSSFilterImageValue(this)->loadSubimages(cachedResourceLoader);
</del><ins>+ downcast<CSSFilterImageValue>(*this).loadSubimages(cachedResourceLoader);
</ins><span class="cx"> break;
</span><span class="cx"> case LinearGradientClass:
</span><del>- toCSSLinearGradientValue(this)->loadSubimages(cachedResourceLoader);
</del><ins>+ downcast<CSSLinearGradientValue>(*this).loadSubimages(cachedResourceLoader);
</ins><span class="cx"> break;
</span><span class="cx"> case RadialGradientClass:
</span><del>- toCSSRadialGradientValue(this)->loadSubimages(cachedResourceLoader);
</del><ins>+ downcast<CSSRadialGradientValue>(*this).loadSubimages(cachedResourceLoader);
</ins><span class="cx"> break;
</span><span class="cx"> default:
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="lines">@@ -225,13 +225,13 @@
</span><span class="cx">
</span><span class="cx"> bool CSSImageGeneratorValue::subimageIsPending(CSSValue* value)
</span><span class="cx"> {
</span><del>- if (value->isImageValue())
- return toCSSImageValue(value)->cachedOrPendingImage()->isPendingImage();
</del><ins>+ if (is<CSSImageValue>(*value))
+ return downcast<CSSImageValue>(*value).cachedOrPendingImage()->isPendingImage();
</ins><span class="cx">
</span><del>- if (value->isImageGeneratorValue())
- return toCSSImageGeneratorValue(value)->isPending();
</del><ins>+ if (is<CSSImageGeneratorValue>(*value))
+ return downcast<CSSImageGeneratorValue>(*value).isPending();
</ins><span class="cx">
</span><del>- if (value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueNone)
</del><ins>+ if (is<CSSPrimitiveValue>(*value) && downcast<CSSPrimitiveValue>(*value).getValueID() == CSSValueNone)
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="lines">@@ -244,21 +244,21 @@
</span><span class="cx"> if (!value)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- if (value->isImageValue()) {
- StyleCachedImage* styleCachedImage = toCSSImageValue(value)->cachedImage(cachedResourceLoader);
</del><ins>+ if (is<CSSImageValue>(*value)) {
+ StyleCachedImage* styleCachedImage = downcast<CSSImageValue>(*value).cachedImage(cachedResourceLoader);
</ins><span class="cx"> if (!styleCachedImage)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> return styleCachedImage->cachedImage();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (value->isImageGeneratorValue()) {
- toCSSImageGeneratorValue(value)->loadSubimages(cachedResourceLoader);
</del><ins>+ if (is<CSSImageGeneratorValue>(*value)) {
+ downcast<CSSImageGeneratorValue>(*value).loadSubimages(cachedResourceLoader);
</ins><span class="cx"> // FIXME: Handle CSSImageGeneratorValue (and thus cross-fades with gradients and canvas).
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueNone)
</del><ins>+ if (is<CSSPrimitiveValue>(*value) && downcast<CSSPrimitiveValue>(*value).getValueID() == CSSValueNone)
</ins><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> ASSERT_NOT_REACHED();
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSImageGeneratorValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSImageGeneratorValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSImageGeneratorValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSImageGeneratorValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -92,8 +92,8 @@
</span><span class="cx"> HashMap<FloatSize, std::unique_ptr<CachedGeneratedImage>> m_images;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSImageGeneratorValue, isImageGeneratorValue())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSImageGeneratorValue, isImageGeneratorValue())
+
</ins><span class="cx"> #endif // CSSImageGeneratorValue_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSImageSetValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSImageSetValue.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSImageSetValue.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSImageSetValue.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -70,13 +70,12 @@
</span><span class="cx"> size_t i = 0;
</span><span class="cx"> while (i < length) {
</span><span class="cx"> CSSValue* imageValue = item(i);
</span><del>- String imageURL = toCSSImageValue(imageValue)->url();
</del><ins>+ String imageURL = downcast<CSSImageValue>(*imageValue).url();
</ins><span class="cx">
</span><span class="cx"> ++i;
</span><span class="cx"> ASSERT_WITH_SECURITY_IMPLICATION(i < length);
</span><span class="cx"> CSSValue* scaleFactorValue = item(i);
</span><del>- ASSERT_WITH_SECURITY_IMPLICATION(scaleFactorValue->isPrimitiveValue());
- float scaleFactor = toCSSPrimitiveValue(scaleFactorValue)->getFloatValue();
</del><ins>+ float scaleFactor = downcast<CSSPrimitiveValue>(*scaleFactorValue).getFloatValue();
</ins><span class="cx">
</span><span class="cx"> ImageWithScale image;
</span><span class="cx"> image.imageURL = imageURL;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSImageSetValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSImageSetValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSImageSetValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSImageSetValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -87,10 +87,10 @@
</span><span class="cx"> Vector<ImageWithScale> m_imagesInSet;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSImageSetValue, isImageSetValue())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSImageSetValue, isImageSetValue())
+
</ins><span class="cx"> #endif // ENABLE(CSS_IMAGE_SET)
</span><span class="cx">
</span><span class="cx"> #endif // CSSImageSetValue_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSImageValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSImageValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSImageValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSImageValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -69,8 +69,8 @@
</span><span class="cx"> AtomicString m_initiatorName;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSImageValue, isImageValue())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSImageValue, isImageValue())
+
</ins><span class="cx"> #endif // CSSImageValue_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSInheritedValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSInheritedValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSInheritedValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSInheritedValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -44,8 +44,8 @@
</span><span class="cx"> }
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSInheritedValue, isInheritedValue())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSInheritedValue, isInheritedValue())
+
</ins><span class="cx"> #endif // CSSInheritedValue_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSInitialValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSInitialValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSInitialValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSInitialValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -53,8 +53,8 @@
</span><span class="cx"> bool m_isImplicit;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSInitialValue, isInitialValue())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSInitialValue, isInitialValue())
+
</ins><span class="cx"> #endif // CSSInitialValue_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSLineBoxContainValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSLineBoxContainValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSLineBoxContainValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSLineBoxContainValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -56,8 +56,8 @@
</span><span class="cx"> LineBoxContain m_value;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSLineBoxContainValue, isLineBoxContainValue())
</del><ins>+} // namespace WebCore
</ins><span class="cx">
</span><del>-} // namespace
</del><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSLineBoxContainValue, isLineBoxContainValue())
</ins><span class="cx">
</span><del>-#endif
</del><ins>+#endif // CSSLineBoxContainValue_h
</ins></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -1345,14 +1345,14 @@
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> CSSValue* value = parser.m_parsedProperties.first().value();
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- if (!primitiveValue->isRGBColor())
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ if (!primitiveValue.isRGBColor())
</ins><span class="cx"> return false;
</span><span class="cx">
</span><del>- color = primitiveValue->getRGBA32Value();
</del><ins>+ color = primitiveValue.getRGBA32Value();
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3118,7 +3118,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (lval->isBaseValueList()) {
</span><del>- toCSSValueList(*lval).append(WTF::move(rval));
</del><ins>+ downcast<CSSValueList>(*lval).append(WTF::move(rval));
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3425,8 +3425,8 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (lval->isValueList()) {
- toCSSValueList(*lval).append(WTF::move(rval));
</del><ins>+ if (is<CSSValueList>(*lval)) {
+ downcast<CSSValueList>(*lval).append(WTF::move(rval));
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4170,10 +4170,10 @@
</span><span class="cx"> value1.swap(value2);
</span><span class="cx">
</span><span class="cx"> #ifndef NDEBUG
</span><del>- CSSPrimitiveValue* first = toCSSPrimitiveValue(value1.get());
- CSSPrimitiveValue* second = toCSSPrimitiveValue(value2.get());
- ident1 = first->getPairValue()->first()->getValueID();
- ident2 = second->getPairValue()->first()->getValueID();
</del><ins>+ CSSPrimitiveValue& first = downcast<CSSPrimitiveValue>(*value1);
+ CSSPrimitiveValue& second = downcast<CSSPrimitiveValue>(*value2);
+ ident1 = first.getPairValue()->first()->getValueID();
+ ident2 = second.getPairValue()->first()->getValueID();
</ins><span class="cx"> ASSERT(ident1 == CSSValueLeft || ident1 == CSSValueRight);
</span><span class="cx"> ASSERT(ident2 == CSSValueBottom || ident2 == CSSValueTop);
</span><span class="cx"> #endif
</span><span class="lines">@@ -4231,8 +4231,8 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RefPtr<CSSPrimitiveValue> parsedValue1 = toCSSPrimitiveValue(value1.get());
- RefPtr<CSSPrimitiveValue> parsedValue2 = toCSSPrimitiveValue(value2.get());
</del><ins>+ RefPtr<CSSPrimitiveValue> parsedValue1 = downcast<CSSPrimitiveValue>(value1.get());
+ RefPtr<CSSPrimitiveValue> parsedValue2 = downcast<CSSPrimitiveValue>(value2.get());
</ins><span class="cx">
</span><span class="cx"> value1.clear();
</span><span class="cx"> value2.clear();
</span><span class="lines">@@ -4329,7 +4329,7 @@
</span><span class="cx">
</span><span class="cx"> // If only one value was specified, value2 is the same as value1.
</span><span class="cx"> m_implicitShorthand = true;
</span><del>- value2 = cssValuePool().createIdentifierValue(toCSSPrimitiveValue(value1.get())->getValueID());
</del><ins>+ value2 = cssValuePool().createIdentifierValue(downcast<CSSPrimitiveValue>(*value1).getValueID());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PassRefPtr<CSSValue> CSSParser::parseFillSize(CSSPropertyID propId, bool& allowComma)
</span><span class="lines">@@ -4946,7 +4946,7 @@
</span><span class="cx">
</span><span class="cx"> static PassRefPtr<CSSValue> gridMissingGridPositionValue(CSSValue* value)
</span><span class="cx"> {
</span><del>- if (value->isPrimitiveValue() && toCSSPrimitiveValue(value)->isString())
</del><ins>+ if (is<CSSPrimitiveValue>(*value) && downcast<CSSPrimitiveValue>(*value).isString())
</ins><span class="cx"> return value;
</span><span class="cx">
</span><span class="cx"> return cssValuePool().createIdentifierValue(CSSValueAuto);
</span><span class="lines">@@ -4998,7 +4998,7 @@
</span><span class="cx"> if (m_valueList->current()->unit == CSSParserValue::ValueList) {
</span><span class="cx"> if (trailingIdentWasAdded) {
</span><span class="cx"> // A row's trailing ident must be concatenated with the next row's leading one.
</span><del>- parseGridLineNames(*m_valueList, *templateRows, toCSSGridLineNamesValue(templateRows->item(templateRows->length() - 1)));
</del><ins>+ parseGridLineNames(*m_valueList, *templateRows, downcast<CSSGridLineNamesValue>(templateRows->item(templateRows->length() - 1)));
</ins><span class="cx"> } else
</span><span class="cx"> parseGridLineNames(*m_valueList, *templateRows);
</span><span class="cx"> }
</span><span class="lines">@@ -5900,7 +5900,7 @@
</span><span class="cx"> // arguments except the first two. Thus, and index greater than one
</span><span class="cx"> // indicates an invalid production.
</span><span class="cx"> if (args->currentIndex() > 1)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> if (!args->currentIndex() && argument->id != CSSValueAt) {
</span><span class="cx"> if (RefPtr<CSSPrimitiveValue> radius = parseShapeRadius(argument)) {
</span><span class="lines">@@ -5908,7 +5908,7 @@
</span><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (argument->id == CSSValueAt && args->next()) {
</span><span class="lines">@@ -5916,14 +5916,12 @@
</span><span class="cx"> RefPtr<CSSValue> centerY;
</span><span class="cx"> parseFillPosition(args, centerX, centerY);
</span><span class="cx"> if (centerX && centerY && !args->current()) {
</span><del>- ASSERT(centerX->isPrimitiveValue());
- ASSERT(centerY->isPrimitiveValue());
- shape->setCenterX(toCSSPrimitiveValue(centerX.get()));
- shape->setCenterY(toCSSPrimitiveValue(centerY.get()));
</del><ins>+ shape->setCenterX(downcast<CSSPrimitiveValue>(centerX.get()));
+ shape->setCenterY(downcast<CSSPrimitiveValue>(centerY.get()));
</ins><span class="cx"> } else
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> } else
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return shape;
</span><span class="lines">@@ -5946,7 +5944,7 @@
</span><span class="cx"> // arguments except the first three. Thus, an index greater than two
</span><span class="cx"> // indicates an invalid production.
</span><span class="cx"> if (args->currentIndex() > 2)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> if (args->currentIndex() < 2 && argument->id != CSSValueAt) {
</span><span class="cx"> if (RefPtr<CSSPrimitiveValue> radius = parseShapeRadius(argument)) {
</span><span class="lines">@@ -5957,22 +5955,20 @@
</span><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (argument->id != CSSValueAt || !args->next()) // expecting ellipse(.. at <position>)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> RefPtr<CSSValue> centerX;
</span><span class="cx"> RefPtr<CSSValue> centerY;
</span><span class="cx"> parseFillPosition(args, centerX, centerY);
</span><span class="cx"> if (!centerX || !centerY || args->current())
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><del>- ASSERT(centerX->isPrimitiveValue());
- ASSERT(centerY->isPrimitiveValue());
- shape->setCenterX(toCSSPrimitiveValue(centerX.get()));
- shape->setCenterY(toCSSPrimitiveValue(centerY.get()));
</del><ins>+ shape->setCenterX(downcast<CSSPrimitiveValue>(centerX.get()));
+ shape->setCenterY(downcast<CSSPrimitiveValue>(centerY.get()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return shape;
</span><span class="lines">@@ -8115,7 +8111,7 @@
</span><span class="cx"> a = args->next();
</span><span class="cx"> if (!a || a->unit != CSSPrimitiveValue::CSS_NUMBER)
</span><span class="cx"> return false;
</span><del>- toCSSRadialGradientValue(result.get())->setFirstRadius(createPrimitiveNumericValue(a));
</del><ins>+ downcast<CSSRadialGradientValue>(*result).setFirstRadius(createPrimitiveNumericValue(a));
</ins><span class="cx">
</span><span class="cx"> // Comma after the first radius.
</span><span class="cx"> a = args->next();
</span><span class="lines">@@ -8152,7 +8148,7 @@
</span><span class="cx"> a = args->next();
</span><span class="cx"> if (!a || a->unit != CSSPrimitiveValue::CSS_NUMBER)
</span><span class="cx"> return false;
</span><del>- toCSSRadialGradientValue(result.get())->setSecondRadius(createPrimitiveNumericValue(a));
</del><ins>+ downcast<CSSRadialGradientValue>(*result).setSecondRadius(createPrimitiveNumericValue(a));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // We now will accept any number of stops (0 or more).
</span><span class="lines">@@ -8312,14 +8308,11 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- ASSERT(!centerX || centerX->isPrimitiveValue());
- ASSERT(!centerY || centerY->isPrimitiveValue());
-
- result->setFirstX(toCSSPrimitiveValue(centerX.get()));
- result->setSecondX(toCSSPrimitiveValue(centerX.get()));
</del><ins>+ result->setFirstX(downcast<CSSPrimitiveValue>(centerX.get()));
+ result->setSecondX(downcast<CSSPrimitiveValue>(centerX.get()));
</ins><span class="cx"> // CSS3 radial gradients always share the same start and end point.
</span><del>- result->setFirstY(toCSSPrimitiveValue(centerY.get()));
- result->setSecondY(toCSSPrimitiveValue(centerY.get()));
</del><ins>+ result->setFirstY(downcast<CSSPrimitiveValue>(centerY.get()));
+ result->setSecondY(downcast<CSSPrimitiveValue>(centerY.get()));
</ins><span class="cx">
</span><span class="cx"> RefPtr<CSSPrimitiveValue> shapeValue;
</span><span class="cx"> RefPtr<CSSPrimitiveValue> sizeValue;
</span><span class="lines">@@ -8578,13 +8571,11 @@
</span><span class="cx"> if (!a)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- ASSERT(centerX->isPrimitiveValue());
- ASSERT(centerY->isPrimitiveValue());
- result->setFirstX(toCSSPrimitiveValue(centerX.get()));
- result->setFirstY(toCSSPrimitiveValue(centerY.get()));
</del><ins>+ result->setFirstX(downcast<CSSPrimitiveValue>(centerX.get()));
+ result->setFirstY(downcast<CSSPrimitiveValue>(centerY.get()));
</ins><span class="cx"> // Right now, CSS radial gradients have the same start and end centers.
</span><del>- result->setSecondX(toCSSPrimitiveValue(centerX.get()));
- result->setSecondY(toCSSPrimitiveValue(centerY.get()));
</del><ins>+ result->setSecondX(downcast<CSSPrimitiveValue>(centerX.get()));
+ result->setSecondY(downcast<CSSPrimitiveValue>(centerY.get()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (shapeValue || sizeValue || horizontalSize || centerX || centerY)
</span><span class="lines">@@ -11737,7 +11728,7 @@
</span><span class="cx"> CSSProperty& property = m_parsedProperties[i];
</span><span class="cx"> if (property.id() == CSSPropertyFontVariant && property.value()->isPrimitiveValue())
</span><span class="cx"> property.wrapValueInCommaSeparatedList();
</span><del>- else if (property.id() == CSSPropertyFontFamily && (!property.value()->isValueList() || toCSSValueList(property.value())->length() != 1)) {
</del><ins>+ else if (property.id() == CSSPropertyFontFamily && (!is<CSSValueList>(*property.value()) || downcast<CSSValueList>(*property.value()).length() != 1)) {
</ins><span class="cx"> // Unlike font-family property, font-family descriptor in @font-face rule
</span><span class="cx"> // has to be a value list with exactly one family name. It cannot have a
</span><span class="cx"> // have 'initial' value and cannot 'inherit' from parent.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -421,8 +421,8 @@
</span><span class="cx"> } m_value;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSPrimitiveValue, isPrimitiveValue())
+
</ins><span class="cx"> #endif // CSSPrimitiveValue_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSReflectValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSReflectValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSReflectValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSReflectValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -67,8 +67,8 @@
</span><span class="cx"> RefPtr<CSSValue> m_mask;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSReflectValue, isReflectValue())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSReflectValue, isReflectValue())
+
</ins><span class="cx"> #endif // CSSReflectValue_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSShadowValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSShadowValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSShadowValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSShadowValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -62,8 +62,8 @@
</span><span class="cx"> PassRefPtr<CSSPrimitiveValue> color);
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSShadowValue, isShadowValue())
</del><ins>+} // namespace WebCore
</ins><span class="cx">
</span><del>-} // namespace
</del><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSShadowValue, isShadowValue())
</ins><span class="cx">
</span><del>-#endif
</del><ins>+#endif // CSSShadowValue_h
</ins></span></pre></div>
<a id="trunkSourceWebCorecssCSSTimingFunctionValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSTimingFunctionValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSTimingFunctionValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSTimingFunctionValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -63,8 +63,6 @@
</span><span class="cx"> double m_y2;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSCubicBezierTimingFunctionValue, isCubicBezierTimingFunctionValue())
-
</del><span class="cx"> class CSSStepsTimingFunctionValue : public CSSValue {
</span><span class="cx"> public:
</span><span class="cx"> static PassRef<CSSStepsTimingFunctionValue> create(int steps, bool stepAtStart)
</span><span class="lines">@@ -91,8 +89,9 @@
</span><span class="cx"> bool m_stepAtStart;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSStepsTimingFunctionValue, isStepsTimingFunctionValue())
</del><ins>+} // namespace WebCore
</ins><span class="cx">
</span><del>-} // namespace
</del><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSCubicBezierTimingFunctionValue, isCubicBezierTimingFunctionValue())
+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSStepsTimingFunctionValue, isStepsTimingFunctionValue())
</ins><span class="cx">
</span><del>-#endif
</del><ins>+#endif // CSSTimingFunctionValue_h
</ins></span></pre></div>
<a id="trunkSourceWebCorecssCSSToStyleMapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSToStyleMap.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSToStyleMap.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSToStyleMap.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -74,10 +74,10 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- switch (toCSSPrimitiveValue(value)->getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(*value).getValueID()) {
</ins><span class="cx"> case CSSValueFixed:
</span><span class="cx"> layer->setAttachment(FixedBackgroundAttachment);
</span><span class="cx"> break;
</span><span class="lines">@@ -99,11 +99,11 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- layer->setClip(*primitiveValue);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ layer->setClip(primitiveValue);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSToStyleMap::mapFillComposite(CSSPropertyID, FillLayer* layer, CSSValue* value)
</span><span class="lines">@@ -113,11 +113,11 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- layer->setComposite(*primitiveValue);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ layer->setComposite(primitiveValue);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSToStyleMap::mapFillBlendMode(CSSPropertyID, FillLayer* layer, CSSValue* value)
</span><span class="lines">@@ -127,11 +127,11 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- layer->setBlendMode(*primitiveValue);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ layer->setBlendMode(primitiveValue);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSToStyleMap::mapFillOrigin(CSSPropertyID, FillLayer* layer, CSSValue* value)
</span><span class="lines">@@ -141,11 +141,11 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- layer->setOrigin(*primitiveValue);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ layer->setOrigin(primitiveValue);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -166,11 +166,11 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- layer->setRepeatX(*primitiveValue);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ layer->setRepeatX(primitiveValue);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSToStyleMap::mapFillRepeatY(CSSPropertyID, FillLayer* layer, CSSValue* value)
</span><span class="lines">@@ -180,31 +180,31 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- layer->setRepeatY(*primitiveValue);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ layer->setRepeatY(primitiveValue);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSToStyleMap::mapFillSize(CSSPropertyID, FillLayer* layer, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue()) {
</del><ins>+ if (!is<CSSPrimitiveValue>(*value)) {
</ins><span class="cx"> layer->setSizeType(SizeNone);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- if (primitiveValue->getValueID() == CSSValueContain)
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ if (primitiveValue.getValueID() == CSSValueContain)
</ins><span class="cx"> layer->setSizeType(Contain);
</span><del>- else if (primitiveValue->getValueID() == CSSValueCover)
</del><ins>+ else if (primitiveValue.getValueID() == CSSValueCover)
</ins><span class="cx"> layer->setSizeType(Cover);
</span><span class="cx"> else
</span><span class="cx"> layer->setSizeType(SizeLength);
</span><span class="cx">
</span><span class="cx"> LengthSize b = FillLayer::initialFillSizeLength(layer->type());
</span><span class="cx">
</span><del>- if (value->isInitialValue() || primitiveValue->getValueID() == CSSValueContain || primitiveValue->getValueID() == CSSValueCover) {
</del><ins>+ if (value->isInitialValue() || primitiveValue.getValueID() == CSSValueContain || primitiveValue.getValueID() == CSSValueCover) {
</ins><span class="cx"> layer->setSizeLength(b);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -212,13 +212,13 @@
</span><span class="cx"> Length firstLength;
</span><span class="cx"> Length secondLength;
</span><span class="cx">
</span><del>- if (Pair* pair = primitiveValue->getPairValue()) {
</del><ins>+ if (Pair* pair = primitiveValue.getPairValue()) {
</ins><span class="cx"> CSSPrimitiveValue* first = static_cast<CSSPrimitiveValue*>(pair->first());
</span><span class="cx"> CSSPrimitiveValue* second = static_cast<CSSPrimitiveValue*>(pair->second());
</span><span class="cx"> firstLength = first->convertToLength<AnyConversion>(m_resolver->state().cssToLengthConversionData());
</span><span class="cx"> secondLength = second->convertToLength<AnyConversion>(m_resolver->state().cssToLengthConversionData());
</span><span class="cx"> } else {
</span><del>- firstLength = primitiveValue->convertToLength<AnyConversion>(m_resolver->state().cssToLengthConversionData());
</del><ins>+ firstLength = primitiveValue.convertToLength<AnyConversion>(m_resolver->state().cssToLengthConversionData());
</ins><span class="cx"> secondLength = Length();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -237,10 +237,10 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
</del><ins>+ CSSPrimitiveValue* primitiveValue = downcast<CSSPrimitiveValue>(value);
</ins><span class="cx"> Pair* pair = primitiveValue->getPairValue();
</span><span class="cx"> if (pair) {
</span><span class="cx"> ASSERT_UNUSED(propertyID, propertyID == CSSPropertyBackgroundPositionX || propertyID == CSSPropertyWebkitMaskPositionX);
</span><span class="lines">@@ -269,10 +269,10 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
</del><ins>+ CSSPrimitiveValue* primitiveValue = downcast<CSSPrimitiveValue>(value);
</ins><span class="cx"> Pair* pair = primitiveValue->getPairValue();
</span><span class="cx"> if (pair) {
</span><span class="cx"> ASSERT_UNUSED(propertyID, propertyID == CSSPropertyBackgroundPositionY || propertyID == CSSPropertyWebkitMaskPositionY);
</span><span class="lines">@@ -302,11 +302,11 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- switch (primitiveValue->getValueID()) {
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ switch (primitiveValue.getValueID()) {
</ins><span class="cx"> case CSSValueAlpha:
</span><span class="cx"> type = EMaskSourceType::MaskAlpha;
</span><span class="cx"> break;
</span><span class="lines">@@ -329,11 +329,11 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- animation->setDelay(primitiveValue->computeTime<double, CSSPrimitiveValue::Seconds>());
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ animation->setDelay(primitiveValue.computeTime<double, CSSPrimitiveValue::Seconds>());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSToStyleMap::mapAnimationDirection(Animation* layer, CSSValue* value)
</span><span class="lines">@@ -343,11 +343,11 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- switch (primitiveValue->getValueID()) {
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ switch (primitiveValue.getValueID()) {
</ins><span class="cx"> case CSSValueNormal:
</span><span class="cx"> layer->setDirection(Animation::AnimationDirectionNormal);
</span><span class="cx"> break;
</span><span class="lines">@@ -372,11 +372,11 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- animation->setDuration(primitiveValue->computeTime<double, CSSPrimitiveValue::Seconds>());
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ animation->setDuration(primitiveValue.computeTime<double, CSSPrimitiveValue::Seconds>());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSToStyleMap::mapAnimationFillMode(Animation* layer, CSSValue* value)
</span><span class="lines">@@ -386,11 +386,11 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- switch (primitiveValue->getValueID()) {
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ switch (primitiveValue.getValueID()) {
</ins><span class="cx"> case CSSValueNone:
</span><span class="cx"> layer->setFillMode(AnimationFillModeNone);
</span><span class="cx"> break;
</span><span class="lines">@@ -415,14 +415,14 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- if (primitiveValue->getValueID() == CSSValueInfinite)
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ if (primitiveValue.getValueID() == CSSValueInfinite)
</ins><span class="cx"> animation->setIterationCount(Animation::IterationCountInfinite);
</span><span class="cx"> else
</span><del>- animation->setIterationCount(primitiveValue->getFloatValue());
</del><ins>+ animation->setIterationCount(primitiveValue.getFloatValue());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSToStyleMap::mapAnimationName(Animation* layer, CSSValue* value)
</span><span class="lines">@@ -432,14 +432,14 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- if (primitiveValue->getValueID() == CSSValueNone)
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ if (primitiveValue.getValueID() == CSSValueNone)
</ins><span class="cx"> layer->setIsNoneAnimation(true);
</span><span class="cx"> else
</span><del>- layer->setName(primitiveValue->getStringValue());
</del><ins>+ layer->setName(primitiveValue.getStringValue());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSToStyleMap::mapAnimationPlayState(Animation* layer, CSSValue* value)
</span><span class="lines">@@ -449,11 +449,11 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- EAnimPlayState playState = (primitiveValue->getValueID() == CSSValuePaused) ? AnimPlayStatePaused : AnimPlayStatePlaying;
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ EAnimPlayState playState = (primitiveValue.getValueID() == CSSValuePaused) ? AnimPlayStatePaused : AnimPlayStatePlaying;
</ins><span class="cx"> layer->setPlayState(playState);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -465,19 +465,19 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- if (primitiveValue->getValueID() == CSSValueAll) {
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ if (primitiveValue.getValueID() == CSSValueAll) {
</ins><span class="cx"> animation->setAnimationMode(Animation::AnimateAll);
</span><span class="cx"> animation->setProperty(CSSPropertyInvalid);
</span><del>- } else if (primitiveValue->getValueID() == CSSValueNone) {
</del><ins>+ } else if (primitiveValue.getValueID() == CSSValueNone) {
</ins><span class="cx"> animation->setAnimationMode(Animation::AnimateNone);
</span><span class="cx"> animation->setProperty(CSSPropertyInvalid);
</span><span class="cx"> } else {
</span><span class="cx"> animation->setAnimationMode(Animation::AnimateSingleProperty);
</span><del>- animation->setProperty(primitiveValue->getPropertyID());
</del><ins>+ animation->setProperty(primitiveValue.getPropertyID());
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -488,9 +488,9 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (value->isPrimitiveValue()) {
- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- switch (primitiveValue->getValueID()) {
</del><ins>+ if (is<CSSPrimitiveValue>(*value)) {
+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ switch (primitiveValue.getValueID()) {
</ins><span class="cx"> case CSSValueLinear:
</span><span class="cx"> animation->setTimingFunction(LinearTimingFunction::create());
</span><span class="cx"> break;
</span><span class="lines">@@ -518,23 +518,23 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (value->isCubicBezierTimingFunctionValue()) {
- CSSCubicBezierTimingFunctionValue* cubicTimingFunction = toCSSCubicBezierTimingFunctionValue(value);
- animation->setTimingFunction(CubicBezierTimingFunction::create(cubicTimingFunction->x1(), cubicTimingFunction->y1(), cubicTimingFunction->x2(), cubicTimingFunction->y2()));
- } else if (value->isStepsTimingFunctionValue()) {
- CSSStepsTimingFunctionValue* stepsTimingFunction = toCSSStepsTimingFunctionValue(value);
- animation->setTimingFunction(StepsTimingFunction::create(stepsTimingFunction->numberOfSteps(), stepsTimingFunction->stepAtStart()));
</del><ins>+ if (is<CSSCubicBezierTimingFunctionValue>(*value)) {
+ CSSCubicBezierTimingFunctionValue& cubicTimingFunction = downcast<CSSCubicBezierTimingFunctionValue>(*value);
+ animation->setTimingFunction(CubicBezierTimingFunction::create(cubicTimingFunction.x1(), cubicTimingFunction.y1(), cubicTimingFunction.x2(), cubicTimingFunction.y2()));
+ } else if (is<CSSStepsTimingFunctionValue>(*value)) {
+ CSSStepsTimingFunctionValue& stepsTimingFunction = downcast<CSSStepsTimingFunctionValue>(*value);
+ animation->setTimingFunction(StepsTimingFunction::create(stepsTimingFunction.numberOfSteps(), stepsTimingFunction.stepAtStart()));
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSToStyleMap::mapNinePieceImage(CSSPropertyID property, CSSValue* value, NinePieceImage& image)
</span><span class="cx"> {
</span><span class="cx"> // If we're not a value list, then we are "none" and don't need to alter the empty image at all.
</span><del>- if (!value || !value->isValueList())
</del><ins>+ if (!is<CSSValueList>(value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // Retrieve the border image value.
</span><del>- CSSValueList* borderImage = toCSSValueList(value);
</del><ins>+ CSSValueList& borderImage = downcast<CSSValueList>(*value);
</ins><span class="cx">
</span><span class="cx"> // Set the image (this kicks off the load).
</span><span class="cx"> CSSPropertyID imageProperty;
</span><span class="lines">@@ -545,8 +545,8 @@
</span><span class="cx"> else
</span><span class="cx"> imageProperty = property;
</span><span class="cx">
</span><del>- for (unsigned i = 0 ; i < borderImage->length() ; ++i) {
- CSSValue* current = borderImage->item(i);
</del><ins>+ for (unsigned i = 0 ; i < borderImage.length(); ++i) {
+ CSSValue* current = borderImage.item(i);
</ins><span class="cx">
</span><span class="cx"> if (current->isImageValue() || current->isImageGeneratorValue()
</span><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><span class="lines">@@ -556,19 +556,19 @@
</span><span class="cx"> image.setImage(styleImage(imageProperty, current));
</span><span class="cx"> else if (current->isBorderImageSliceValue())
</span><span class="cx"> mapNinePieceImageSlice(current, image);
</span><del>- else if (current->isValueList()) {
- CSSValueList* slashList = toCSSValueList(current);
</del><ins>+ else if (is<CSSValueList>(*current)) {
+ CSSValueList& slashList = downcast<CSSValueList>(*current);
</ins><span class="cx"> // Map in the image slices.
</span><del>- if (slashList->item(0) && slashList->item(0)->isBorderImageSliceValue())
- mapNinePieceImageSlice(slashList->item(0), image);
</del><ins>+ if (slashList.item(0) && slashList.item(0)->isBorderImageSliceValue())
+ mapNinePieceImageSlice(slashList.item(0), image);
</ins><span class="cx">
</span><span class="cx"> // Map in the border slices.
</span><del>- if (slashList->item(1))
- image.setBorderSlices(mapNinePieceImageQuad(slashList->item(1)));
</del><ins>+ if (slashList.item(1))
+ image.setBorderSlices(mapNinePieceImageQuad(slashList.item(1)));
</ins><span class="cx">
</span><span class="cx"> // Map in the outset.
</span><del>- if (slashList->item(2))
- image.setOutset(mapNinePieceImageQuad(slashList->item(2)));
</del><ins>+ if (slashList.item(2))
+ image.setOutset(mapNinePieceImageQuad(slashList.item(2)));
</ins><span class="cx"> } else if (current->isPrimitiveValue()) {
</span><span class="cx"> // Set the appropriate rules for stretch/round/repeat of the slices.
</span><span class="cx"> mapNinePieceImageRepeat(current, image);
</span><span class="lines">@@ -592,15 +592,15 @@
</span><span class="cx">
</span><span class="cx"> void CSSToStyleMap::mapNinePieceImageSlice(CSSValue* value, NinePieceImage& image)
</span><span class="cx"> {
</span><del>- if (!value || !value->isBorderImageSliceValue())
</del><ins>+ if (!is<CSSBorderImageSliceValue>(value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // Retrieve the border image value.
</span><del>- CSSBorderImageSliceValue* borderImageSlice = toCSSBorderImageSliceValue(value);
</del><ins>+ CSSBorderImageSliceValue& borderImageSlice = downcast<CSSBorderImageSliceValue>(*value);
</ins><span class="cx">
</span><span class="cx"> // Set up a length box to represent our image slices.
</span><span class="cx"> LengthBox box;
</span><del>- Quad* slices = borderImageSlice->slices();
</del><ins>+ Quad* slices = borderImageSlice.slices();
</ins><span class="cx"> if (slices->top()->isPercentage())
</span><span class="cx"> box.m_top = Length(slices->top()->getDoubleValue(), Percent);
</span><span class="cx"> else
</span><span class="lines">@@ -620,23 +620,23 @@
</span><span class="cx"> image.setImageSlices(box);
</span><span class="cx">
</span><span class="cx"> // Set our fill mode.
</span><del>- image.setFill(borderImageSlice->m_fill);
</del><ins>+ image.setFill(borderImageSlice.m_fill);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> LengthBox CSSToStyleMap::mapNinePieceImageQuad(CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value || !value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(value))
</ins><span class="cx"> return LengthBox();
</span><span class="cx">
</span><span class="cx"> // Get our zoom value.
</span><span class="cx"> CSSToLengthConversionData conversionData = useSVGZoomRules() ? m_resolver->state().cssToLengthConversionData().copyWithAdjustedZoom(1.0f) : m_resolver->state().cssToLengthConversionData();
</span><span class="cx">
</span><span class="cx"> // Retrieve the primitive value.
</span><del>- CSSPrimitiveValue* borderWidths = toCSSPrimitiveValue(value);
</del><ins>+ CSSPrimitiveValue& borderWidths = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx">
</span><span class="cx"> // Set up a length box to represent our image slices.
</span><span class="cx"> LengthBox box; // Defaults to 'auto' so we don't have to handle that explicitly below.
</span><del>- Quad* slices = borderWidths->getQuadValue();
</del><ins>+ Quad* slices = borderWidths.getQuadValue();
</ins><span class="cx"> if (slices->top()->isNumber())
</span><span class="cx"> box.m_top = Length(slices->top()->getIntValue(), Relative);
</span><span class="cx"> else if (slices->top()->isPercentage())
</span><span class="lines">@@ -670,11 +670,11 @@
</span><span class="cx">
</span><span class="cx"> void CSSToStyleMap::mapNinePieceImageRepeat(CSSValue* value, NinePieceImage& image)
</span><span class="cx"> {
</span><del>- if (!value || !value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- Pair* pair = primitiveValue->getPairValue();
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ Pair* pair = primitiveValue.getPairValue();
</ins><span class="cx"> if (!pair || !pair->first() || !pair->second())
</span><span class="cx"> return;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSUnicodeRangeValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSUnicodeRangeValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSUnicodeRangeValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSUnicodeRangeValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -57,8 +57,8 @@
</span><span class="cx"> UChar32 m_to;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSUnicodeRangeValue, isUnicodeRangeValue())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSUnicodeRangeValue, isUnicodeRangeValue())
+
</ins><span class="cx"> #endif // CSSUnicodeRangeValue_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValue.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValue.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSValue.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx">
</span><span class="cx"> bool CSSValue::isImplicitInitialValue() const
</span><span class="cx"> {
</span><del>- return m_classType == InitialClass && toCSSInitialValue(this)->isImplicit();
</del><ins>+ return m_classType == InitialClass && downcast<CSSInitialValue>(*this).isImplicit();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> CSSValue::Type CSSValue::cssValueType() const
</span><span class="lines">@@ -112,14 +112,14 @@
</span><span class="cx"> // This should get called for internal instances only.
</span><span class="cx"> ASSERT(!isCSSOMSafe());
</span><span class="cx">
</span><del>- if (isPrimitiveValue())
- toCSSPrimitiveValue(this)->addSubresourceStyleURLs(urls, styleSheet);
- else if (isValueList())
- toCSSValueList(this)->addSubresourceStyleURLs(urls, styleSheet);
- else if (classType() == FontFaceSrcClass)
- toCSSFontFaceSrcValue(this)->addSubresourceStyleURLs(urls, styleSheet);
- else if (classType() == ReflectClass)
- toCSSReflectValue(this)->addSubresourceStyleURLs(urls, styleSheet);
</del><ins>+ if (is<CSSPrimitiveValue>(*this))
+ downcast<CSSPrimitiveValue>(*this).addSubresourceStyleURLs(urls, styleSheet);
+ else if (is<CSSValueList>(*this))
+ downcast<CSSValueList>(*this).addSubresourceStyleURLs(urls, styleSheet);
+ else if (is<CSSFontFaceSrcValue>(*this))
+ downcast<CSSFontFaceSrcValue>(*this).addSubresourceStyleURLs(urls, styleSheet);
+ else if (is<CSSReflectValue>(*this))
+ downcast<CSSReflectValue>(*this).addSubresourceStyleURLs(urls, styleSheet);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSValue::hasFailedOrCanceledSubresources() const
</span><span class="lines">@@ -127,19 +127,19 @@
</span><span class="cx"> // This should get called for internal instances only.
</span><span class="cx"> ASSERT(!isCSSOMSafe());
</span><span class="cx">
</span><del>- if (isValueList())
- return toCSSValueList(this)->hasFailedOrCanceledSubresources();
- if (classType() == FontFaceSrcClass)
- return toCSSFontFaceSrcValue(this)->hasFailedOrCanceledSubresources();
- if (classType() == ImageClass)
- return toCSSImageValue(this)->hasFailedOrCanceledSubresources();
- if (classType() == CrossfadeClass)
- return toCSSCrossfadeValue(this)->hasFailedOrCanceledSubresources();
- if (classType() == FilterImageClass)
- return toCSSFilterImageValue(this)->hasFailedOrCanceledSubresources();
</del><ins>+ if (is<CSSValueList>(*this))
+ return downcast<CSSValueList>(*this).hasFailedOrCanceledSubresources();
+ if (is<CSSFontFaceSrcValue>(*this))
+ return downcast<CSSFontFaceSrcValue>(*this).hasFailedOrCanceledSubresources();
+ if (is<CSSImageValue>(*this))
+ return downcast<CSSImageValue>(*this).hasFailedOrCanceledSubresources();
+ if (is<CSSCrossfadeValue>(*this))
+ return downcast<CSSCrossfadeValue>(*this).hasFailedOrCanceledSubresources();
+ if (is<CSSFilterImageValue>(*this))
+ return downcast<CSSFilterImageValue>(*this).hasFailedOrCanceledSubresources();
</ins><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><del>- if (classType() == ImageSetClass)
- return toCSSImageSetValue(this)->hasFailedOrCanceledSubresources();
</del><ins>+ if (is<CSSImageSetValue>(*this))
+ return downcast<CSSImageSetValue>(*this).hasFailedOrCanceledSubresources();
</ins><span class="cx"> #endif
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="lines">@@ -229,9 +229,9 @@
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><del>- } else if (m_classType == ValueListClass && other.m_classType != ValueListClass)
- return toCSSValueList(this)->equals(other);
- else if (m_classType != ValueListClass && other.m_classType == ValueListClass)
</del><ins>+ } else if (is<CSSValueList>(*this) && !is<CSSValueList>(other))
+ return downcast<CSSValueList>(*this).equals(other);
+ else if (!is<CSSValueList>(*this) && is<CSSValueList>(other))
</ins><span class="cx"> return static_cast<const CSSValueList&>(other).equals(*this);
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="lines">@@ -246,71 +246,71 @@
</span><span class="cx">
</span><span class="cx"> switch (classType()) {
</span><span class="cx"> case AspectRatioClass:
</span><del>- return toCSSAspectRatioValue(this)->customCSSText();
</del><ins>+ return downcast<CSSAspectRatioValue>(*this).customCSSText();
</ins><span class="cx"> case BorderImageSliceClass:
</span><del>- return toCSSBorderImageSliceValue(this)->customCSSText();
</del><ins>+ return downcast<CSSBorderImageSliceValue>(*this).customCSSText();
</ins><span class="cx"> case CanvasClass:
</span><del>- return toCSSCanvasValue(this)->customCSSText();
</del><ins>+ return downcast<CSSCanvasValue>(*this).customCSSText();
</ins><span class="cx"> case CursorImageClass:
</span><del>- return toCSSCursorImageValue(this)->customCSSText();
</del><ins>+ return downcast<CSSCursorImageValue>(*this).customCSSText();
</ins><span class="cx"> case FilterImageClass:
</span><del>- return toCSSFilterImageValue(this)->customCSSText();
</del><ins>+ return downcast<CSSFilterImageValue>(*this).customCSSText();
</ins><span class="cx"> case FontClass:
</span><del>- return toCSSFontValue(this)->customCSSText();
</del><ins>+ return downcast<CSSFontValue>(*this).customCSSText();
</ins><span class="cx"> case FontFaceSrcClass:
</span><del>- return toCSSFontFaceSrcValue(this)->customCSSText();
</del><ins>+ return downcast<CSSFontFaceSrcValue>(*this).customCSSText();
</ins><span class="cx"> case FontFeatureClass:
</span><del>- return toCSSFontFeatureValue(this)->customCSSText();
</del><ins>+ return downcast<CSSFontFeatureValue>(*this).customCSSText();
</ins><span class="cx"> case FunctionClass:
</span><del>- return toCSSFunctionValue(this)->customCSSText();
</del><ins>+ return downcast<CSSFunctionValue>(*this).customCSSText();
</ins><span class="cx"> case LinearGradientClass:
</span><del>- return toCSSLinearGradientValue(this)->customCSSText();
</del><ins>+ return downcast<CSSLinearGradientValue>(*this).customCSSText();
</ins><span class="cx"> case RadialGradientClass:
</span><del>- return toCSSRadialGradientValue(this)->customCSSText();
</del><ins>+ return downcast<CSSRadialGradientValue>(*this).customCSSText();
</ins><span class="cx"> case CrossfadeClass:
</span><del>- return toCSSCrossfadeValue(this)->customCSSText();
</del><ins>+ return downcast<CSSCrossfadeValue>(*this).customCSSText();
</ins><span class="cx"> case ImageClass:
</span><del>- return toCSSImageValue(this)->customCSSText();
</del><ins>+ return downcast<CSSImageValue>(*this).customCSSText();
</ins><span class="cx"> case InheritedClass:
</span><del>- return toCSSInheritedValue(this)->customCSSText();
</del><ins>+ return downcast<CSSInheritedValue>(*this).customCSSText();
</ins><span class="cx"> case InitialClass:
</span><del>- return toCSSInitialValue(this)->customCSSText();
</del><ins>+ return downcast<CSSInitialValue>(*this).customCSSText();
</ins><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><span class="cx"> case GridLineNamesClass:
</span><del>- return toCSSGridLineNamesValue(this)->customCSSText();
</del><ins>+ return downcast<CSSGridLineNamesValue>(*this).customCSSText();
</ins><span class="cx"> case GridTemplateAreasClass:
</span><del>- return toCSSGridTemplateAreasValue(this)->customCSSText();
</del><ins>+ return downcast<CSSGridTemplateAreasValue>(*this).customCSSText();
</ins><span class="cx"> #endif
</span><span class="cx"> case PrimitiveClass:
</span><del>- return toCSSPrimitiveValue(this)->customCSSText();
</del><ins>+ return downcast<CSSPrimitiveValue>(*this).customCSSText();
</ins><span class="cx"> case ReflectClass:
</span><del>- return toCSSReflectValue(this)->customCSSText();
</del><ins>+ return downcast<CSSReflectValue>(*this).customCSSText();
</ins><span class="cx"> case ShadowClass:
</span><del>- return toCSSShadowValue(this)->customCSSText();
</del><ins>+ return downcast<CSSShadowValue>(*this).customCSSText();
</ins><span class="cx"> case CubicBezierTimingFunctionClass:
</span><del>- return toCSSCubicBezierTimingFunctionValue(this)->customCSSText();
</del><ins>+ return downcast<CSSCubicBezierTimingFunctionValue>(*this).customCSSText();
</ins><span class="cx"> case StepsTimingFunctionClass:
</span><del>- return toCSSStepsTimingFunctionValue(this)->customCSSText();
</del><ins>+ return downcast<CSSStepsTimingFunctionValue>(*this).customCSSText();
</ins><span class="cx"> case UnicodeRangeClass:
</span><del>- return toCSSUnicodeRangeValue(this)->customCSSText();
</del><ins>+ return downcast<CSSUnicodeRangeValue>(*this).customCSSText();
</ins><span class="cx"> case ValueListClass:
</span><del>- return toCSSValueList(this)->customCSSText();
</del><ins>+ return downcast<CSSValueList>(*this).customCSSText();
</ins><span class="cx"> case WebKitCSSTransformClass:
</span><del>- return toWebKitCSSTransformValue(this)->customCSSText();
</del><ins>+ return downcast<WebKitCSSTransformValue>(*this).customCSSText();
</ins><span class="cx"> case LineBoxContainClass:
</span><del>- return toCSSLineBoxContainValue(this)->customCSSText();
</del><ins>+ return downcast<CSSLineBoxContainValue>(*this).customCSSText();
</ins><span class="cx"> case CalculationClass:
</span><del>- return toCSSCalcValue(this)->customCSSText();
</del><ins>+ return downcast<CSSCalcValue>(*this).customCSSText();
</ins><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><span class="cx"> case ImageSetClass:
</span><del>- return toCSSImageSetValue(this)->customCSSText();
</del><ins>+ return downcast<CSSImageSetValue>(*this).customCSSText();
</ins><span class="cx"> #endif
</span><span class="cx"> case WebKitCSSFilterClass:
</span><del>- return toWebKitCSSFilterValue(this)->customCSSText();
</del><ins>+ return downcast<WebKitCSSFilterValue>(*this).customCSSText();
</ins><span class="cx"> case SVGColorClass:
</span><del>- return toSVGColor(this)->customCSSText();
</del><ins>+ return downcast<SVGColor>(*this).customCSSText();
</ins><span class="cx"> case SVGPaintClass:
</span><del>- return toSVGPaint(this)->customCSSText();
</del><ins>+ return downcast<SVGPaint>(*this).customCSSText();
</ins><span class="cx"> }
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return String();
</span><span class="lines">@@ -327,101 +327,101 @@
</span><span class="cx">
</span><span class="cx"> switch (classType()) {
</span><span class="cx"> case AspectRatioClass:
</span><del>- delete toCSSAspectRatioValue(this);
</del><ins>+ delete downcast<CSSAspectRatioValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case BorderImageSliceClass:
</span><del>- delete toCSSBorderImageSliceValue(this);
</del><ins>+ delete downcast<CSSBorderImageSliceValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case CanvasClass:
</span><del>- delete toCSSCanvasValue(this);
</del><ins>+ delete downcast<CSSCanvasValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case CursorImageClass:
</span><del>- delete toCSSCursorImageValue(this);
</del><ins>+ delete downcast<CSSCursorImageValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case FontClass:
</span><del>- delete toCSSFontValue(this);
</del><ins>+ delete downcast<CSSFontValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case FontFaceSrcClass:
</span><del>- delete toCSSFontFaceSrcValue(this);
</del><ins>+ delete downcast<CSSFontFaceSrcValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case FontFeatureClass:
</span><del>- delete toCSSFontFeatureValue(this);
</del><ins>+ delete downcast<CSSFontFeatureValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case FunctionClass:
</span><del>- delete toCSSFunctionValue(this);
</del><ins>+ delete downcast<CSSFunctionValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case LinearGradientClass:
</span><del>- delete toCSSLinearGradientValue(this);
</del><ins>+ delete downcast<CSSLinearGradientValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case RadialGradientClass:
</span><del>- delete toCSSRadialGradientValue(this);
</del><ins>+ delete downcast<CSSRadialGradientValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case CrossfadeClass:
</span><del>- delete toCSSCrossfadeValue(this);
</del><ins>+ delete downcast<CSSCrossfadeValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case ImageClass:
</span><del>- delete toCSSImageValue(this);
</del><ins>+ delete downcast<CSSImageValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case InheritedClass:
</span><del>- delete toCSSInheritedValue(this);
</del><ins>+ delete downcast<CSSInheritedValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case InitialClass:
</span><del>- delete toCSSInitialValue(this);
</del><ins>+ delete downcast<CSSInitialValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><span class="cx"> case GridLineNamesClass:
</span><del>- delete toCSSGridLineNamesValue(this);
</del><ins>+ delete downcast<CSSGridLineNamesValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case GridTemplateAreasClass:
</span><del>- delete toCSSGridTemplateAreasValue(this);
</del><ins>+ delete downcast<CSSGridTemplateAreasValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> #endif
</span><span class="cx"> case PrimitiveClass:
</span><del>- delete toCSSPrimitiveValue(this);
</del><ins>+ delete downcast<CSSPrimitiveValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case ReflectClass:
</span><del>- delete toCSSReflectValue(this);
</del><ins>+ delete downcast<CSSReflectValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case ShadowClass:
</span><del>- delete toCSSShadowValue(this);
</del><ins>+ delete downcast<CSSShadowValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case CubicBezierTimingFunctionClass:
</span><del>- delete toCSSCubicBezierTimingFunctionValue(this);
</del><ins>+ delete downcast<CSSCubicBezierTimingFunctionValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case StepsTimingFunctionClass:
</span><del>- delete toCSSStepsTimingFunctionValue(this);
</del><ins>+ delete downcast<CSSStepsTimingFunctionValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case UnicodeRangeClass:
</span><del>- delete toCSSUnicodeRangeValue(this);
</del><ins>+ delete downcast<CSSUnicodeRangeValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case ValueListClass:
</span><del>- delete toCSSValueList(this);
</del><ins>+ delete downcast<CSSValueList>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case WebKitCSSTransformClass:
</span><del>- delete toWebKitCSSTransformValue(this);
</del><ins>+ delete downcast<WebKitCSSTransformValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case LineBoxContainClass:
</span><del>- delete toCSSLineBoxContainValue(this);
</del><ins>+ delete downcast<CSSLineBoxContainValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case CalculationClass:
</span><del>- delete toCSSCalcValue(this);
</del><ins>+ delete downcast<CSSCalcValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><span class="cx"> case ImageSetClass:
</span><del>- delete toCSSImageSetValue(this);
</del><ins>+ delete downcast<CSSImageSetValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> #endif
</span><span class="cx"> case FilterImageClass:
</span><del>- delete toCSSFilterImageValue(this);
</del><ins>+ delete downcast<CSSFilterImageValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case WebKitCSSFilterClass:
</span><del>- delete toWebKitCSSFilterValue(this);
</del><ins>+ delete downcast<WebKitCSSFilterValue>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case SVGColorClass:
</span><del>- delete toSVGColor(this);
</del><ins>+ delete downcast<SVGColor>(this);
</ins><span class="cx"> return;
</span><span class="cx"> case SVGPaintClass:
</span><del>- delete toSVGPaint(this);
</del><ins>+ delete downcast<SVGPaint>(this);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="lines">@@ -431,24 +431,24 @@
</span><span class="cx"> {
</span><span class="cx"> switch (classType()) {
</span><span class="cx"> case PrimitiveClass:
</span><del>- return toCSSPrimitiveValue(this)->cloneForCSSOM();
</del><ins>+ return downcast<CSSPrimitiveValue>(*this).cloneForCSSOM();
</ins><span class="cx"> case ValueListClass:
</span><del>- return toCSSValueList(this)->cloneForCSSOM();
</del><ins>+ return downcast<CSSValueList>(*this).cloneForCSSOM();
</ins><span class="cx"> case ImageClass:
</span><span class="cx"> case CursorImageClass:
</span><del>- return toCSSImageValue(this)->cloneForCSSOM();
</del><ins>+ return downcast<CSSImageValue>(*this).cloneForCSSOM();
</ins><span class="cx"> case WebKitCSSFilterClass:
</span><del>- return toWebKitCSSFilterValue(this)->cloneForCSSOM();
</del><ins>+ return downcast<WebKitCSSFilterValue>(*this).cloneForCSSOM();
</ins><span class="cx"> case WebKitCSSTransformClass:
</span><del>- return toWebKitCSSTransformValue(this)->cloneForCSSOM();
</del><ins>+ return downcast<WebKitCSSTransformValue>(*this).cloneForCSSOM();
</ins><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><span class="cx"> case ImageSetClass:
</span><del>- return toCSSImageSetValue(this)->cloneForCSSOM();
</del><ins>+ return downcast<CSSImageSetValue>(*this).cloneForCSSOM();
</ins><span class="cx"> #endif
</span><span class="cx"> case SVGColorClass:
</span><del>- return toSVGColor(this)->cloneForCSSOM();
</del><ins>+ return downcast<SVGColor>(*this).cloneForCSSOM();
</ins><span class="cx"> case SVGPaintClass:
</span><del>- return toSVGPaint(this)->cloneForCSSOM();
</del><ins>+ return downcast<SVGPaint>(*this).cloneForCSSOM();
</ins><span class="cx"> default:
</span><span class="cx"> ASSERT(!isSubtypeExposedToCSSOM());
</span><span class="cx"> return TextCloneCSSValue::create(classType(), cssText());
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #include <wtf/ListHashSet.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><ins>+#include <wtf/TypeCasts.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -249,9 +250,11 @@
</span><span class="cx"> return first.get().equals(second.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#define CSS_VALUE_TYPE_CASTS(ToValueTypeName, predicate) \
- TYPE_CASTS_BASE(ToValueTypeName, CSSValue, value, value->predicate, value.predicate)
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+#define SPECIALIZE_TYPE_TRAITS_CSS_VALUE(ToValueTypeName, predicate) \
+SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::ToValueTypeName) \
+ static bool isType(const WebCore::CSSValue& value) { return value.predicate; } \
+SPECIALIZE_TYPE_TRAITS_END()
+
</ins><span class="cx"> #endif // CSSValue_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueList.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValueList.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/CSSValueList.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -81,8 +81,6 @@
</span><span class="cx"> Vector<Ref<CSSValue>, 4> m_values;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(CSSValueList, isValueList())
-
</del><span class="cx"> inline void CSSValueList::append(PassRef<CSSValue> value)
</span><span class="cx"> {
</span><span class="cx"> m_values.append(WTF::move(value));
</span><span class="lines">@@ -97,7 +95,11 @@
</span><span class="cx"> // Please take care not to pass these around as they do hold onto a raw pointer.
</span><span class="cx"> class CSSValueListInspector {
</span><span class="cx"> public:
</span><del>- CSSValueListInspector(CSSValue* value) : m_list((value && value->isValueList()) ? toCSSValueList(value) : 0) { }
</del><ins>+ CSSValueListInspector(CSSValue* value)
+ : m_list(is<CSSValueList>(value) ? downcast<CSSValueList>(value) : nullptr)
+ {
+ }
+
</ins><span class="cx"> CSSValue* item(size_t index) const { ASSERT_WITH_SECURITY_IMPLICATION(index < length()); return m_list->itemWithoutBoundsCheck(index); }
</span><span class="cx"> CSSValue* first() const { return item(0); }
</span><span class="cx"> CSSValue* second() const { return item(1); }
</span><span class="lines">@@ -123,4 +125,6 @@
</span><span class="cx"> };
</span><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSValueList, isValueList())
+
</ins><span class="cx"> #endif // CSSValueList_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssDeprecatedStyleBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include "CSSAspectRatioValue.h"
</span><span class="cx"> #include "CSSCalculationValue.h"
</span><span class="cx"> #include "CSSCursorImageValue.h"
</span><ins>+#include "CSSImageSetValue.h"
</ins><span class="cx"> #include "CSSPrimitiveValue.h"
</span><span class="cx"> #include "CSSPrimitiveValueMappings.h"
</span><span class="cx"> #include "CSSToStyleMap.h"
</span><span class="lines">@@ -149,8 +150,8 @@
</span><span class="cx"> static void setValue(RenderStyle* style, SetterType value) { (style->*setterFunction)(value); }
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (value->isPrimitiveValue())
- setValue(styleResolver->style(), *toCSSPrimitiveValue(value));
</del><ins>+ if (is<CSSPrimitiveValue>(*value))
+ setValue(styleResolver->style(), downcast<CSSPrimitiveValue>(*value));
</ins><span class="cx"> }
</span><span class="cx"> static PropertyHandler createHandler()
</span><span class="cx"> {
</span><span class="lines">@@ -165,14 +166,14 @@
</span><span class="cx"> static void setValue(RenderStyle* style, NumberType value) { (style->*setterFunction)(value); }
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- if (primitiveValue->getValueID() == idMapsToMinusOne)
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ if (primitiveValue.getValueID() == idMapsToMinusOne)
</ins><span class="cx"> setValue(styleResolver->style(), -1);
</span><span class="cx"> else
</span><del>- setValue(styleResolver->style(), primitiveValue->getValue<NumberType>(CSSPrimitiveValue::CSS_NUMBER));
</del><ins>+ setValue(styleResolver->style(), primitiveValue.getValue<NumberType>(CSSPrimitiveValue::CSS_NUMBER));
</ins><span class="cx"> }
</span><span class="cx"> static PropertyHandler createHandler()
</span><span class="cx"> {
</span><span class="lines">@@ -213,16 +214,16 @@
</span><span class="cx">
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- if (primitiveValue->getValueID() == autoIdentity)
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ if (primitiveValue.getValueID() == autoIdentity)
</ins><span class="cx"> setAuto(styleResolver->style());
</span><span class="cx"> else if (valueType == Number)
</span><del>- setValue(styleResolver->style(), *primitiveValue);
</del><ins>+ setValue(styleResolver->style(), primitiveValue);
</ins><span class="cx"> else if (valueType == ComputeLength)
</span><del>- setValue(styleResolver->style(), primitiveValue->computeLength<T>(styleResolver->state().cssToLengthConversionData()));
</del><ins>+ setValue(styleResolver->style(), primitiveValue.computeLength<T>(styleResolver->state().cssToLengthConversionData()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
</span><span class="lines">@@ -252,19 +253,19 @@
</span><span class="cx">
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx">
</span><del>- if (Rect* rect = primitiveValue->getRectValue()) {
</del><ins>+ if (Rect* rect = primitiveValue.getRectValue()) {
</ins><span class="cx"> Length top = convertToLength(styleResolver, rect->top());
</span><span class="cx"> Length right = convertToLength(styleResolver, rect->right());
</span><span class="cx"> Length bottom = convertToLength(styleResolver, rect->bottom());
</span><span class="cx"> Length left = convertToLength(styleResolver, rect->left());
</span><span class="cx"> styleResolver->style()->setClip(top, right, bottom, left);
</span><span class="cx"> styleResolver->style()->setHasClip(true);
</span><del>- } else if (primitiveValue->getValueID() == CSSValueAuto) {
</del><ins>+ } else if (primitiveValue.getValueID() == CSSValueAuto) {
</ins><span class="cx"> styleResolver->style()->setClip(Length(), Length(), Length(), Length());
</span><span class="cx"> styleResolver->style()->setHasClip(false);
</span><span class="cx"> }
</span><span class="lines">@@ -298,17 +299,17 @@
</span><span class="cx">
</span><span class="cx"> static void applyValue(CSSPropertyID propertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- if (inheritColorFromParent && primitiveValue->getValueID() == CSSValueCurrentcolor)
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ if (inheritColorFromParent && primitiveValue.getValueID() == CSSValueCurrentcolor)
</ins><span class="cx"> applyInheritValue(propertyID, styleResolver);
</span><span class="cx"> else {
</span><span class="cx"> if (styleResolver->applyPropertyToRegularStyle())
</span><del>- (styleResolver->style()->*setterFunction)(styleResolver->colorFromPrimitiveValue(primitiveValue));
</del><ins>+ (styleResolver->style()->*setterFunction)(styleResolver->colorFromPrimitiveValue(&primitiveValue));
</ins><span class="cx"> if (styleResolver->applyPropertyToVisitedLinkStyle())
</span><del>- (styleResolver->style()->*visitedLinkSetterFunction)(styleResolver->colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true));
</del><ins>+ (styleResolver->style()->*visitedLinkSetterFunction)(styleResolver->colorFromPrimitiveValue(&primitiveValue, /* forVisitedLink */ true));
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -359,46 +360,46 @@
</span><span class="cx"> static void setValue(RenderStyle* style, Length value) { (style->*setterFunction)(WTF::move(value)); }
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- if (noneEnabled && primitiveValue->getValueID() == CSSValueNone) {
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ if (noneEnabled && primitiveValue.getValueID() == CSSValueNone) {
</ins><span class="cx"> if (noneUndefined)
</span><span class="cx"> setValue(styleResolver->style(), Length(Undefined));
</span><span class="cx"> else
</span><span class="cx"> setValue(styleResolver->style(), Length());
</span><span class="cx"> }
</span><span class="cx"> if (legacyIntrinsicEnabled) {
</span><del>- if (primitiveValue->getValueID() == CSSValueIntrinsic)
</del><ins>+ if (primitiveValue.getValueID() == CSSValueIntrinsic)
</ins><span class="cx"> setValue(styleResolver->style(), Length(Intrinsic));
</span><del>- else if (primitiveValue->getValueID() == CSSValueMinIntrinsic)
</del><ins>+ else if (primitiveValue.getValueID() == CSSValueMinIntrinsic)
</ins><span class="cx"> setValue(styleResolver->style(), Length(MinIntrinsic));
</span><span class="cx"> }
</span><span class="cx"> if (intrinsicEnabled) {
</span><del>- if (primitiveValue->getValueID() == CSSValueWebkitMinContent)
</del><ins>+ if (primitiveValue.getValueID() == CSSValueWebkitMinContent)
</ins><span class="cx"> setValue(styleResolver->style(), Length(MinContent));
</span><del>- else if (primitiveValue->getValueID() == CSSValueWebkitMaxContent)
</del><ins>+ else if (primitiveValue.getValueID() == CSSValueWebkitMaxContent)
</ins><span class="cx"> setValue(styleResolver->style(), Length(MaxContent));
</span><del>- else if (primitiveValue->getValueID() == CSSValueWebkitFillAvailable)
</del><ins>+ else if (primitiveValue.getValueID() == CSSValueWebkitFillAvailable)
</ins><span class="cx"> setValue(styleResolver->style(), Length(FillAvailable));
</span><del>- else if (primitiveValue->getValueID() == CSSValueWebkitFitContent)
</del><ins>+ else if (primitiveValue.getValueID() == CSSValueWebkitFitContent)
</ins><span class="cx"> setValue(styleResolver->style(), Length(FitContent));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> CSSToLengthConversionData conversionData = styleResolver->useSVGZoomRulesForLength() ?
</span><span class="cx"> styleResolver->state().cssToLengthConversionData().copyWithAdjustedZoom(1.0f)
</span><span class="cx"> : styleResolver->state().cssToLengthConversionData();
</span><del>- if (autoEnabled && primitiveValue->getValueID() == CSSValueAuto)
</del><ins>+ if (autoEnabled && primitiveValue.getValueID() == CSSValueAuto)
</ins><span class="cx"> setValue(styleResolver->style(), Length());
</span><del>- else if (primitiveValue->isLength()) {
- Length length = primitiveValue->computeLength<Length>(conversionData);
- length.setHasQuirk(primitiveValue->isQuirkValue());
</del><ins>+ else if (primitiveValue.isLength()) {
+ Length length = primitiveValue.computeLength<Length>(conversionData);
+ length.setHasQuirk(primitiveValue.isQuirkValue());
</ins><span class="cx"> setValue(styleResolver->style(), length);
</span><del>- } else if (primitiveValue->isPercentage())
- setValue(styleResolver->style(), Length(primitiveValue->getDoubleValue(), Percent));
- else if (primitiveValue->isCalculatedPercentageWithLength())
- setValue(styleResolver->style(), Length(primitiveValue->cssCalcValue()->createCalculationValue(conversionData)));
</del><ins>+ } else if (primitiveValue.isPercentage())
+ setValue(styleResolver->style(), Length(primitiveValue.getDoubleValue(), Percent));
+ else if (primitiveValue.isCalculatedPercentageWithLength())
+ setValue(styleResolver->style(), Length(primitiveValue.cssCalcValue()->createCalculationValue(conversionData)));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static PropertyHandler createHandler()
</span><span class="lines">@@ -415,14 +416,14 @@
</span><span class="cx"> static void setValue(RenderStyle* style, const AtomicString& value) { (style->*setterFunction)(value); }
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- if ((identBehavior == MapNoneToNull && primitiveValue->getValueID() == CSSValueNone)
- || (identBehavior == MapAutoToNull && primitiveValue->getValueID() == CSSValueAuto))
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ if ((identBehavior == MapNoneToNull && primitiveValue.getValueID() == CSSValueNone)
+ || (identBehavior == MapAutoToNull && primitiveValue.getValueID() == CSSValueAuto))
</ins><span class="cx"> setValue(styleResolver->style(), nullAtom);
</span><span class="cx"> else
</span><del>- setValue(styleResolver->style(), primitiveValue->getStringValue());
</del><ins>+ setValue(styleResolver->style(), primitiveValue.getStringValue());
</ins><span class="cx"> }
</span><span class="cx"> static PropertyHandler createHandler()
</span><span class="cx"> {
</span><span class="lines">@@ -437,11 +438,11 @@
</span><span class="cx"> static void setValue(RenderStyle* style, LengthSize value) { (style->*setterFunction)(WTF::move(value)); }
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- Pair* pair = primitiveValue->getPairValue();
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ Pair* pair = primitiveValue.getPairValue();
</ins><span class="cx"> if (!pair || !pair->first() || !pair->second())
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -552,13 +553,13 @@
</span><span class="cx"> {
</span><span class="cx"> FillLayer* child = (styleResolver->style()->*accessLayersFunction)();
</span><span class="cx"> FillLayer* previousChild = nullptr;
</span><del>- if (value->isValueList()
</del><ins>+ if (is<CSSValueList>(*value)
</ins><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><del>- && !value->isImageSetValue()
</del><ins>+ && !is<CSSImageSetValue>(*value)
</ins><span class="cx"> #endif
</span><span class="cx"> ) {
</span><span class="cx"> // Walk each value and put it into a layer, creating new layers as needed.
</span><del>- CSSValueList& valueList = toCSSValueList(*value);
</del><ins>+ CSSValueList& valueList = downcast<CSSValueList>(*value);
</ins><span class="cx"> for (unsigned i = 0; i < valueList.length(); i++) {
</span><span class="cx"> if (!child) {
</span><span class="cx"> previousChild->setNext(std::make_unique<FillLayer>(fillLayerType));
</span><span class="lines">@@ -595,12 +596,12 @@
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><span class="cx"> // note: CSSPropertyLetter/WordSpacing right now sets to zero if it's not a primitive value for some reason...
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx">
</span><del>- CSSValueID ident = primitiveValue->getValueID();
</del><ins>+ CSSValueID ident = primitiveValue.getValueID();
</ins><span class="cx"> T length;
</span><span class="cx"> if (normalEnabled && ident == CSSValueNormal) {
</span><span class="cx"> length = 0;
</span><span class="lines">@@ -615,9 +616,9 @@
</span><span class="cx">
</span><span class="cx"> // Any original result that was >= 1 should not be allowed to fall below 1.
</span><span class="cx"> // This keeps border lines from vanishing.
</span><del>- length = primitiveValue->computeLength<T>(conversionData);
</del><ins>+ length = primitiveValue.computeLength<T>(conversionData);
</ins><span class="cx"> if (conversionData.zoom() < 1.0f && length < 1.0) {
</span><del>- T originalLength = primitiveValue->computeLength<T>(conversionData.copyWithAdjustedZoom(1.0f));
</del><ins>+ T originalLength = primitiveValue.computeLength<T>(conversionData.copyWithAdjustedZoom(1.0f));
</ins><span class="cx"> if (originalLength >= 1.0)
</span><span class="cx"> length = 1.0;
</span><span class="cx"> }
</span><span class="lines">@@ -654,11 +655,11 @@
</span><span class="cx">
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx"> FontDescription fontDescription = styleResolver->fontDescription();
</span><del>- (fontDescription.*setterFunction)(*primitiveValue);
</del><ins>+ (fontDescription.*setterFunction)(primitiveValue);
</ins><span class="cx"> styleResolver->setFontDescription(fontDescription);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -697,10 +698,10 @@
</span><span class="cx">
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isValueList())
</del><ins>+ if (!is<CSSValueList>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- auto& valueList = toCSSValueList(*value);
</del><ins>+ auto& valueList = downcast<CSSValueList>(*value);
</ins><span class="cx">
</span><span class="cx"> FontDescription fontDescription = styleResolver->style()->fontDescription();
</span><span class="cx"> // Before mapping in a new font-family property, we should reset the generic family.
</span><span class="lines">@@ -712,14 +713,14 @@
</span><span class="cx">
</span><span class="cx"> for (unsigned i = 0; i < valueList.length(); ++i) {
</span><span class="cx"> CSSValue* item = valueList.item(i);
</span><del>- if (!item->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*item))
</ins><span class="cx"> continue;
</span><del>- CSSPrimitiveValue* contentValue = toCSSPrimitiveValue(item);
</del><ins>+ CSSPrimitiveValue& contentValue = downcast<CSSPrimitiveValue>(*item);
</ins><span class="cx"> AtomicString face;
</span><del>- if (contentValue->isString())
- face = contentValue->getStringValue();
</del><ins>+ if (contentValue.isString())
+ face = contentValue.getStringValue();
</ins><span class="cx"> else if (Settings* settings = styleResolver->document().settings()) {
</span><del>- switch (contentValue->getValueID()) {
</del><ins>+ switch (contentValue.getValueID()) {
</ins><span class="cx"> case CSSValueWebkitBody:
</span><span class="cx"> face = settings->standardFontFamily();
</span><span class="cx"> break;
</span><span class="lines">@@ -840,10 +841,10 @@
</span><span class="cx">
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx">
</span><span class="cx"> FontDescription fontDescription = styleResolver->style()->fontDescription();
</span><span class="cx"> fontDescription.setKeywordSize(0);
</span><span class="lines">@@ -856,7 +857,7 @@
</span><span class="cx"> parentIsAbsoluteSize = styleResolver->parentStyle()->fontDescription().isAbsoluteSize();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (CSSValueID ident = primitiveValue->getValueID()) {
</del><ins>+ if (CSSValueID ident = primitiveValue.getValueID()) {
</ins><span class="cx"> // Keywords are being used.
</span><span class="cx"> switch (ident) {
</span><span class="cx"> case CSSValueXxSmall:
</span><span class="lines">@@ -886,15 +887,14 @@
</span><span class="cx">
</span><span class="cx"> fontDescription.setIsAbsoluteSize(parentIsAbsoluteSize && (ident == CSSValueLarger || ident == CSSValueSmaller || ident == CSSValueWebkitRubyText));
</span><span class="cx"> } else {
</span><del>- fontDescription.setIsAbsoluteSize(parentIsAbsoluteSize
- || !(primitiveValue->isPercentage() || primitiveValue->isFontRelativeLength()));
- if (primitiveValue->isLength()) {
- size = primitiveValue->computeLength<float>(CSSToLengthConversionData(styleResolver->parentStyle(), styleResolver->rootElementStyle(), styleResolver->document().renderView(), 1.0f, true));
- styleResolver->state().setFontSizeHasViewportUnits(primitiveValue->isViewportPercentageLength());
- } else if (primitiveValue->isPercentage())
- size = (primitiveValue->getFloatValue() * parentSize) / 100.0f;
- else if (primitiveValue->isCalculatedPercentageWithLength()) {
- Ref<CalculationValue> calculationValue { primitiveValue->cssCalcValue()->createCalculationValue(styleResolver->state().cssToLengthConversionData().copyWithAdjustedZoom(1.0f)) };
</del><ins>+ fontDescription.setIsAbsoluteSize(parentIsAbsoluteSize || !(primitiveValue.isPercentage() || primitiveValue.isFontRelativeLength()));
+ if (primitiveValue.isLength()) {
+ size = primitiveValue.computeLength<float>(CSSToLengthConversionData(styleResolver->parentStyle(), styleResolver->rootElementStyle(), styleResolver->document().renderView(), 1.0f, true));
+ styleResolver->state().setFontSizeHasViewportUnits(primitiveValue.isViewportPercentageLength());
+ } else if (primitiveValue.isPercentage())
+ size = (primitiveValue.getFloatValue() * parentSize) / 100.0f;
+ else if (primitiveValue.isCalculatedPercentageWithLength()) {
+ Ref<CalculationValue> calculationValue { primitiveValue.cssCalcValue()->createCalculationValue(styleResolver->state().cssToLengthConversionData().copyWithAdjustedZoom(1.0f)) };
</ins><span class="cx"> size = calculationValue->evaluate(parentSize);
</span><span class="cx"> } else
</span><span class="cx"> return;
</span><span class="lines">@@ -919,11 +919,11 @@
</span><span class="cx"> public:
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx"> FontDescription fontDescription = styleResolver->fontDescription();
</span><del>- switch (primitiveValue->getValueID()) {
</del><ins>+ switch (primitiveValue.getValueID()) {
</ins><span class="cx"> case CSSValueInvalid:
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> break;
</span><span class="lines">@@ -934,7 +934,7 @@
</span><span class="cx"> fontDescription.setWeight(fontDescription.lighterWeight());
</span><span class="cx"> break;
</span><span class="cx"> default:
</span><del>- fontDescription.setWeight(*primitiveValue);
</del><ins>+ fontDescription.setWeight(primitiveValue);
</ins><span class="cx"> }
</span><span class="cx"> styleResolver->setFontDescription(fontDescription);
</span><span class="cx"> }
</span><span class="lines">@@ -976,13 +976,12 @@
</span><span class="cx"> FontDescription::LigaturesState discretionaryLigaturesState = FontDescription::NormalLigaturesState;
</span><span class="cx"> FontDescription::LigaturesState historicalLigaturesState = FontDescription::NormalLigaturesState;
</span><span class="cx">
</span><del>- if (value->isValueList()) {
- CSSValueList* valueList = toCSSValueList(value);
- for (size_t i = 0; i < valueList->length(); ++i) {
- CSSValue* item = valueList->itemWithoutBoundsCheck(i);
- ASSERT(item->isPrimitiveValue());
- if (item->isPrimitiveValue()) {
- switch (toCSSPrimitiveValue(item)->getValueID()) {
</del><ins>+ if (is<CSSValueList>(*value)) {
+ CSSValueList& valueList = downcast<CSSValueList>(*value);
+ for (size_t i = 0; i < valueList.length(); ++i) {
+ CSSValue* item = valueList.itemWithoutBoundsCheck(i);
+ if (is<CSSPrimitiveValue>(*item)) {
+ switch (downcast<CSSPrimitiveValue>(*item).getValueID()) {
</ins><span class="cx"> case CSSValueNoCommonLigatures:
</span><span class="cx"> commonLigaturesState = FontDescription::DisabledLigaturesState;
</span><span class="cx"> break;
</span><span class="lines">@@ -1009,10 +1008,8 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> #if !ASSERT_DISABLED
</span><del>- else {
- ASSERT_WITH_SECURITY_IMPLICATION(value->isPrimitiveValue());
- ASSERT(toCSSPrimitiveValue(value)->getValueID() == CSSValueNormal);
- }
</del><ins>+ else
+ ASSERT(downcast<CSSPrimitiveValue>(*value).getValueID() == CSSValueNormal);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> FontDescription fontDescription = styleResolver->fontDescription();
</span><span class="lines">@@ -1159,9 +1156,9 @@
</span><span class="cx"> }
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- bool setCounterIncrementToNone = counterBehavior == Increment && value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueNone;
</del><ins>+ bool setCounterIncrementToNone = counterBehavior == Increment && is<CSSPrimitiveValue>(*value) && downcast<CSSPrimitiveValue>(*value).getValueID() == CSSValueNone;
</ins><span class="cx">
</span><del>- if (!value->isValueList() && !setCounterIncrementToNone)
</del><ins>+ if (!is<CSSValueList>(*value) && !setCounterIncrementToNone)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> CounterDirectiveMap& map = styleResolver->style()->accessCounterDirectives();
</span><span class="lines">@@ -1177,14 +1174,14 @@
</span><span class="cx"> if (setCounterIncrementToNone)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSValueList* list = toCSSValueList(value);
- int length = list ? list->length() : 0;
</del><ins>+ CSSValueList& list = downcast<CSSValueList>(*value);
+ int length = list.length();
</ins><span class="cx"> for (int i = 0; i < length; ++i) {
</span><del>- CSSValue* currValue = list->itemWithoutBoundsCheck(i);
- if (!currValue->isPrimitiveValue())
</del><ins>+ CSSValue* currValue = list.itemWithoutBoundsCheck(i);
+ if (!is<CSSPrimitiveValue>(*currValue))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- Pair* pair = toCSSPrimitiveValue(currValue)->getPairValue();
</del><ins>+ Pair* pair = downcast<CSSPrimitiveValue>(*currValue).getPairValue();
</ins><span class="cx"> if (!pair || !pair->first() || !pair->second())
</span><span class="cx"> continue;
</span><span class="cx">
</span><span class="lines">@@ -1219,27 +1216,27 @@
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><span class="cx"> styleResolver->style()->clearCursorList();
</span><del>- if (value->isValueList()) {
- CSSValueList* list = toCSSValueList(value);
- int len = list->length();
</del><ins>+ if (is<CSSValueList>(*value)) {
+ CSSValueList& list = downcast<CSSValueList>(*value);
+ int length = list.length();
</ins><span class="cx"> styleResolver->style()->setCursor(CursorAuto);
</span><del>- for (int i = 0; i < len; i++) {
- CSSValue* item = list->itemWithoutBoundsCheck(i);
- if (item->isCursorImageValue()) {
- CSSCursorImageValue* image = toCSSCursorImageValue(item);
- if (image->updateIfSVGCursorIsUsed(styleResolver->element())) // Elements with SVG cursors are not allowed to share style.
</del><ins>+ for (int i = 0; i < length; i++) {
+ CSSValue* item = list.itemWithoutBoundsCheck(i);
+ if (is<CSSCursorImageValue>(*item)) {
+ CSSCursorImageValue& image = downcast<CSSCursorImageValue>(*item);
+ if (image.updateIfSVGCursorIsUsed(styleResolver->element())) // Elements with SVG cursors are not allowed to share style.
</ins><span class="cx"> styleResolver->style()->setUnique();
</span><del>- styleResolver->style()->addCursor(styleResolver->styleImage(CSSPropertyCursor, image), image->hotSpot());
- } else if (item->isPrimitiveValue()) {
- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(item);
- if (primitiveValue->isValueID())
- styleResolver->style()->setCursor(*primitiveValue);
</del><ins>+ styleResolver->style()->addCursor(styleResolver->styleImage(CSSPropertyCursor, &image), image.hotSpot());
+ } else if (is<CSSPrimitiveValue>(*item)) {
+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*item);
+ if (primitiveValue.isValueID())
+ styleResolver->style()->setCursor(primitiveValue);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><del>- } else if (value->isPrimitiveValue()) {
- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- if (primitiveValue->isValueID() && styleResolver->style()->cursor() != ECursor(*primitiveValue))
- styleResolver->style()->setCursor(*primitiveValue);
</del><ins>+ } else if (is<CSSPrimitiveValue>(*value)) {
+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ if (primitiveValue.isValueID() && styleResolver->style()->cursor() != ECursor(primitiveValue))
+ styleResolver->style()->setCursor(primitiveValue);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1250,14 +1247,14 @@
</span><span class="cx"> public:
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- ASSERT(primitiveValue->isValueID());
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ ASSERT(primitiveValue.isValueID());
</ins><span class="cx">
</span><del>- if (primitiveValue->getValueID() != CSSValueWebkitMatchParent)
- styleResolver->style()->setTextAlign(*primitiveValue);
</del><ins>+ if (primitiveValue.getValueID() != CSSValueWebkitMatchParent)
+ styleResolver->style()->setTextAlign(primitiveValue);
</ins><span class="cx"> else if (styleResolver->parentStyle()->textAlign() == TASTART)
</span><span class="cx"> styleResolver->style()->setTextAlign(styleResolver->parentStyle()->isLeftToRightDirection() ? LEFT : RIGHT);
</span><span class="cx"> else if (styleResolver->parentStyle()->textAlign() == TAEND)
</span><span class="lines">@@ -1279,8 +1276,7 @@
</span><span class="cx"> TextDecoration t = RenderStyle::initialTextDecoration();
</span><span class="cx"> for (CSSValueListIterator i(value); i.hasMore(); i.advance()) {
</span><span class="cx"> CSSValue* item = i.value();
</span><del>- ASSERT_WITH_SECURITY_IMPLICATION(item->isPrimitiveValue());
- t |= *toCSSPrimitiveValue(item);
</del><ins>+ t |= downcast<CSSPrimitiveValue>(*item);
</ins><span class="cx"> }
</span><span class="cx"> styleResolver->style()->setTextDecoration(t);
</span><span class="cx"> }
</span><span class="lines">@@ -1324,14 +1320,14 @@
</span><span class="cx"> public:
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (value->isPrimitiveValue()) {
- styleResolver->style()->setTextDecorationSkip(valueToDecorationSkip(*toCSSPrimitiveValue(value)));
</del><ins>+ if (is<CSSPrimitiveValue>(*value)) {
+ styleResolver->style()->setTextDecorationSkip(valueToDecorationSkip(downcast<CSSPrimitiveValue>(*value)));
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> TextDecorationSkip skip = RenderStyle::initialTextDecorationSkip();
</span><span class="cx"> for (CSSValueListIterator i(value); i.hasMore(); i.advance())
</span><del>- skip |= valueToDecorationSkip(*toCSSPrimitiveValue(i.value()));
</del><ins>+ skip |= valueToDecorationSkip(downcast<CSSPrimitiveValue>(*i.value()));
</ins><span class="cx"> styleResolver->style()->setTextDecorationSkip(skip);
</span><span class="cx"> }
</span><span class="cx"> static PropertyHandler createHandler()
</span><span class="lines">@@ -1345,10 +1341,10 @@
</span><span class="cx"> public:
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(*value);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx"> Length marqueeLength(Undefined);
</span><span class="cx"> switch (primitiveValue.getValueID()) {
</span><span class="cx"> case CSSValueSmall:
</span><span class="lines">@@ -1380,14 +1376,14 @@
</span><span class="cx"> public:
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- if (primitiveValue->getValueID() == CSSValueInfinite)
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ if (primitiveValue.getValueID() == CSSValueInfinite)
</ins><span class="cx"> styleResolver->style()->setMarqueeLoopCount(-1); // -1 means repeat forever.
</span><del>- else if (primitiveValue->isNumber())
- styleResolver->style()->setMarqueeLoopCount(primitiveValue->getIntValue());
</del><ins>+ else if (primitiveValue.isNumber())
+ styleResolver->style()->setMarqueeLoopCount(primitiveValue.getIntValue());
</ins><span class="cx"> }
</span><span class="cx"> static PropertyHandler createHandler()
</span><span class="cx"> {
</span><span class="lines">@@ -1400,11 +1396,11 @@
</span><span class="cx"> public:
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- if (CSSValueID ident = primitiveValue->getValueID()) {
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ if (CSSValueID ident = primitiveValue.getValueID()) {
</ins><span class="cx"> switch (ident) {
</span><span class="cx"> case CSSValueSlow:
</span><span class="cx"> styleResolver->style()->setMarqueeSpeed(500); // 500 msec.
</span><span class="lines">@@ -1418,10 +1414,10 @@
</span><span class="cx"> default:
</span><span class="cx"> break;
</span><span class="cx"> }
</span><del>- } else if (primitiveValue->isTime())
- styleResolver->style()->setMarqueeSpeed(primitiveValue->computeTime<int, CSSPrimitiveValue::Milliseconds>());
- else if (primitiveValue->isNumber()) // For scrollamount support.
- styleResolver->style()->setMarqueeSpeed(primitiveValue->getIntValue());
</del><ins>+ } else if (primitiveValue.isTime())
+ styleResolver->style()->setMarqueeSpeed(primitiveValue.computeTime<int, CSSPrimitiveValue::Milliseconds>());
+ else if (primitiveValue.isNumber()) // For scrollamount support.
+ styleResolver->style()->setMarqueeSpeed(primitiveValue.getIntValue());
</ins><span class="cx"> }
</span><span class="cx"> static PropertyHandler createHandler()
</span><span class="cx"> {
</span><span class="lines">@@ -1435,8 +1431,8 @@
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><span class="cx"> // This is true if value is 'auto' or 'alphabetic'.
</span><del>- if (value->isPrimitiveValue()) {
- TextUnderlinePosition t = *toCSSPrimitiveValue(value);
</del><ins>+ if (is<CSSPrimitiveValue>(*value)) {
+ TextUnderlinePosition t = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx"> styleResolver->style()->setTextUnderlinePosition(t);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -1444,8 +1440,7 @@
</span><span class="cx"> unsigned t = 0;
</span><span class="cx"> for (CSSValueListIterator i(value); i.hasMore(); i.advance()) {
</span><span class="cx"> CSSValue* item = i.value();
</span><del>- ASSERT_WITH_SECURITY_IMPLICATION(item->isPrimitiveValue());
- TextUnderlinePosition t2 = *toCSSPrimitiveValue(item);
</del><ins>+ TextUnderlinePosition t2 = downcast<CSSPrimitiveValue>(*item);
</ins><span class="cx"> t |= t2;
</span><span class="cx"> }
</span><span class="cx"> styleResolver->style()->setTextUnderlinePosition(static_cast<TextUnderlinePosition>(t));
</span><span class="lines">@@ -1461,22 +1456,22 @@
</span><span class="cx"> public:
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx"> Length lineHeight;
</span><span class="cx">
</span><del>- if (primitiveValue->getValueID() == CSSValueNormal)
</del><ins>+ if (primitiveValue.getValueID() == CSSValueNormal)
</ins><span class="cx"> lineHeight = RenderStyle::initialLineHeight();
</span><del>- else if (primitiveValue->isLength()) {
- lineHeight = primitiveValue->computeLength<Length>(csstoLengthConversionDataWithTextZoomFactor(*styleResolver));
- } else if (primitiveValue->isPercentage()) {
</del><ins>+ else if (primitiveValue.isLength())
+ lineHeight = primitiveValue.computeLength<Length>(csstoLengthConversionDataWithTextZoomFactor(*styleResolver));
+ else if (primitiveValue.isPercentage()) {
</ins><span class="cx"> // FIXME: percentage should not be restricted to an integer here.
</span><del>- lineHeight = Length((styleResolver->style()->computedFontSize() * primitiveValue->getIntValue()) / 100, Fixed);
- } else if (primitiveValue->isNumber()) {
</del><ins>+ lineHeight = Length((styleResolver->style()->computedFontSize() * primitiveValue.getIntValue()) / 100, Fixed);
+ } else if (primitiveValue.isNumber()) {
</ins><span class="cx"> // FIXME: number and percentage values should produce the same type of Length (ie. Fixed or Percent).
</span><del>- lineHeight = Length(primitiveValue->getDoubleValue() * 100.0, Percent);
</del><ins>+ lineHeight = Length(primitiveValue.getDoubleValue() * 100.0, Percent);
</ins><span class="cx"> } else
</span><span class="cx"> return;
</span><span class="cx"> styleResolver->style()->setLineHeight(lineHeight);
</span><span class="lines">@@ -1494,27 +1489,27 @@
</span><span class="cx"> public:
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx"> Length lineHeight;
</span><span class="cx">
</span><del>- if (primitiveValue->getValueID() == CSSValueNormal)
</del><ins>+ if (primitiveValue.getValueID() == CSSValueNormal)
</ins><span class="cx"> lineHeight = RenderStyle::initialLineHeight();
</span><del>- else if (primitiveValue->isLength()) {
- lineHeight = primitiveValue->computeLength<Length>(csstoLengthConversionDataWithTextZoomFactor(*styleResolver));
</del><ins>+ else if (primitiveValue.isLength()) {
+ lineHeight = primitiveValue.computeLength<Length>(csstoLengthConversionDataWithTextZoomFactor(*styleResolver));
</ins><span class="cx"> if (styleResolver->style()->textSizeAdjust().isPercentage())
</span><span class="cx"> lineHeight = Length(lineHeight.value() * styleResolver->style()->textSizeAdjust().multiplier(), Fixed);
</span><del>- } else if (primitiveValue->isPercentage()) {
</del><ins>+ } else if (primitiveValue.isPercentage()) {
</ins><span class="cx"> // FIXME: percentage should not be restricted to an integer here.
</span><del>- lineHeight = Length((styleResolver->style()->fontSize() * primitiveValue->getIntValue()) / 100, Fixed);
- } else if (primitiveValue->isNumber()) {
</del><ins>+ lineHeight = Length((styleResolver->style()->fontSize() * primitiveValue.getIntValue()) / 100, Fixed);
+ } else if (primitiveValue.isNumber()) {
</ins><span class="cx"> // FIXME: number and percentage values should produce the same type of Length (ie. Fixed or Percent).
</span><span class="cx"> if (styleResolver->style()->textSizeAdjust().isPercentage())
</span><del>- lineHeight = Length(primitiveValue->getDoubleValue() * styleResolver->style()->textSizeAdjust().multiplier() * 100.0, Percent);
</del><ins>+ lineHeight = Length(primitiveValue.getDoubleValue() * styleResolver->style()->textSizeAdjust().multiplier() * 100.0, Percent);
</ins><span class="cx"> else
</span><del>- lineHeight = Length(primitiveValue->getDoubleValue() * 100.0, Percent);
</del><ins>+ lineHeight = Length(primitiveValue.getDoubleValue() * 100.0, Percent);
</ins><span class="cx"> } else
</span><span class="cx"> return;
</span><span class="cx"> styleResolver->style()->setLineHeight(lineHeight);
</span><span class="lines">@@ -1544,20 +1539,20 @@
</span><span class="cx"> public:
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx"> Length wordSpacing;
</span><span class="cx">
</span><del>- if (primitiveValue->getValueID() == CSSValueNormal)
</del><ins>+ if (primitiveValue.getValueID() == CSSValueNormal)
</ins><span class="cx"> wordSpacing = RenderStyle::initialWordSpacing();
</span><del>- else if (primitiveValue->isLength()) {
- wordSpacing = primitiveValue->computeLength<Length>(csstoLengthConversionDataWithTextZoomFactor(*styleResolver));
- } else if (primitiveValue->isPercentage())
- wordSpacing = Length(primitiveValue->getDoubleValue(), Percent);
- else if (primitiveValue->isNumber())
- wordSpacing = Length(primitiveValue->getDoubleValue(), Fixed);
</del><ins>+ else if (primitiveValue.isLength()) {
+ wordSpacing = primitiveValue.computeLength<Length>(csstoLengthConversionDataWithTextZoomFactor(*styleResolver));
+ } else if (primitiveValue.isPercentage())
+ wordSpacing = Length(primitiveValue.getDoubleValue(), Percent);
+ else if (primitiveValue.isNumber())
+ wordSpacing = Length(primitiveValue.getDoubleValue(), Fixed);
</ins><span class="cx"> else
</span><span class="cx"> return;
</span><span class="cx"> styleResolver->style()->setWordSpacing(wordSpacing);
</span><span class="lines">@@ -1667,21 +1662,21 @@
</span><span class="cx"> switch (inspector.length()) {
</span><span class="cx"> case 2: {
</span><span class="cx"> // <length>{2} | <page-size> <orientation>
</span><del>- if (!inspector.first()->isPrimitiveValue() || !inspector.second()->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*inspector.first()) || !is<CSSPrimitiveValue>(*inspector.second()))
</ins><span class="cx"> return;
</span><del>- CSSPrimitiveValue* first = toCSSPrimitiveValue(inspector.first());
- CSSPrimitiveValue* second = toCSSPrimitiveValue(inspector.second());
- if (first->isLength()) {
</del><ins>+ CSSPrimitiveValue& first = downcast<CSSPrimitiveValue>(*inspector.first());
+ CSSPrimitiveValue& second = downcast<CSSPrimitiveValue>(*inspector.second());
+ if (first.isLength()) {
</ins><span class="cx"> // <length>{2}
</span><del>- if (!second->isLength())
</del><ins>+ if (!second.isLength())
</ins><span class="cx"> return;
</span><span class="cx"> CSSToLengthConversionData conversionData = styleResolver->state().cssToLengthConversionData().copyWithAdjustedZoom(1.0f);
</span><del>- width = first->computeLength<Length>(conversionData);
- height = second->computeLength<Length>(conversionData);
</del><ins>+ width = first.computeLength<Length>(conversionData);
+ height = second.computeLength<Length>(conversionData);
</ins><span class="cx"> } else {
</span><span class="cx"> // <page-size> <orientation>
</span><span class="cx"> // The value order is guaranteed. See CSSParser::parseSizeParameter.
</span><del>- if (!getPageSizeFromName(first, second, width, height))
</del><ins>+ if (!getPageSizeFromName(&first, &second, width, height))
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> pageSizeType = PAGE_SIZE_RESOLVED;
</span><span class="lines">@@ -1689,15 +1684,15 @@
</span><span class="cx"> }
</span><span class="cx"> case 1: {
</span><span class="cx"> // <length> | auto | <page-size> | [ portrait | landscape]
</span><del>- if (!inspector.first()->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*inspector.first()))
</ins><span class="cx"> return;
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(inspector.first());
- if (primitiveValue->isLength()) {
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*inspector.first());
+ if (primitiveValue.isLength()) {
</ins><span class="cx"> // <length>
</span><span class="cx"> pageSizeType = PAGE_SIZE_RESOLVED;
</span><del>- width = height = primitiveValue->computeLength<Length>(styleResolver->state().cssToLengthConversionData().copyWithAdjustedZoom(1.0f));
</del><ins>+ width = height = primitiveValue.computeLength<Length>(styleResolver->state().cssToLengthConversionData().copyWithAdjustedZoom(1.0f));
</ins><span class="cx"> } else {
</span><del>- switch (primitiveValue->getValueID()) {
</del><ins>+ switch (primitiveValue.getValueID()) {
</ins><span class="cx"> case 0:
</span><span class="cx"> return;
</span><span class="cx"> case CSSValueAuto:
</span><span class="lines">@@ -1712,7 +1707,7 @@
</span><span class="cx"> default:
</span><span class="cx"> // <page-size>
</span><span class="cx"> pageSizeType = PAGE_SIZE_RESOLVED;
</span><del>- if (!getPageSizeFromName(primitiveValue, 0, width, height))
</del><ins>+ if (!getPageSizeFromName(&primitiveValue, nullptr, width, height))
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -1745,45 +1740,45 @@
</span><span class="cx">
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (value->isValueList()) {
- CSSValueList* list = toCSSValueList(value);
- ASSERT(list->length() == 2);
- if (list->length() != 2)
</del><ins>+ if (is<CSSValueList>(*value)) {
+ CSSValueList& list = downcast<CSSValueList>(*value);
+ ASSERT(list.length() == 2);
+ if (list.length() != 2)
</ins><span class="cx"> return;
</span><span class="cx"> for (unsigned i = 0; i < 2; ++i) {
</span><del>- CSSValue* item = list->itemWithoutBoundsCheck(i);
- if (!item->isPrimitiveValue())
</del><ins>+ CSSValue* item = list.itemWithoutBoundsCheck(i);
+ if (!is<CSSPrimitiveValue>(*item))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* value = toCSSPrimitiveValue(item);
- if (value->getValueID() == CSSValueFilled || value->getValueID() == CSSValueOpen)
- styleResolver->style()->setTextEmphasisFill(*value);
</del><ins>+ CSSPrimitiveValue& value = downcast<CSSPrimitiveValue>(*item);
+ if (value.getValueID() == CSSValueFilled || value.getValueID() == CSSValueOpen)
+ styleResolver->style()->setTextEmphasisFill(value);
</ins><span class="cx"> else
</span><del>- styleResolver->style()->setTextEmphasisMark(*value);
</del><ins>+ styleResolver->style()->setTextEmphasisMark(value);
</ins><span class="cx"> }
</span><span class="cx"> styleResolver->style()->setTextEmphasisCustomMark(nullAtom);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx">
</span><del>- if (primitiveValue->isString()) {
</del><ins>+ if (primitiveValue.isString()) {
</ins><span class="cx"> styleResolver->style()->setTextEmphasisFill(TextEmphasisFillFilled);
</span><span class="cx"> styleResolver->style()->setTextEmphasisMark(TextEmphasisMarkCustom);
</span><del>- styleResolver->style()->setTextEmphasisCustomMark(primitiveValue->getStringValue());
</del><ins>+ styleResolver->style()->setTextEmphasisCustomMark(primitiveValue.getStringValue());
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> styleResolver->style()->setTextEmphasisCustomMark(nullAtom);
</span><span class="cx">
</span><del>- if (primitiveValue->getValueID() == CSSValueFilled || primitiveValue->getValueID() == CSSValueOpen) {
- styleResolver->style()->setTextEmphasisFill(*primitiveValue);
</del><ins>+ if (primitiveValue.getValueID() == CSSValueFilled || primitiveValue.getValueID() == CSSValueOpen) {
+ styleResolver->style()->setTextEmphasisFill(primitiveValue);
</ins><span class="cx"> styleResolver->style()->setTextEmphasisMark(TextEmphasisMarkAuto);
</span><span class="cx"> } else {
</span><span class="cx"> styleResolver->style()->setTextEmphasisFill(TextEmphasisFillFilled);
</span><del>- styleResolver->style()->setTextEmphasisMark(*primitiveValue);
</del><ins>+ styleResolver->style()->setTextEmphasisMark(primitiveValue);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1815,14 +1810,14 @@
</span><span class="cx"> public:
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (value->isPrimitiveValue()) {
- styleResolver->style()->setTextEmphasisPosition(valueToEmphasisPosition(*toCSSPrimitiveValue(value)));
</del><ins>+ if (is<CSSPrimitiveValue>(*value)) {
+ styleResolver->style()->setTextEmphasisPosition(valueToEmphasisPosition(downcast<CSSPrimitiveValue>(*value)));
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> TextEmphasisPosition position = 0;
</span><span class="cx"> for (CSSValueListIterator i(value); i.hasMore(); i.advance())
</span><del>- position |= valueToEmphasisPosition(*toCSSPrimitiveValue(i.value()));
</del><ins>+ position |= valueToEmphasisPosition(downcast<CSSPrimitiveValue>(*i.value()));
</ins><span class="cx"> styleResolver->style()->setTextEmphasisPosition(position);
</span><span class="cx"> }
</span><span class="cx"> static PropertyHandler createHandler()
</span><span class="lines">@@ -1935,23 +1930,23 @@
</span><span class="cx"> public:
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx">
</span><del>- EResize r = RESIZE_NONE;
- switch (primitiveValue->getValueID()) {
</del><ins>+ EResize resize = RESIZE_NONE;
+ switch (primitiveValue.getValueID()) {
</ins><span class="cx"> case 0:
</span><span class="cx"> return;
</span><span class="cx"> case CSSValueAuto:
</span><span class="cx"> if (Settings* settings = styleResolver->document().settings())
</span><del>- r = settings->textAreasAreResizable() ? RESIZE_BOTH : RESIZE_NONE;
</del><ins>+ resize = settings->textAreasAreResizable() ? RESIZE_BOTH : RESIZE_NONE;
</ins><span class="cx"> break;
</span><span class="cx"> default:
</span><del>- r = *primitiveValue;
</del><ins>+ resize = primitiveValue;
</ins><span class="cx"> }
</span><del>- styleResolver->style()->setResize(r);
</del><ins>+ styleResolver->style()->setResize(resize);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static PropertyHandler createHandler()
</span><span class="lines">@@ -1965,15 +1960,15 @@
</span><span class="cx"> public:
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx">
</span><del>- if (primitiveValue->getValueID())
- return styleResolver->style()->setVerticalAlign(*primitiveValue);
</del><ins>+ if (primitiveValue.getValueID())
+ return styleResolver->style()->setVerticalAlign(primitiveValue);
</ins><span class="cx">
</span><del>- styleResolver->style()->setVerticalAlignLength(primitiveValue->convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion>(styleResolver->state().cssToLengthConversionData()));
</del><ins>+ styleResolver->style()->setVerticalAlignLength(primitiveValue.convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion>(styleResolver->state().cssToLengthConversionData()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static PropertyHandler createHandler()
</span><span class="lines">@@ -2003,26 +1998,26 @@
</span><span class="cx">
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (value->isPrimitiveValue()) {
- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
</del><ins>+ if (is<CSSPrimitiveValue>(*value)) {
+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx">
</span><del>- if (primitiveValue->getValueID() == CSSValueAuto)
</del><ins>+ if (primitiveValue.getValueID() == CSSValueAuto)
</ins><span class="cx"> return styleResolver->style()->setAspectRatioType(AspectRatioAuto);
</span><del>- if (primitiveValue->getValueID() == CSSValueFromDimensions)
</del><ins>+ if (primitiveValue.getValueID() == CSSValueFromDimensions)
</ins><span class="cx"> return styleResolver->style()->setAspectRatioType(AspectRatioFromDimensions);
</span><del>- if (primitiveValue->getValueID() == CSSValueFromIntrinsic)
</del><ins>+ if (primitiveValue.getValueID() == CSSValueFromIntrinsic)
</ins><span class="cx"> return styleResolver->style()->setAspectRatioType(AspectRatioFromIntrinsic);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isAspectRatioValue()) {
</del><ins>+ if (!is<CSSAspectRatioValue>(*value)) {
</ins><span class="cx"> styleResolver->style()->setAspectRatioType(AspectRatioAuto);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- CSSAspectRatioValue* aspectRatioValue = toCSSAspectRatioValue(value);
</del><ins>+ CSSAspectRatioValue& aspectRatioValue = downcast<CSSAspectRatioValue>(*value);
</ins><span class="cx"> styleResolver->style()->setAspectRatioType(AspectRatioSpecified);
</span><del>- styleResolver->style()->setAspectRatioDenominator(aspectRatioValue->denominatorValue());
- styleResolver->style()->setAspectRatioNumerator(aspectRatioValue->numeratorValue());
</del><ins>+ styleResolver->style()->setAspectRatioDenominator(aspectRatioValue.denominatorValue());
+ styleResolver->style()->setAspectRatioNumerator(aspectRatioValue.numeratorValue());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static PropertyHandler createHandler()
</span><span class="lines">@@ -2054,26 +2049,25 @@
</span><span class="cx">
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- ASSERT_WITH_SECURITY_IMPLICATION(value->isPrimitiveValue());
- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx">
</span><del>- if (primitiveValue->getValueID() == CSSValueNormal) {
</del><ins>+ if (primitiveValue.getValueID() == CSSValueNormal) {
</ins><span class="cx"> resetEffectiveZoom(styleResolver);
</span><span class="cx"> styleResolver->setZoom(RenderStyle::initialZoom());
</span><del>- } else if (primitiveValue->getValueID() == CSSValueReset) {
</del><ins>+ } else if (primitiveValue.getValueID() == CSSValueReset) {
</ins><span class="cx"> styleResolver->setEffectiveZoom(RenderStyle::initialZoom());
</span><span class="cx"> styleResolver->setZoom(RenderStyle::initialZoom());
</span><del>- } else if (primitiveValue->getValueID() == CSSValueDocument) {
</del><ins>+ } else if (primitiveValue.getValueID() == CSSValueDocument) {
</ins><span class="cx"> float docZoom = styleResolver->rootElementStyle() ? styleResolver->rootElementStyle()->zoom() : RenderStyle::initialZoom();
</span><span class="cx"> styleResolver->setEffectiveZoom(docZoom);
</span><span class="cx"> styleResolver->setZoom(docZoom);
</span><del>- } else if (primitiveValue->isPercentage()) {
</del><ins>+ } else if (primitiveValue.isPercentage()) {
</ins><span class="cx"> resetEffectiveZoom(styleResolver);
</span><del>- if (float percent = primitiveValue->getFloatValue())
</del><ins>+ if (float percent = primitiveValue.getFloatValue())
</ins><span class="cx"> styleResolver->setZoom(percent / 100.0f);
</span><del>- } else if (primitiveValue->isNumber()) {
</del><ins>+ } else if (primitiveValue.isNumber()) {
</ins><span class="cx"> resetEffectiveZoom(styleResolver);
</span><del>- if (float number = primitiveValue->getFloatValue())
</del><ins>+ if (float number = primitiveValue.getFloatValue())
</ins><span class="cx"> styleResolver->setZoom(number);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -2108,10 +2102,10 @@
</span><span class="cx">
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- EDisplay display = *toCSSPrimitiveValue(value);
</del><ins>+ EDisplay display = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx">
</span><span class="cx"> if (!isValidDisplayValue(styleResolver, display))
</span><span class="cx"> return;
</span><span class="lines">@@ -2131,8 +2125,8 @@
</span><span class="cx"> static void setValue(RenderStyle* style, PassRefPtr<ClipPathOperation> value) { (style->*setterFunction)(value); }
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (value->isPrimitiveValue()) {
- auto& primitiveValue = toCSSPrimitiveValue(*value);
</del><ins>+ if (is<CSSPrimitiveValue>(*value)) {
+ auto& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx"> if (primitiveValue.getValueID() == CSSValueNone)
</span><span class="cx"> setValue(styleResolver->style(), 0);
</span><span class="cx"> else if (primitiveValue.primitiveType() == CSSPrimitiveValue::CSS_URI) {
</span><span class="lines">@@ -2143,13 +2137,13 @@
</span><span class="cx"> }
</span><span class="cx"> return;
</span><span class="cx"> }
</span><del>- if (!value->isValueList())
</del><ins>+ if (!is<CSSValueList>(*value))
</ins><span class="cx"> return;
</span><span class="cx"> CSSBoxType referenceBox = BoxMissing;
</span><span class="cx"> RefPtr<ClipPathOperation> operation;
</span><del>- auto& valueList = toCSSValueList(*value);
</del><ins>+ auto& valueList = downcast<CSSValueList>(*value);
</ins><span class="cx"> for (unsigned i = 0; i < valueList.length(); ++i) {
</span><del>- auto& primitiveValue = toCSSPrimitiveValue(*valueList.itemWithoutBoundsCheck(i));
</del><ins>+ auto& primitiveValue = downcast<CSSPrimitiveValue>(*valueList.itemWithoutBoundsCheck(i));
</ins><span class="cx"> if (primitiveValue.isShape() && !operation)
</span><span class="cx"> operation = ShapeClipPathOperation::create(basicShapeForValue(styleResolver->state().cssToLengthConversionData(), primitiveValue.getShapeValue()));
</span><span class="cx"> else if ((primitiveValue.getValueID() == CSSValueContentBox
</span><span class="lines">@@ -2186,26 +2180,26 @@
</span><span class="cx"> static void setValue(RenderStyle* style, PassRefPtr<ShapeValue> value) { (style->*setterFunction)(value); }
</span><span class="cx"> static void applyValue(CSSPropertyID property, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (value->isPrimitiveValue()) {
- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- if (primitiveValue->getValueID() == CSSValueAuto)
</del><ins>+ if (is<CSSPrimitiveValue>(*value)) {
+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ if (primitiveValue.getValueID() == CSSValueAuto)
</ins><span class="cx"> setValue(styleResolver->style(), 0);
</span><span class="cx"> } else if (value->isImageValue() || value->isImageGeneratorValue() || value->isImageSetValue()) {
</span><span class="cx"> RefPtr<ShapeValue> shape = ShapeValue::createImageValue(styleResolver->styleImage(property, value));
</span><span class="cx"> setValue(styleResolver->style(), shape.release());
</span><del>- } else if (value->isValueList()) {
</del><ins>+ } else if (is<CSSValueList>(*value)) {
</ins><span class="cx"> RefPtr<BasicShape> shape;
</span><span class="cx"> CSSBoxType referenceBox = BoxMissing;
</span><del>- CSSValueList* valueList = toCSSValueList(value);
- for (unsigned i = 0; i < valueList->length(); ++i) {
- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(valueList->itemWithoutBoundsCheck(i));
- if (primitiveValue->isShape())
- shape = basicShapeForValue(styleResolver->state().cssToLengthConversionData(), primitiveValue->getShapeValue());
- else if (primitiveValue->getValueID() == CSSValueContentBox
- || primitiveValue->getValueID() == CSSValueBorderBox
- || primitiveValue->getValueID() == CSSValuePaddingBox
- || primitiveValue->getValueID() == CSSValueMarginBox)
- referenceBox = CSSBoxType(*primitiveValue);
</del><ins>+ CSSValueList& valueList = downcast<CSSValueList>(*value);
+ for (unsigned i = 0; i < valueList.length(); ++i) {
+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*valueList.itemWithoutBoundsCheck(i));
+ if (primitiveValue.isShape())
+ shape = basicShapeForValue(styleResolver->state().cssToLengthConversionData(), primitiveValue.getShapeValue());
+ else if (primitiveValue.getValueID() == CSSValueContentBox
+ || primitiveValue.getValueID() == CSSValueBorderBox
+ || primitiveValue.getValueID() == CSSValuePaddingBox
+ || primitiveValue.getValueID() == CSSValueMarginBox)
+ referenceBox = CSSBoxType(primitiveValue);
</ins><span class="cx"> else
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -2245,23 +2239,23 @@
</span><span class="cx">
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isValueList())
</del><ins>+ if (!is<CSSValueList>(*value))
</ins><span class="cx"> return;
</span><del>- CSSValueList* valueList = toCSSValueList(value);
</del><ins>+ CSSValueList& valueList = downcast<CSSValueList>(*value);
</ins><span class="cx"> ImageResolutionSource source = RenderStyle::initialImageResolutionSource();
</span><span class="cx"> ImageResolutionSnap snap = RenderStyle::initialImageResolutionSnap();
</span><span class="cx"> double resolution = RenderStyle::initialImageResolution();
</span><del>- for (size_t i = 0; i < valueList->length(); i++) {
- CSSValue* item = valueList->itemWithoutBoundsCheck(i);
- if (!item->isPrimitiveValue())
</del><ins>+ for (size_t i = 0; i < valueList.length(); ++i) {
+ CSSValue& item = *valueList.itemWithoutBoundsCheck(i);
+ if (!is<CSSPrimitiveValue>(item))
</ins><span class="cx"> continue;
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(item);
- if (primitiveValue->getValueID() == CSSValueFromImage)
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(item);
+ if (primitiveValue.getValueID() == CSSValueFromImage)
</ins><span class="cx"> source = ImageResolutionFromImage;
</span><del>- else if (primitiveValue->getValueID() == CSSValueSnap)
</del><ins>+ else if (primitiveValue.getValueID() == CSSValueSnap)
</ins><span class="cx"> snap = ImageResolutionSnapPixels;
</span><span class="cx"> else
</span><del>- resolution = primitiveValue->getDoubleValue(CSSPrimitiveValue::CSS_DPPX);
</del><ins>+ resolution = primitiveValue.getDoubleValue(CSSPrimitiveValue::CSS_DPPX);
</ins><span class="cx"> }
</span><span class="cx"> styleResolver->style()->setImageResolutionSource(source);
</span><span class="cx"> styleResolver->style()->setImageResolutionSnap(snap);
</span><span class="lines">@@ -2297,7 +2291,7 @@
</span><span class="cx">
</span><span class="cx"> static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (!value->isValueList())
</del><ins>+ if (!is<CSSValueList>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> Length lengthOrPercentageValue;
</span><span class="lines">@@ -2305,19 +2299,19 @@
</span><span class="cx"> TextIndentLine textIndentLineValue = RenderStyle::initialTextIndentLine();
</span><span class="cx"> TextIndentType textIndentTypeValue = RenderStyle::initialTextIndentType();
</span><span class="cx"> #endif
</span><del>- CSSValueList* valueList = toCSSValueList(value);
- for (size_t i = 0; i < valueList->length(); ++i) {
- CSSValue* item = valueList->itemWithoutBoundsCheck(i);
- if (!item->isPrimitiveValue())
</del><ins>+ CSSValueList& valueList = downcast<CSSValueList>(*value);
+ for (size_t i = 0; i < valueList.length(); ++i) {
+ CSSValue* item = valueList.itemWithoutBoundsCheck(i);
+ if (!is<CSSPrimitiveValue>(*item))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(item);
- if (!primitiveValue->getValueID())
- lengthOrPercentageValue = primitiveValue->convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion>(styleResolver->state().cssToLengthConversionData());
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*item);
+ if (!primitiveValue.getValueID())
+ lengthOrPercentageValue = primitiveValue.convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion>(styleResolver->state().cssToLengthConversionData());
</ins><span class="cx"> #if ENABLE(CSS3_TEXT)
</span><del>- else if (primitiveValue->getValueID() == CSSValueWebkitEachLine)
</del><ins>+ else if (primitiveValue.getValueID() == CSSValueWebkitEachLine)
</ins><span class="cx"> textIndentLineValue = TextIndentEachLine;
</span><del>- else if (primitiveValue->getValueID() == CSSValueWebkitHanging)
</del><ins>+ else if (primitiveValue.getValueID() == CSSValueWebkitHanging)
</ins><span class="cx"> textIndentTypeValue = TextIndentHanging;
</span><span class="cx"> #endif
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssMediaListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/MediaList.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/MediaList.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/MediaList.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -332,10 +332,10 @@
</span><span class="cx"> const MediaQueryExp* exp = expressions.at(j).get();
</span><span class="cx"> if (exp->mediaFeature() == MediaFeatureNames::resolutionMediaFeature || exp->mediaFeature() == MediaFeatureNames::max_resolutionMediaFeature || exp->mediaFeature() == MediaFeatureNames::min_resolutionMediaFeature) {
</span><span class="cx"> CSSValue* cssValue = exp->value();
</span><del>- if (cssValue && cssValue->isPrimitiveValue()) {
- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(cssValue);
- if (primitiveValue->isDotsPerInch() || primitiveValue->isDotsPerCentimeter())
- addResolutionWarningMessageToConsole(document, mediaQuerySet->mediaText(), primitiveValue);
</del><ins>+ if (is<CSSPrimitiveValue>(cssValue)) {
+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*cssValue);
+ if (primitiveValue.isDotsPerInch() || primitiveValue.isDotsPerCentimeter())
+ addResolutionWarningMessageToConsole(document, mediaQuerySet->mediaText(), &primitiveValue);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssMediaQueryEvaluatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/MediaQueryEvaluator.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/MediaQueryEvaluator.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/MediaQueryEvaluator.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -186,9 +186,9 @@
</span><span class="cx">
</span><span class="cx"> static bool compareAspectRatioValue(CSSValue* value, int width, int height, MediaFeaturePrefix op)
</span><span class="cx"> {
</span><del>- if (value->isAspectRatioValue()) {
- CSSAspectRatioValue* aspectRatio = toCSSAspectRatioValue(value);
- return compareValue(width * static_cast<int>(aspectRatio->denominatorValue()), height * static_cast<int>(aspectRatio->numeratorValue()), op);
</del><ins>+ if (is<CSSAspectRatioValue>(*value)) {
+ CSSAspectRatioValue& aspectRatio = downcast<CSSAspectRatioValue>(*value);
+ return compareValue(width * static_cast<int>(aspectRatio.denominatorValue()), height * static_cast<int>(aspectRatio.numeratorValue()), op);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return false;
</span><span class="lines">@@ -196,9 +196,8 @@
</span><span class="cx">
</span><span class="cx"> static bool numberValue(CSSValue* value, float& result)
</span><span class="cx"> {
</span><del>- if (value->isPrimitiveValue()
- && toCSSPrimitiveValue(value)->isNumber()) {
- result = toCSSPrimitiveValue(value)->getFloatValue(CSSPrimitiveValue::CSS_NUMBER);
</del><ins>+ if (is<CSSPrimitiveValue>(*value) && downcast<CSSPrimitiveValue>(*value).isNumber()) {
+ result = downcast<CSSPrimitiveValue>(*value).getFloatValue(CSSPrimitiveValue::CSS_NUMBER);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return false;
</span><span class="lines">@@ -246,8 +245,8 @@
</span><span class="cx">
</span><span class="cx"> int width = view->layoutWidth();
</span><span class="cx"> int height = view->layoutHeight();
</span><del>- if (value && value->isPrimitiveValue()) {
- const CSSValueID id = toCSSPrimitiveValue(value)->getValueID();
</del><ins>+ if (is<CSSPrimitiveValue>(value)) {
+ const CSSValueID id = downcast<CSSPrimitiveValue>(*value).getValueID();
</ins><span class="cx"> if (width > height) // Square viewport is portrait.
</span><span class="cx"> return CSSValueLandscape == id;
</span><span class="cx"> return CSSValuePortrait == id;
</span><span class="lines">@@ -308,22 +307,22 @@
</span><span class="cx"> if (!value)
</span><span class="cx"> return !!deviceScaleFactor;
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* resolution = toCSSPrimitiveValue(value);
- return compareValue(deviceScaleFactor, resolution->isNumber() ? resolution->getFloatValue() : resolution->getFloatValue(CSSPrimitiveValue::CSS_DPPX), op);
</del><ins>+ CSSPrimitiveValue& resolution = downcast<CSSPrimitiveValue>(*value);
+ return compareValue(deviceScaleFactor, resolution.isNumber() ? resolution.getFloatValue() : resolution.getFloatValue(CSSPrimitiveValue::CSS_DPPX), op);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static bool device_pixel_ratioMediaFeatureEval(CSSValue *value, const CSSToLengthConversionData&, Frame* frame, MediaFeaturePrefix op)
</span><span class="cx"> {
</span><del>- return (!value || toCSSPrimitiveValue(value)->isNumber()) && evalResolution(value, frame, op);
</del><ins>+ return (!value || downcast<CSSPrimitiveValue>(*value).isNumber()) && evalResolution(value, frame, op);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static bool resolutionMediaFeatureEval(CSSValue* value, const CSSToLengthConversionData&, Frame* frame, MediaFeaturePrefix op)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(RESOLUTION_MEDIA_QUERY)
</span><del>- return (!value || toCSSPrimitiveValue(value)->isResolution()) && evalResolution(value, frame, op);
</del><ins>+ return (!value || downcast<CSSPrimitiveValue>(*value).isResolution()) && evalResolution(value, frame, op);
</ins><span class="cx"> #else
</span><span class="cx"> UNUSED_PARAM(value);
</span><span class="cx"> UNUSED_PARAM(frame);
</span><span class="lines">@@ -344,18 +343,18 @@
</span><span class="cx">
</span><span class="cx"> static bool computeLength(CSSValue* value, bool strict, const CSSToLengthConversionData& conversionData, int& result)
</span><span class="cx"> {
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx">
</span><del>- if (primitiveValue->isNumber()) {
- result = primitiveValue->getIntValue();
</del><ins>+ if (primitiveValue.isNumber()) {
+ result = primitiveValue.getIntValue();
</ins><span class="cx"> return !strict || !result;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (primitiveValue->isLength()) {
- result = primitiveValue->computeLength<int>(conversionData);
</del><ins>+ if (primitiveValue.isLength()) {
+ result = primitiveValue.computeLength<int>(conversionData);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -593,7 +592,7 @@
</span><span class="cx"> if (!value)
</span><span class="cx"> return true;
</span><span class="cx">
</span><del>- const int viewModeCSSKeywordID = toCSSPrimitiveValue(value)->getValueID();
</del><ins>+ const int viewModeCSSKeywordID = downcast<CSSPrimitiveValue>(*value).getValueID();
</ins><span class="cx"> const Page::ViewMode viewMode = frame->page()->viewMode();
</span><span class="cx"> bool result = false;
</span><span class="cx"> switch (viewMode) {
</span><span class="lines">@@ -688,10 +687,10 @@
</span><span class="cx"> if (!value)
</span><span class="cx"> return pointer != NoPointer;
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><del>- const CSSValueID id = toCSSPrimitiveValue(value)->getValueID();
</del><ins>+ const CSSValueID id = downcast<CSSPrimitiveValue>(*value).getValueID();
</ins><span class="cx"> return (pointer == NoPointer && id == CSSValueNone)
</span><span class="cx"> || (pointer == TouchPointer && id == CSSValueCoarse)
</span><span class="cx"> || (pointer == MousePointer && id == CSSValueFine);
</span></span></pre></div>
<a id="trunkSourceWebCorecssSVGCSSStyleSelectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SVGCSSStyleSelector.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SVGCSSStyleSelector.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/SVGCSSStyleSelector.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -103,9 +103,9 @@
</span><span class="cx"> void StyleResolver::applySVGProperty(CSSPropertyID id, CSSValue* value)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(value);
</span><del>- CSSPrimitiveValue* primitiveValue = 0;
- if (value->isPrimitiveValue())
- primitiveValue = toCSSPrimitiveValue(value);
</del><ins>+ CSSPrimitiveValue* primitiveValue = nullptr;
+ if (is<CSSPrimitiveValue>(*value))
+ primitiveValue = downcast<CSSPrimitiveValue>(value);
</ins><span class="cx">
</span><span class="cx"> const State& state = m_state;
</span><span class="cx"> SVGRenderStyle& svgStyle = state.style()->accessSVGStyle();
</span><span class="lines">@@ -208,13 +208,13 @@
</span><span class="cx"> // 'normal' is the only primitiveValue
</span><span class="cx"> if (primitiveValue)
</span><span class="cx"> svgStyle.setPaintOrder(PaintOrderNormal);
</span><del>- if (!value->isValueList())
</del><ins>+ if (!is<CSSValueList>(*value))
</ins><span class="cx"> break;
</span><del>- CSSValueList* orderTypeList = toCSSValueList(value);
</del><ins>+ CSSValueList& orderTypeList = downcast<CSSValueList>(*value);
</ins><span class="cx">
</span><span class="cx"> // Serialization happened during parsing. No additional checking needed.
</span><del>- unsigned length = orderTypeList->length();
- primitiveValue = toCSSPrimitiveValue(orderTypeList->itemWithoutBoundsCheck(0));
</del><ins>+ unsigned length = orderTypeList.length();
+ primitiveValue = downcast<CSSPrimitiveValue>(orderTypeList.itemWithoutBoundsCheck(0));
</ins><span class="cx"> PaintOrder paintOrder;
</span><span class="cx"> switch (primitiveValue->getValueID()) {
</span><span class="cx"> case CSSValueFill:
</span><span class="lines">@@ -266,9 +266,9 @@
</span><span class="cx"> svgStyle.setFillPaint(SVGRenderStyle::initialFillPaintType(), SVGRenderStyle::initialFillPaintColor(), SVGRenderStyle::initialFillPaintUri(), applyPropertyToRegularStyle(), applyPropertyToVisitedLinkStyle());
</span><span class="cx"> return;
</span><span class="cx"> }
</span><del>- if (value->isSVGPaint()) {
- SVGPaint* svgPaint = toSVGPaint(value);
- svgStyle.setFillPaint(svgPaint->paintType(), colorFromSVGColorCSSValue(svgPaint, state.style()->color()), svgPaint->uri(), applyPropertyToRegularStyle(), applyPropertyToVisitedLinkStyle());
</del><ins>+ if (is<SVGPaint>(*value)) {
+ SVGPaint& svgPaint = downcast<SVGPaint>(*value);
+ svgStyle.setFillPaint(svgPaint.paintType(), colorFromSVGColorCSSValue(&svgPaint, state.style()->color()), svgPaint.uri(), applyPropertyToRegularStyle(), applyPropertyToVisitedLinkStyle());
</ins><span class="cx"> }
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -283,30 +283,30 @@
</span><span class="cx"> svgStyle.setStrokePaint(SVGRenderStyle::initialStrokePaintType(), SVGRenderStyle::initialStrokePaintColor(), SVGRenderStyle::initialStrokePaintUri(), applyPropertyToRegularStyle(), applyPropertyToVisitedLinkStyle());
</span><span class="cx"> return;
</span><span class="cx"> }
</span><del>- if (value->isSVGPaint()) {
- SVGPaint* svgPaint = toSVGPaint(value);
- svgStyle.setStrokePaint(svgPaint->paintType(), colorFromSVGColorCSSValue(svgPaint, state.style()->color()), svgPaint->uri(), applyPropertyToRegularStyle(), applyPropertyToVisitedLinkStyle());
</del><ins>+ if (is<SVGPaint>(*value)) {
+ SVGPaint& svgPaint = downcast<SVGPaint>(*value);
+ svgStyle.setStrokePaint(svgPaint.paintType(), colorFromSVGColorCSSValue(&svgPaint, state.style()->color()), svgPaint.uri(), applyPropertyToRegularStyle(), applyPropertyToVisitedLinkStyle());
</ins><span class="cx"> }
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case CSSPropertyStrokeDasharray:
</span><span class="cx"> {
</span><span class="cx"> HANDLE_INHERIT_AND_INITIAL(strokeDashArray, StrokeDashArray)
</span><del>- if (!value->isValueList()) {
</del><ins>+ if (!is<CSSValueList>(*value)) {
</ins><span class="cx"> svgStyle.setStrokeDashArray(SVGRenderStyle::initialStrokeDashArray());
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- CSSValueList* dashes = toCSSValueList(value);
</del><ins>+ CSSValueList& dashes = downcast<CSSValueList>(*value);
</ins><span class="cx">
</span><span class="cx"> Vector<SVGLength> array;
</span><del>- size_t length = dashes->length();
</del><ins>+ size_t length = dashes.length();
</ins><span class="cx"> for (size_t i = 0; i < length; ++i) {
</span><del>- CSSValue* currValue = dashes->itemWithoutBoundsCheck(i);
- if (!currValue->isPrimitiveValue())
</del><ins>+ CSSValue* currValue = dashes.itemWithoutBoundsCheck(i);
+ if (!is<CSSPrimitiveValue>(*currValue))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* dash = toCSSPrimitiveValue(dashes->itemWithoutBoundsCheck(i));
</del><ins>+ CSSPrimitiveValue* dash = downcast<CSSPrimitiveValue>(dashes.itemWithoutBoundsCheck(i));
</ins><span class="cx"> array.append(SVGLength::fromCSSPrimitiveValue(dash));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -491,15 +491,15 @@
</span><span class="cx"> case CSSPropertyStopColor:
</span><span class="cx"> {
</span><span class="cx"> HANDLE_INHERIT_AND_INITIAL(stopColor, StopColor);
</span><del>- if (value->isSVGColor())
- svgStyle.setStopColor(colorFromSVGColorCSSValue(toSVGColor(value), state.style()->color()));
</del><ins>+ if (is<SVGColor>(*value))
+ svgStyle.setStopColor(colorFromSVGColorCSSValue(downcast<SVGColor>(value), state.style()->color()));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case CSSPropertyLightingColor:
</span><span class="cx"> {
</span><span class="cx"> HANDLE_INHERIT_AND_INITIAL(lightingColor, LightingColor);
</span><del>- if (value->isSVGColor())
- svgStyle.setLightingColor(colorFromSVGColorCSSValue(toSVGColor(value), state.style()->color()));
</del><ins>+ if (is<SVGColor>(*value))
+ svgStyle.setLightingColor(colorFromSVGColorCSSValue(downcast<SVGColor>(value), state.style()->color()));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case CSSPropertyFloodOpacity:
</span><span class="lines">@@ -523,8 +523,8 @@
</span><span class="cx"> case CSSPropertyFloodColor:
</span><span class="cx"> {
</span><span class="cx"> HANDLE_INHERIT_AND_INITIAL(floodColor, FloodColor);
</span><del>- if (value->isSVGColor())
- svgStyle.setFloodColor(colorFromSVGColorCSSValue(toSVGColor(value), state.style()->color()));
</del><ins>+ if (is<SVGColor>(*value))
+ svgStyle.setFloodColor(colorFromSVGColorCSSValue(downcast<SVGColor>(value), state.style()->color()));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case CSSPropertyGlyphOrientationHorizontal:
</span><span class="lines">@@ -571,27 +571,27 @@
</span><span class="cx"> if (isInitial || primitiveValue) // initial | none
</span><span class="cx"> return svgStyle.setShadow(nullptr);
</span><span class="cx">
</span><del>- if (!value->isValueList())
</del><ins>+ if (!is<CSSValueList>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSValueList* list = toCSSValueList(value);
- if (!list->length())
</del><ins>+ CSSValueList& list = downcast<CSSValueList>(*value);
+ if (!list.length())
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSValue* firstValue = list->itemWithoutBoundsCheck(0);
- if (!firstValue->isShadowValue())
</del><ins>+ CSSValue* firstValue = list.itemWithoutBoundsCheck(0);
+ if (!is<CSSShadowValue>(*firstValue))
</ins><span class="cx"> return;
</span><del>- CSSShadowValue* item = toCSSShadowValue(firstValue);
- IntPoint location(item->x->computeLength<int>(state.cssToLengthConversionData().copyWithAdjustedZoom(1.0f)),
- item->y->computeLength<int>(state.cssToLengthConversionData().copyWithAdjustedZoom(1.0f)));
- int blur = item->blur ? item->blur->computeLength<int>(state.cssToLengthConversionData().copyWithAdjustedZoom(1.0f)) : 0;
</del><ins>+ CSSShadowValue& item = downcast<CSSShadowValue>(*firstValue);
+ IntPoint location(item.x->computeLength<int>(state.cssToLengthConversionData().copyWithAdjustedZoom(1.0f)),
+ item.y->computeLength<int>(state.cssToLengthConversionData().copyWithAdjustedZoom(1.0f)));
+ int blur = item.blur ? item.blur->computeLength<int>(state.cssToLengthConversionData().copyWithAdjustedZoom(1.0f)) : 0;
</ins><span class="cx"> Color color;
</span><del>- if (item->color)
- color = colorFromPrimitiveValue(item->color.get());
</del><ins>+ if (item.color)
+ color = colorFromPrimitiveValue(item.color.get());
</ins><span class="cx">
</span><span class="cx"> // -webkit-svg-shadow does should not have a spread or style
</span><del>- ASSERT(!item->spread);
- ASSERT(!item->style);
</del><ins>+ ASSERT(!item.spread);
+ ASSERT(!item.style);
</ins><span class="cx">
</span><span class="cx"> auto shadowData = std::make_unique<ShadowData>(location, blur, 0, Normal, false, color.isValid() ? color : Color::transparent);
</span><span class="cx"> svgStyle.setShadow(WTF::move(shadowData));
</span></span></pre></div>
<a id="trunkSourceWebCorecssSourceSizeListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SourceSizeList.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SourceSizeList.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/SourceSizeList.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> RefPtr<CSSValue> cssValue = value.createCSSValue();
</span><del>- RefPtr<CSSPrimitiveValue> primitiveValue = toCSSPrimitiveValue(cssValue.get());
</del><ins>+ RefPtr<CSSPrimitiveValue> primitiveValue = downcast<CSSPrimitiveValue>(cssValue.get());
</ins><span class="cx"> return primitiveValue->computeLength<unsigned>(conversionData);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssStylePropertiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleProperties.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleProperties.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/StyleProperties.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -363,7 +363,7 @@
</span><span class="cx"> values[i] = getPropertyCSSValue(shorthand.properties()[i]);
</span><span class="cx"> if (values[i]) {
</span><span class="cx"> if (values[i]->isBaseValueList())
</span><del>- numLayers = std::max(toCSSValueList(values[i].get())->length(), numLayers);
</del><ins>+ numLayers = std::max(downcast<CSSValueList>(*values[i]).length(), numLayers);
</ins><span class="cx"> else
</span><span class="cx"> numLayers = std::max<size_t>(1U, numLayers);
</span><span class="cx"> }
</span><span class="lines">@@ -384,7 +384,7 @@
</span><span class="cx"> RefPtr<CSSValue> value;
</span><span class="cx"> if (values[j]) {
</span><span class="cx"> if (values[j]->isBaseValueList())
</span><del>- value = toCSSValueList(values[j].get())->item(i);
</del><ins>+ value = downcast<CSSValueList>(*values[j]).item(i);
</ins><span class="cx"> else {
</span><span class="cx"> value = values[j];
</span><span class="cx">
</span><span class="lines">@@ -408,16 +408,16 @@
</span><span class="cx"> || (j < size - 1 && shorthand.properties()[j + 1] == CSSPropertyWebkitMaskRepeatY && value)) {
</span><span class="cx"> RefPtr<CSSValue> yValue;
</span><span class="cx"> RefPtr<CSSValue> nextValue = values[j + 1];
</span><del>- if (nextValue->isValueList())
- yValue = toCSSValueList(nextValue.get())->itemWithoutBoundsCheck(i);
</del><ins>+ if (is<CSSValueList>(*nextValue))
+ yValue = downcast<CSSValueList>(*nextValue).itemWithoutBoundsCheck(i);
</ins><span class="cx"> else
</span><span class="cx"> yValue = nextValue;
</span><span class="cx">
</span><del>- if (!value->isPrimitiveValue() || !yValue->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value) || !is<CSSPrimitiveValue>(*yValue))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- CSSValueID xId = toCSSPrimitiveValue(value.get())->getValueID();
- CSSValueID yId = toCSSPrimitiveValue(yValue.get())->getValueID();
</del><ins>+ CSSValueID xId = downcast<CSSPrimitiveValue>(*value).getValueID();
+ CSSValueID yId = downcast<CSSPrimitiveValue>(*yValue).getValueID();
</ins><span class="cx"> if (xId != yId) {
</span><span class="cx"> if (xId == CSSValueRepeat && yId == CSSValueNoRepeat) {
</span><span class="cx"> useRepeatXShorthand = true;
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/StyleResolver.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -1643,13 +1643,13 @@
</span><span class="cx"> switch (property.id()) {
</span><span class="cx"> case CSSPropertyWebkitWritingMode:
</span><span class="cx"> if (!hadImportantWebkitWritingMode || property.isImportant()) {
</span><del>- writingMode = toCSSPrimitiveValue(*property.value());
</del><ins>+ writingMode = downcast<CSSPrimitiveValue>(*property.value());
</ins><span class="cx"> hadImportantWebkitWritingMode = property.isImportant();
</span><span class="cx"> }
</span><span class="cx"> break;
</span><span class="cx"> case CSSPropertyDirection:
</span><span class="cx"> if (!hadImportantDirection || property.isImportant()) {
</span><del>- direction = toCSSPrimitiveValue(*property.value());
</del><ins>+ direction = downcast<CSSPrimitiveValue>(*property.value());
</ins><span class="cx"> hadImportantDirection = property.isImportant();
</span><span class="cx"> }
</span><span class="cx"> break;
</span><span class="lines">@@ -1931,22 +1931,22 @@
</span><span class="cx">
</span><span class="cx"> static bool createGridTrackSize(CSSValue* value, GridTrackSize& trackSize, const StyleResolver::State& state)
</span><span class="cx"> {
</span><del>- if (value->isPrimitiveValue()) {
- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
</del><ins>+ if (is<CSSPrimitiveValue>(*value)) {
+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx"> GridLength workingLength;
</span><del>- if (!createGridTrackBreadth(primitiveValue, state, workingLength))
</del><ins>+ if (!createGridTrackBreadth(&primitiveValue, state, workingLength))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> trackSize.setLength(workingLength);
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- CSSFunctionValue* minmaxFunction = toCSSFunctionValue(value);
- CSSValueList* arguments = minmaxFunction->arguments();
</del><ins>+ CSSFunctionValue& minmaxFunction = downcast<CSSFunctionValue>(*value);
+ CSSValueList* arguments = minmaxFunction.arguments();
</ins><span class="cx"> ASSERT_WITH_SECURITY_IMPLICATION(arguments->length() == 2);
</span><span class="cx"> GridLength minTrackBreadth;
</span><span class="cx"> GridLength maxTrackBreadth;
</span><del>- if (!createGridTrackBreadth(toCSSPrimitiveValue(arguments->itemWithoutBoundsCheck(0)), state, minTrackBreadth) || !createGridTrackBreadth(toCSSPrimitiveValue(arguments->itemWithoutBoundsCheck(1)), state, maxTrackBreadth))
</del><ins>+ if (!createGridTrackBreadth(downcast<CSSPrimitiveValue>(arguments->itemWithoutBoundsCheck(0)), state, minTrackBreadth) || !createGridTrackBreadth(downcast<CSSPrimitiveValue>(arguments->itemWithoutBoundsCheck(1)), state, maxTrackBreadth))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> trackSize.setMinMax(minTrackBreadth, maxTrackBreadth);
</span><span class="lines">@@ -1956,9 +1956,9 @@
</span><span class="cx"> static bool createGridTrackList(CSSValue* value, Vector<GridTrackSize>& trackSizes, NamedGridLinesMap& namedGridLines, OrderedNamedGridLinesMap& orderedNamedGridLines, const StyleResolver::State& state)
</span><span class="cx"> {
</span><span class="cx"> // Handle 'none'.
</span><del>- if (value->isPrimitiveValue()) {
- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- return primitiveValue->getValueID() == CSSValueNone;
</del><ins>+ if (is<CSSPrimitiveValue>(*value)) {
+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ return primitiveValue.getValueID() == CSSValueNone;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!value->isValueList())
</span><span class="lines">@@ -1967,10 +1967,10 @@
</span><span class="cx"> size_t currentNamedGridLine = 0;
</span><span class="cx"> for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {
</span><span class="cx"> CSSValue* currValue = i.value();
</span><del>- if (currValue->isGridLineNamesValue()) {
- CSSGridLineNamesValue* lineNamesValue = toCSSGridLineNamesValue(currValue);
- for (CSSValueListIterator j = lineNamesValue; j.hasMore(); j.advance()) {
- String namedGridLine = toCSSPrimitiveValue(j.value())->getStringValue();
</del><ins>+ if (is<CSSGridLineNamesValue>(*currValue)) {
+ CSSGridLineNamesValue& lineNamesValue = downcast<CSSGridLineNamesValue>(*currValue);
+ for (CSSValueListIterator j = &lineNamesValue; j.hasMore(); j.advance()) {
+ String namedGridLine = downcast<CSSPrimitiveValue>(j.value())->getStringValue();
</ins><span class="cx"> NamedGridLinesMap::AddResult result = namedGridLines.add(namedGridLine, Vector<size_t>());
</span><span class="cx"> result.iterator->value.append(currentNamedGridLine);
</span><span class="cx"> OrderedNamedGridLinesMap::AddResult orderedResult = orderedNamedGridLines.add(currentNamedGridLine, Vector<String>());
</span><span class="lines">@@ -1998,37 +1998,37 @@
</span><span class="cx"> {
</span><span class="cx"> // We accept the specification's grammar:
</span><span class="cx"> // auto | <custom-ident> | [ <integer> && <custom-ident>? ] | [ span && [ <integer> || <custom-ident> ] ]
</span><del>- if (value->isPrimitiveValue()) {
- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
</del><ins>+ if (is<CSSPrimitiveValue>(*value)) {
+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx"> // We translate <ident> to <string> during parsing as it makes handling it simpler.
</span><del>- if (primitiveValue->isString()) {
- position.setNamedGridArea(primitiveValue->getStringValue());
</del><ins>+ if (primitiveValue.isString()) {
+ position.setNamedGridArea(primitiveValue.getStringValue());
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- ASSERT(primitiveValue->getValueID() == CSSValueAuto);
</del><ins>+ ASSERT(primitiveValue.getValueID() == CSSValueAuto);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- CSSValueList* values = toCSSValueList(value);
- ASSERT(values->length());
</del><ins>+ CSSValueList& values = downcast<CSSValueList>(*value);
+ ASSERT(values.length());
</ins><span class="cx">
</span><span class="cx"> bool isSpanPosition = false;
</span><span class="cx"> int gridLineNumber = 0;
</span><span class="cx"> String gridLineName;
</span><span class="cx">
</span><del>- CSSValueListIterator it = values;
- CSSPrimitiveValue* currentValue = toCSSPrimitiveValue(it.value());
</del><ins>+ CSSValueListIterator it = &values;
+ CSSPrimitiveValue* currentValue = downcast<CSSPrimitiveValue>(it.value());
</ins><span class="cx"> if (currentValue->getValueID() == CSSValueSpan) {
</span><span class="cx"> isSpanPosition = true;
</span><span class="cx"> it.advance();
</span><del>- currentValue = it.hasMore() ? toCSSPrimitiveValue(it.value()) : 0;
</del><ins>+ currentValue = it.hasMore() ? downcast<CSSPrimitiveValue>(it.value()) : nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (currentValue && currentValue->isNumber()) {
</span><span class="cx"> gridLineNumber = currentValue->getIntValue();
</span><span class="cx"> it.advance();
</span><del>- currentValue = it.hasMore() ? toCSSPrimitiveValue(it.value()) : 0;
</del><ins>+ currentValue = it.hasMore() ? downcast<CSSPrimitiveValue>(it.value()) : nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (currentValue && currentValue->isString()) {
</span><span class="lines">@@ -2055,7 +2055,7 @@
</span><span class="cx">
</span><span class="cx"> Length StyleResolver::parseSnapCoordinate(CSSValueList& valueList, unsigned offset)
</span><span class="cx"> {
</span><del>- return parseSnapCoordinate(toCSSPrimitiveValue(*valueList.item(offset)));
</del><ins>+ return parseSnapCoordinate(downcast<CSSPrimitiveValue>(*valueList.item(offset)));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> LengthSize StyleResolver::parseSnapCoordinatePair(CSSValueList& valueList, unsigned offset)
</span><span class="lines">@@ -2067,14 +2067,14 @@
</span><span class="cx"> {
</span><span class="cx"> ScrollSnapPoints points;
</span><span class="cx">
</span><del>- if (value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() == CSSValueElements) {
</del><ins>+ if (is<CSSPrimitiveValue>(value) && downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueElements) {
</ins><span class="cx"> points.usesElements = true;
</span><span class="cx"> return points;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> points.hasRepeat = false;
</span><span class="cx"> for (CSSValueListIterator it(&value); it.hasMore(); it.advance()) {
</span><del>- auto& itemValue = toCSSPrimitiveValue(*it.value());
</del><ins>+ auto& itemValue = downcast<CSSPrimitiveValue>(*it.value());
</ins><span class="cx"> if (auto* lengthRepeat = itemValue.getLengthRepeatValue()) {
</span><span class="cx"> if (auto* interval = lengthRepeat->interval()) {
</span><span class="cx"> points.repeatOffset = parseSnapCoordinate(*interval);
</span><span class="lines">@@ -2127,7 +2127,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = value->isPrimitiveValue() ? toCSSPrimitiveValue(value) : 0;
</del><ins>+ CSSPrimitiveValue* primitiveValue = is<CSSPrimitiveValue>(*value) ? downcast<CSSPrimitiveValue>(value) : nullptr;
</ins><span class="cx">
</span><span class="cx"> // What follows is a list that maps the CSS properties into their corresponding front-end
</span><span class="cx"> // RenderStyle values.
</span><span class="lines">@@ -2150,48 +2150,48 @@
</span><span class="cx"> bool didSet = false;
</span><span class="cx"> for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {
</span><span class="cx"> CSSValue* item = i.value();
</span><del>- if (item->isImageGeneratorValue()) {
- if (item->isGradientValue())
- state.style()->setContent(StyleGeneratedImage::create(*toCSSGradientValue(item)->gradientWithStylesResolved(this)), didSet);
</del><ins>+ if (is<CSSImageGeneratorValue>(*item)) {
+ if (is<CSSGradientValue>(*item))
+ state.style()->setContent(StyleGeneratedImage::create(*downcast<CSSGradientValue>(*item).gradientWithStylesResolved(this)), didSet);
</ins><span class="cx"> else
</span><del>- state.style()->setContent(StyleGeneratedImage::create(*toCSSImageGeneratorValue(item)), didSet);
</del><ins>+ state.style()->setContent(StyleGeneratedImage::create(downcast<CSSImageGeneratorValue>(*item)), didSet);
</ins><span class="cx"> didSet = true;
</span><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><del>- } else if (item->isImageSetValue()) {
- state.style()->setContent(setOrPendingFromValue(CSSPropertyContent, toCSSImageSetValue(item)), didSet);
</del><ins>+ } else if (is<CSSImageSetValue>(*item)) {
+ state.style()->setContent(setOrPendingFromValue(CSSPropertyContent, downcast<CSSImageSetValue>(item)), didSet);
</ins><span class="cx"> didSet = true;
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (item->isImageValue()) {
- state.style()->setContent(cachedOrPendingFromValue(CSSPropertyContent, toCSSImageValue(item)), didSet);
</del><ins>+ if (is<CSSImageValue>(*item)) {
+ state.style()->setContent(cachedOrPendingFromValue(CSSPropertyContent, downcast<CSSImageValue>(item)), didSet);
</ins><span class="cx"> didSet = true;
</span><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!item->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*item))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* contentValue = toCSSPrimitiveValue(item);
</del><ins>+ CSSPrimitiveValue& contentValue = downcast<CSSPrimitiveValue>(*item);
</ins><span class="cx">
</span><del>- if (contentValue->isString()) {
- state.style()->setContent(contentValue->getStringValue().impl(), didSet);
</del><ins>+ if (contentValue.isString()) {
+ state.style()->setContent(contentValue.getStringValue().impl(), didSet);
</ins><span class="cx"> didSet = true;
</span><del>- } else if (contentValue->isAttr()) {
</del><ins>+ } else if (contentValue.isAttr()) {
</ins><span class="cx"> // FIXME: Can a namespace be specified for an attr(foo)?
</span><span class="cx"> if (state.style()->styleType() == NOPSEUDO)
</span><span class="cx"> state.style()->setUnique();
</span><span class="cx"> else
</span><span class="cx"> state.parentStyle()->setUnique();
</span><del>- QualifiedName attr(nullAtom, contentValue->getStringValue().impl(), nullAtom);
</del><ins>+ QualifiedName attr(nullAtom, contentValue.getStringValue().impl(), nullAtom);
</ins><span class="cx"> const AtomicString& value = state.element()->getAttribute(attr);
</span><span class="cx"> state.style()->setContent(value.isNull() ? emptyAtom : value.impl(), didSet);
</span><span class="cx"> didSet = true;
</span><span class="cx"> // Register the fact that the attribute value affects the style.
</span><span class="cx"> m_ruleSets.features().attributeCanonicalLocalNamesInRules.add(attr.localName().impl());
</span><span class="cx"> m_ruleSets.features().attributeLocalNamesInRules.add(attr.localName().impl());
</span><del>- } else if (contentValue->isCounter()) {
- Counter* counterValue = contentValue->getCounterValue();
</del><ins>+ } else if (contentValue.isCounter()) {
+ Counter* counterValue = contentValue.getCounterValue();
</ins><span class="cx"> EListStyleType listStyleType = NoneListStyle;
</span><span class="cx"> CSSValueID listStyleIdent = counterValue->listStyleIdent();
</span><span class="cx"> if (listStyleIdent != CSSValueNone)
</span><span class="lines">@@ -2200,7 +2200,7 @@
</span><span class="cx"> state.style()->setContent(WTF::move(counter), didSet);
</span><span class="cx"> didSet = true;
</span><span class="cx"> } else {
</span><del>- switch (contentValue->getValueID()) {
</del><ins>+ switch (contentValue.getValueID()) {
</ins><span class="cx"> case CSSValueOpenQuote:
</span><span class="cx"> state.style()->setContent(OPEN_QUOTE, didSet);
</span><span class="cx"> didSet = true;
</span><span class="lines">@@ -2258,22 +2258,20 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> if (isInitial) {
</span><del>- state.style()->setQuotes(0);
</del><ins>+ state.style()->setQuotes(nullptr);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><del>- if (value->isValueList()) {
- CSSValueList* list = toCSSValueList(value);
</del><ins>+ if (is<CSSValueList>(*value)) {
+ CSSValueList& list = downcast<CSSValueList>(*value);
</ins><span class="cx"> Vector<std::pair<String, String>> quotes;
</span><del>- for (size_t i = 0; i < list->length(); i += 2) {
- CSSValue* first = list->itemWithoutBoundsCheck(i);
</del><ins>+ for (size_t i = 0; i < list.length(); i += 2) {
+ CSSValue* first = list.itemWithoutBoundsCheck(i);
</ins><span class="cx"> // item() returns null if out of bounds so this is safe.
</span><del>- CSSValue* second = list->item(i + 1);
</del><ins>+ CSSValue* second = list.item(i + 1);
</ins><span class="cx"> if (!second)
</span><span class="cx"> continue;
</span><del>- ASSERT_WITH_SECURITY_IMPLICATION(first->isPrimitiveValue());
- ASSERT_WITH_SECURITY_IMPLICATION(second->isPrimitiveValue());
- String startQuote = toCSSPrimitiveValue(first)->getStringValue();
- String endQuote = toCSSPrimitiveValue(second)->getStringValue();
</del><ins>+ String startQuote = downcast<CSSPrimitiveValue>(*first).getStringValue();
+ String endQuote = downcast<CSSPrimitiveValue>(*second).getStringValue();
</ins><span class="cx"> quotes.append(std::make_pair(startQuote, endQuote));
</span><span class="cx"> }
</span><span class="cx"> state.style()->setQuotes(QuotesData::create(quotes));
</span><span class="lines">@@ -2318,24 +2316,24 @@
</span><span class="cx"> fontDescription.setComputedSize(Style::computedFontSizeFromSpecifiedSize(fontDescription.specifiedSize(), fontDescription.isAbsoluteSize(), useSVGZoomRules(), state.style(), document()));
</span><span class="cx"> setFontDescription(fontDescription);
</span><span class="cx"> }
</span><del>- } else if (value->isFontValue()) {
- CSSFontValue* font = toCSSFontValue(value);
- if (!font->style || !font->variant || !font->weight
- || !font->size || !font->lineHeight || !font->family)
</del><ins>+ } else if (is<CSSFontValue>(*value)) {
+ CSSFontValue& font = downcast<CSSFontValue>(*value);
+ if (!font.style || !font.variant || !font.weight
+ || !font.size || !font.lineHeight || !font.family)
</ins><span class="cx"> return;
</span><del>- applyProperty(CSSPropertyFontStyle, font->style.get());
- applyProperty(CSSPropertyFontVariant, font->variant.get());
- applyProperty(CSSPropertyFontWeight, font->weight.get());
</del><ins>+ applyProperty(CSSPropertyFontStyle, font.style.get());
+ applyProperty(CSSPropertyFontVariant, font.variant.get());
+ applyProperty(CSSPropertyFontWeight, font.weight.get());
</ins><span class="cx"> // The previous properties can dirty our font but they don't try to read the font's
</span><span class="cx"> // properties back, which is safe. However if font-size is using the 'ex' unit, it will
</span><span class="cx"> // need query the dirtied font's x-height to get the computed size. To be safe in this
</span><span class="cx"> // case, let's just update the font now.
</span><span class="cx"> updateFont();
</span><del>- applyProperty(CSSPropertyFontSize, font->size.get());
</del><ins>+ applyProperty(CSSPropertyFontSize, font.size.get());
</ins><span class="cx">
</span><del>- state.setLineHeightValue(font->lineHeight.get());
</del><ins>+ state.setLineHeightValue(font.lineHeight.get());
</ins><span class="cx">
</span><del>- applyProperty(CSSPropertyFontFamily, font->family.get());
</del><ins>+ applyProperty(CSSPropertyFontFamily, font.family.get());
</ins><span class="cx"> }
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -2405,17 +2403,17 @@
</span><span class="cx">
</span><span class="cx"> for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {
</span><span class="cx"> CSSValue* currValue = i.value();
</span><del>- if (!currValue->isShadowValue())
</del><ins>+ if (!is<CSSShadowValue>(*currValue))
</ins><span class="cx"> continue;
</span><del>- CSSShadowValue* item = toCSSShadowValue(currValue);
- int x = item->x->computeLength<int>(state.cssToLengthConversionData());
- int y = item->y->computeLength<int>(state.cssToLengthConversionData());
- int blur = item->blur ? item->blur->computeLength<int>(state.cssToLengthConversionData()) : 0;
- int spread = item->spread ? item->spread->computeLength<int>(state.cssToLengthConversionData()) : 0;
- ShadowStyle shadowStyle = item->style && item->style->getValueID() == CSSValueInset ? Inset : Normal;
</del><ins>+ CSSShadowValue& item = downcast<CSSShadowValue>(*currValue);
+ int x = item.x->computeLength<int>(state.cssToLengthConversionData());
+ int y = item.y->computeLength<int>(state.cssToLengthConversionData());
+ int blur = item.blur ? item.blur->computeLength<int>(state.cssToLengthConversionData()) : 0;
+ int spread = item.spread ? item.spread->computeLength<int>(state.cssToLengthConversionData()) : 0;
+ ShadowStyle shadowStyle = item.style && item.style->getValueID() == CSSValueInset ? Inset : Normal;
</ins><span class="cx"> Color color;
</span><del>- if (item->color)
- color = colorFromPrimitiveValue(item->color.get());
</del><ins>+ if (item.color)
+ color = colorFromPrimitiveValue(item.color.get());
</ins><span class="cx"> else if (state.style())
</span><span class="cx"> color = state.style()->color();
</span><span class="cx">
</span><span class="lines">@@ -2434,17 +2432,17 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isReflectValue())
</del><ins>+ if (!is<CSSReflectValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSReflectValue* reflectValue = toCSSReflectValue(value);
</del><ins>+ CSSReflectValue& reflectValue = downcast<CSSReflectValue>(*value);
</ins><span class="cx"> RefPtr<StyleReflection> reflection = StyleReflection::create();
</span><del>- reflection->setDirection(*reflectValue->direction());
- if (reflectValue->offset())
- reflection->setOffset(reflectValue->offset()->convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion>(state.cssToLengthConversionData()));
</del><ins>+ reflection->setDirection(*reflectValue.direction());
+ if (reflectValue.offset())
+ reflection->setOffset(reflectValue.offset()->convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion>(state.cssToLengthConversionData()));
</ins><span class="cx"> NinePieceImage mask;
</span><span class="cx"> mask.setMaskDefaults();
</span><del>- m_styleMap.mapNinePieceImage(id, reflectValue->mask(), mask);
</del><ins>+ m_styleMap.mapNinePieceImage(id, reflectValue.mask(), mask);
</ins><span class="cx"> reflection->setMask(mask);
</span><span class="cx">
</span><span class="cx"> state.style()->setBoxReflect(reflection.release());
</span><span class="lines">@@ -2665,10 +2663,10 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isLineBoxContainValue())
</del><ins>+ if (!is<CSSLineBoxContainValue>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- state.style()->setLineBoxContain(toCSSLineBoxContainValue(value)->value());
</del><ins>+ state.style()->setLineBoxContain(downcast<CSSLineBoxContainValue>(*value).value());
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2679,19 +2677,19 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!value->isValueList())
</del><ins>+ if (!is<CSSValueList>(*value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> FontDescription fontDescription = state.style()->fontDescription();
</span><del>- CSSValueList* list = toCSSValueList(value);
</del><ins>+ CSSValueList& list = downcast<CSSValueList>(*value);
</ins><span class="cx"> RefPtr<FontFeatureSettings> settings = FontFeatureSettings::create();
</span><del>- int len = list->length();
- for (int i = 0; i < len; ++i) {
- CSSValue* item = list->itemWithoutBoundsCheck(i);
- if (!item->isFontFeatureValue())
</del><ins>+ int length = list.length();
+ for (int i = 0; i < length; ++i) {
+ CSSValue* item = list.itemWithoutBoundsCheck(i);
+ if (!is<CSSFontFeatureValue>(*item))
</ins><span class="cx"> continue;
</span><del>- CSSFontFeatureValue* feature = toCSSFontFeatureValue(item);
- settings->append(FontFeature(feature->tag(), feature->value()));
</del><ins>+ CSSFontFeatureValue& feature = downcast<CSSFontFeatureValue>(*item);
+ settings->append(FontFeature(feature.tag(), feature.value()));
</ins><span class="cx"> }
</span><span class="cx"> fontDescription.setFeatureSettings(settings.release());
</span><span class="cx"> setFontDescription(fontDescription);
</span><span class="lines">@@ -2830,8 +2828,8 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- CSSGridTemplateAreasValue* gridTemplateAreasValue = toCSSGridTemplateAreasValue(value);
- const NamedGridAreaMap& newNamedGridAreas = gridTemplateAreasValue->gridAreaMap();
</del><ins>+ CSSGridTemplateAreasValue& gridTemplateAreasValue = downcast<CSSGridTemplateAreasValue>(*value);
+ const NamedGridAreaMap& newNamedGridAreas = gridTemplateAreasValue.gridAreaMap();
</ins><span class="cx">
</span><span class="cx"> NamedGridLinesMap namedGridColumnLines = state.style()->namedGridColumnLines();
</span><span class="cx"> NamedGridLinesMap namedGridRowLines = state.style()->namedGridRowLines();
</span><span class="lines">@@ -2840,27 +2838,27 @@
</span><span class="cx"> state.style()->setNamedGridColumnLines(namedGridColumnLines);
</span><span class="cx"> state.style()->setNamedGridRowLines(namedGridRowLines);
</span><span class="cx">
</span><del>- state.style()->setNamedGridArea(gridTemplateAreasValue->gridAreaMap());
- state.style()->setNamedGridAreaRowCount(gridTemplateAreasValue->rowCount());
- state.style()->setNamedGridAreaColumnCount(gridTemplateAreasValue->columnCount());
</del><ins>+ state.style()->setNamedGridArea(gridTemplateAreasValue.gridAreaMap());
+ state.style()->setNamedGridAreaRowCount(gridTemplateAreasValue.rowCount());
+ state.style()->setNamedGridAreaColumnCount(gridTemplateAreasValue.columnCount());
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> case CSSPropertyWebkitGridAutoFlow: {
</span><span class="cx"> HANDLE_INHERIT_AND_INITIAL(gridAutoFlow, GridAutoFlow);
</span><del>- if (!value->isValueList())
</del><ins>+ if (!is<CSSValueList>(*value))
</ins><span class="cx"> return;
</span><del>- CSSValueList* list = toCSSValueList(value);
</del><ins>+ CSSValueList& list = downcast<CSSValueList>(*value);
</ins><span class="cx">
</span><del>- if (!list->length()) {
</del><ins>+ if (!list.length()) {
</ins><span class="cx"> state.style()->setGridAutoFlow(RenderStyle::initialGridAutoFlow());
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- CSSPrimitiveValue* first = toCSSPrimitiveValue(list->item(0));
- CSSPrimitiveValue* second = list->length() == 2 ? toCSSPrimitiveValue(list->item(1)) : nullptr;
</del><ins>+ CSSPrimitiveValue& first = downcast<CSSPrimitiveValue>(*list.item(0));
+ CSSPrimitiveValue* second = list.length() == 2 ? downcast<CSSPrimitiveValue>(list.item(1)) : nullptr;
</ins><span class="cx">
</span><span class="cx"> GridAutoFlow autoFlow = RenderStyle::initialGridAutoFlow();
</span><del>- switch (first->getValueID()) {
</del><ins>+ switch (first.getValueID()) {
</ins><span class="cx"> case CSSValueRow:
</span><span class="cx"> if (second)
</span><span class="cx"> autoFlow = second->getValueID() == CSSValueDense ? AutoFlowRowDense : AutoFlowStackRow;
</span><span class="lines">@@ -2907,12 +2905,12 @@
</span><span class="cx"> break;
</span><span class="cx"> case CSSPropertyWebkitScrollSnapDestination: {
</span><span class="cx"> HANDLE_INHERIT_AND_INITIAL(scrollSnapDestination, ScrollSnapDestination)
</span><del>- state.style()->setScrollSnapDestination(parseSnapCoordinatePair(toCSSValueList(*value), 0));
</del><ins>+ state.style()->setScrollSnapDestination(parseSnapCoordinatePair(downcast<CSSValueList>(*value), 0));
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> case CSSPropertyWebkitScrollSnapCoordinate: {
</span><span class="cx"> HANDLE_INHERIT_AND_INITIAL(scrollSnapCoordinates, ScrollSnapCoordinates)
</span><del>- CSSValueList& valueList = toCSSValueList(*value);
</del><ins>+ CSSValueList& valueList = downcast<CSSValueList>(*value);
</ins><span class="cx"> ASSERT(!(valueList.length() % 2));
</span><span class="cx"> size_t pointCount = valueList.length() / 2;
</span><span class="cx"> Vector<LengthSize> coordinates;
</span><span class="lines">@@ -3220,24 +3218,24 @@
</span><span class="cx">
</span><span class="cx"> PassRefPtr<StyleImage> StyleResolver::styleImage(CSSPropertyID property, CSSValue* value)
</span><span class="cx"> {
</span><del>- if (value->isImageValue())
- return cachedOrPendingFromValue(property, toCSSImageValue(value));
</del><ins>+ if (is<CSSImageValue>(*value))
+ return cachedOrPendingFromValue(property, downcast<CSSImageValue>(value));
</ins><span class="cx">
</span><del>- if (value->isImageGeneratorValue()) {
- if (value->isGradientValue())
- return generatedOrPendingFromValue(property, *toCSSGradientValue(value)->gradientWithStylesResolved(this));
- return generatedOrPendingFromValue(property, toCSSImageGeneratorValue(*value));
</del><ins>+ if (is<CSSImageGeneratorValue>(*value)) {
+ if (is<CSSGradientValue>(*value))
+ return generatedOrPendingFromValue(property, *downcast<CSSGradientValue>(*value).gradientWithStylesResolved(this));
+ return generatedOrPendingFromValue(property, downcast<CSSImageGeneratorValue>(*value));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><del>- if (value->isImageSetValue())
- return setOrPendingFromValue(property, toCSSImageSetValue(value));
</del><ins>+ if (is<CSSImageSetValue>(*value))
+ return setOrPendingFromValue(property, downcast<CSSImageSetValue>(value));
</ins><span class="cx"> #endif
</span><span class="cx">
</span><del>- if (value->isCursorImageValue())
- return cursorOrPendingFromValue(property, toCSSCursorImageValue(value));
</del><ins>+ if (is<CSSCursorImageValue>(*value))
+ return cursorOrPendingFromValue(property, downcast<CSSCursorImageValue>(value));
</ins><span class="cx">
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PassRefPtr<StyleImage> StyleResolver::cachedOrPendingFromValue(CSSPropertyID property, CSSImageValue* value)
</span><span class="lines">@@ -3250,9 +3248,9 @@
</span><span class="cx">
</span><span class="cx"> PassRefPtr<StyleImage> StyleResolver::generatedOrPendingFromValue(CSSPropertyID property, CSSImageGeneratorValue& value)
</span><span class="cx"> {
</span><del>- if (value.isFilterImageValue()) {
</del><ins>+ if (is<CSSFilterImageValue>(value)) {
</ins><span class="cx"> // FilterImage needs to calculate FilterOperations.
</span><del>- toCSSFilterImageValue(value).createFilterOperations(this);
</del><ins>+ downcast<CSSFilterImageValue>(value).createFilterOperations(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (value.isPending()) {
</span><span class="lines">@@ -3517,9 +3515,9 @@
</span><span class="cx"> if (!inValue)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- if (inValue->isPrimitiveValue()) {
- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(inValue);
- if (primitiveValue->getValueID() == CSSValueNone)
</del><ins>+ if (is<CSSPrimitiveValue>(*inValue)) {
+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*inValue);
+ if (primitiveValue.getValueID() == CSSValueNone)
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3529,21 +3527,21 @@
</span><span class="cx"> FilterOperations operations;
</span><span class="cx"> for (CSSValueListIterator i = inValue; i.hasMore(); i.advance()) {
</span><span class="cx"> CSSValue* currValue = i.value();
</span><del>- if (!currValue->isWebKitCSSFilterValue())
</del><ins>+ if (!is<WebKitCSSFilterValue>(*currValue))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- WebKitCSSFilterValue* filterValue = toWebKitCSSFilterValue(i.value());
- FilterOperation::OperationType operationType = filterOperationForType(filterValue->operationType());
</del><ins>+ WebKitCSSFilterValue& filterValue = downcast<WebKitCSSFilterValue>(*i.value());
+ FilterOperation::OperationType operationType = filterOperationForType(filterValue.operationType());
</ins><span class="cx">
</span><span class="cx"> if (operationType == FilterOperation::REFERENCE) {
</span><del>- if (filterValue->length() != 1)
</del><ins>+ if (filterValue.length() != 1)
</ins><span class="cx"> continue;
</span><del>- CSSValue* argument = filterValue->itemWithoutBoundsCheck(0);
</del><ins>+ CSSValue& argument = *filterValue.itemWithoutBoundsCheck(0);
</ins><span class="cx">
</span><del>- if (!argument->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(argument))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(*argument);
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(argument);
</ins><span class="cx"> String cssUrl = primitiveValue.getStringValue();
</span><span class="cx"> URL url = m_state.document().completeURL(cssUrl);
</span><span class="cx">
</span><span class="lines">@@ -3560,24 +3558,24 @@
</span><span class="cx"> CSSPrimitiveValue* firstValue = nullptr;
</span><span class="cx"> if (operationType != FilterOperation::DROP_SHADOW) {
</span><span class="cx"> bool haveNonPrimitiveValue = false;
</span><del>- for (unsigned j = 0; j < filterValue->length(); ++j) {
- if (!filterValue->itemWithoutBoundsCheck(j)->isPrimitiveValue()) {
</del><ins>+ for (unsigned j = 0; j < filterValue.length(); ++j) {
+ if (!is<CSSPrimitiveValue>(*filterValue.itemWithoutBoundsCheck(j))) {
</ins><span class="cx"> haveNonPrimitiveValue = true;
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if (haveNonPrimitiveValue)
</span><span class="cx"> continue;
</span><del>- if (filterValue->length())
- firstValue = toCSSPrimitiveValue(filterValue->itemWithoutBoundsCheck(0));
</del><ins>+ if (filterValue.length())
+ firstValue = downcast<CSSPrimitiveValue>(filterValue.itemWithoutBoundsCheck(0));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- switch (filterValue->operationType()) {
</del><ins>+ switch (filterValue.operationType()) {
</ins><span class="cx"> case WebKitCSSFilterValue::GrayscaleFilterOperation:
</span><span class="cx"> case WebKitCSSFilterValue::SepiaFilterOperation:
</span><span class="cx"> case WebKitCSSFilterValue::SaturateFilterOperation: {
</span><span class="cx"> double amount = 1;
</span><del>- if (filterValue->length() == 1) {
</del><ins>+ if (filterValue.length() == 1) {
</ins><span class="cx"> amount = firstValue->getDoubleValue();
</span><span class="cx"> if (firstValue->isPercentage())
</span><span class="cx"> amount /= 100;
</span><span class="lines">@@ -3588,7 +3586,7 @@
</span><span class="cx"> }
</span><span class="cx"> case WebKitCSSFilterValue::HueRotateFilterOperation: {
</span><span class="cx"> double angle = 0;
</span><del>- if (filterValue->length() == 1)
</del><ins>+ if (filterValue.length() == 1)
</ins><span class="cx"> angle = firstValue->computeDegrees();
</span><span class="cx">
</span><span class="cx"> operations.operations().append(BasicColorMatrixFilterOperation::create(angle, operationType));
</span><span class="lines">@@ -3598,8 +3596,8 @@
</span><span class="cx"> case WebKitCSSFilterValue::BrightnessFilterOperation:
</span><span class="cx"> case WebKitCSSFilterValue::ContrastFilterOperation:
</span><span class="cx"> case WebKitCSSFilterValue::OpacityFilterOperation: {
</span><del>- double amount = (filterValue->operationType() == WebKitCSSFilterValue::BrightnessFilterOperation) ? 0 : 1;
- if (filterValue->length() == 1) {
</del><ins>+ double amount = (filterValue.operationType() == WebKitCSSFilterValue::BrightnessFilterOperation) ? 0 : 1;
+ if (filterValue.length() == 1) {
</ins><span class="cx"> amount = firstValue->getDoubleValue();
</span><span class="cx"> if (firstValue->isPercentage())
</span><span class="cx"> amount /= 100;
</span><span class="lines">@@ -3610,7 +3608,7 @@
</span><span class="cx"> }
</span><span class="cx"> case WebKitCSSFilterValue::BlurFilterOperation: {
</span><span class="cx"> Length stdDeviation = Length(0, Fixed);
</span><del>- if (filterValue->length() >= 1)
</del><ins>+ if (filterValue.length() >= 1)
</ins><span class="cx"> stdDeviation = convertToFloatLength(firstValue, state.cssToLengthConversionData());
</span><span class="cx"> if (stdDeviation.isUndefined())
</span><span class="cx"> return false;
</span><span class="lines">@@ -3619,21 +3617,21 @@
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case WebKitCSSFilterValue::DropShadowFilterOperation: {
</span><del>- if (filterValue->length() != 1)
</del><ins>+ if (filterValue.length() != 1)
</ins><span class="cx"> return false;
</span><span class="cx">
</span><del>- CSSValue* cssValue = filterValue->itemWithoutBoundsCheck(0);
- if (!cssValue->isShadowValue())
</del><ins>+ CSSValue& cssValue = *filterValue.itemWithoutBoundsCheck(0);
+ if (!is<CSSShadowValue>(cssValue))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- CSSShadowValue* item = toCSSShadowValue(cssValue);
- int x = item->x->computeLength<int>(state.cssToLengthConversionData());
- int y = item->y->computeLength<int>(state.cssToLengthConversionData());
</del><ins>+ CSSShadowValue& item = downcast<CSSShadowValue>(cssValue);
+ int x = item.x->computeLength<int>(state.cssToLengthConversionData());
+ int y = item.y->computeLength<int>(state.cssToLengthConversionData());
</ins><span class="cx"> IntPoint location(x, y);
</span><del>- int blur = item->blur ? item->blur->computeLength<int>(state.cssToLengthConversionData()) : 0;
</del><ins>+ int blur = item.blur ? item.blur->computeLength<int>(state.cssToLengthConversionData()) : 0;
</ins><span class="cx"> Color color;
</span><del>- if (item->color)
- color = colorFromPrimitiveValue(item->color.get());
</del><ins>+ if (item.color)
+ color = colorFromPrimitiveValue(item.color.get());
</ins><span class="cx">
</span><span class="cx"> operations.operations().append(DropShadowFilterOperation::create(location, blur, color.isValid() ? color : Color::transparent));
</span><span class="cx"> break;
</span></span></pre></div>
<a id="trunkSourceWebCorecssTransformFunctionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/TransformFunctions.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/TransformFunctions.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/TransformFunctions.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -90,18 +90,18 @@
</span><span class="cx">
</span><span class="cx"> TransformOperations operations;
</span><span class="cx"> for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {
</span><del>- CSSValue* currValue = i.value();
</del><ins>+ CSSValue& currValue = *i.value();
</ins><span class="cx">
</span><del>- if (!currValue->isWebKitCSSTransformValue())
</del><ins>+ if (!is<WebKitCSSTransformValue>(currValue))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- WebKitCSSTransformValue* transformValue = toWebKitCSSTransformValue(i.value());
- if (!transformValue->length())
</del><ins>+ WebKitCSSTransformValue& transformValue = downcast<WebKitCSSTransformValue>(currValue);
+ if (!transformValue.length())
</ins><span class="cx"> continue;
</span><span class="cx">
</span><span class="cx"> bool haveNonPrimitiveValue = false;
</span><del>- for (unsigned j = 0; j < transformValue->length(); ++j) {
- if (!transformValue->itemWithoutBoundsCheck(j)->isPrimitiveValue()) {
</del><ins>+ for (unsigned j = 0; j < transformValue.length(); ++j) {
+ if (!is<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(j))) {
</ins><span class="cx"> haveNonPrimitiveValue = true;
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -109,27 +109,27 @@
</span><span class="cx"> if (haveNonPrimitiveValue)
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* firstValue = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(0));
</del><ins>+ CSSPrimitiveValue& firstValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(0));
</ins><span class="cx">
</span><del>- switch (transformValue->operationType()) {
</del><ins>+ switch (transformValue.operationType()) {
</ins><span class="cx"> case WebKitCSSTransformValue::ScaleTransformOperation:
</span><span class="cx"> case WebKitCSSTransformValue::ScaleXTransformOperation:
</span><span class="cx"> case WebKitCSSTransformValue::ScaleYTransformOperation: {
</span><span class="cx"> double sx = 1.0;
</span><span class="cx"> double sy = 1.0;
</span><del>- if (transformValue->operationType() == WebKitCSSTransformValue::ScaleYTransformOperation)
- sy = firstValue->getDoubleValue();
</del><ins>+ if (transformValue.operationType() == WebKitCSSTransformValue::ScaleYTransformOperation)
+ sy = firstValue.getDoubleValue();
</ins><span class="cx"> else {
</span><del>- sx = firstValue->getDoubleValue();
- if (transformValue->operationType() != WebKitCSSTransformValue::ScaleXTransformOperation) {
- if (transformValue->length() > 1) {
- CSSPrimitiveValue* secondValue = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(1));
- sy = secondValue->getDoubleValue();
</del><ins>+ sx = firstValue.getDoubleValue();
+ if (transformValue.operationType() != WebKitCSSTransformValue::ScaleXTransformOperation) {
+ if (transformValue.length() > 1) {
+ CSSPrimitiveValue& secondValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1));
+ sy = secondValue.getDoubleValue();
</ins><span class="cx"> } else
</span><span class="cx"> sy = sx;
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- operations.operations().append(ScaleTransformOperation::create(sx, sy, 1.0, transformOperationType(transformValue->operationType())));
</del><ins>+ operations.operations().append(ScaleTransformOperation::create(sx, sy, 1.0, transformOperationType(transformValue.operationType())));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case WebKitCSSTransformValue::ScaleZTransformOperation:
</span><span class="lines">@@ -137,25 +137,25 @@
</span><span class="cx"> double sx = 1.0;
</span><span class="cx"> double sy = 1.0;
</span><span class="cx"> double sz = 1.0;
</span><del>- if (transformValue->operationType() == WebKitCSSTransformValue::ScaleZTransformOperation)
- sz = firstValue->getDoubleValue();
- else if (transformValue->operationType() == WebKitCSSTransformValue::ScaleYTransformOperation)
- sy = firstValue->getDoubleValue();
</del><ins>+ if (transformValue.operationType() == WebKitCSSTransformValue::ScaleZTransformOperation)
+ sz = firstValue.getDoubleValue();
+ else if (transformValue.operationType() == WebKitCSSTransformValue::ScaleYTransformOperation)
+ sy = firstValue.getDoubleValue();
</ins><span class="cx"> else {
</span><del>- sx = firstValue->getDoubleValue();
- if (transformValue->operationType() != WebKitCSSTransformValue::ScaleXTransformOperation) {
- if (transformValue->length() > 2) {
- CSSPrimitiveValue* thirdValue = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(2));
- sz = thirdValue->getDoubleValue();
</del><ins>+ sx = firstValue.getDoubleValue();
+ if (transformValue.operationType() != WebKitCSSTransformValue::ScaleXTransformOperation) {
+ if (transformValue.length() > 2) {
+ CSSPrimitiveValue& thirdValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(2));
+ sz = thirdValue.getDoubleValue();
</ins><span class="cx"> }
</span><del>- if (transformValue->length() > 1) {
- CSSPrimitiveValue* secondValue = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(1));
- sy = secondValue->getDoubleValue();
</del><ins>+ if (transformValue.length() > 1) {
+ CSSPrimitiveValue& secondValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1));
+ sy = secondValue.getDoubleValue();
</ins><span class="cx"> } else
</span><span class="cx"> sy = sx;
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- operations.operations().append(ScaleTransformOperation::create(sx, sy, sz, transformOperationType(transformValue->operationType())));
</del><ins>+ operations.operations().append(ScaleTransformOperation::create(sx, sy, sz, transformOperationType(transformValue.operationType())));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case WebKitCSSTransformValue::TranslateTransformOperation:
</span><span class="lines">@@ -163,14 +163,14 @@
</span><span class="cx"> case WebKitCSSTransformValue::TranslateYTransformOperation: {
</span><span class="cx"> Length tx = Length(0, Fixed);
</span><span class="cx"> Length ty = Length(0, Fixed);
</span><del>- if (transformValue->operationType() == WebKitCSSTransformValue::TranslateYTransformOperation)
- ty = convertToFloatLength(firstValue, conversionData);
</del><ins>+ if (transformValue.operationType() == WebKitCSSTransformValue::TranslateYTransformOperation)
+ ty = convertToFloatLength(&firstValue, conversionData);
</ins><span class="cx"> else {
</span><del>- tx = convertToFloatLength(firstValue, conversionData);
- if (transformValue->operationType() != WebKitCSSTransformValue::TranslateXTransformOperation) {
- if (transformValue->length() > 1) {
- CSSPrimitiveValue* secondValue = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(1));
- ty = convertToFloatLength(secondValue, conversionData);
</del><ins>+ tx = convertToFloatLength(&firstValue, conversionData);
+ if (transformValue.operationType() != WebKitCSSTransformValue::TranslateXTransformOperation) {
+ if (transformValue.length() > 1) {
+ CSSPrimitiveValue& secondValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1));
+ ty = convertToFloatLength(&secondValue, conversionData);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -178,7 +178,7 @@
</span><span class="cx"> if (tx.isUndefined() || ty.isUndefined())
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- operations.operations().append(TranslateTransformOperation::create(tx, ty, Length(0, Fixed), transformOperationType(transformValue->operationType())));
</del><ins>+ operations.operations().append(TranslateTransformOperation::create(tx, ty, Length(0, Fixed), transformOperationType(transformValue.operationType())));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case WebKitCSSTransformValue::TranslateZTransformOperation:
</span><span class="lines">@@ -186,20 +186,20 @@
</span><span class="cx"> Length tx = Length(0, Fixed);
</span><span class="cx"> Length ty = Length(0, Fixed);
</span><span class="cx"> Length tz = Length(0, Fixed);
</span><del>- if (transformValue->operationType() == WebKitCSSTransformValue::TranslateZTransformOperation)
- tz = convertToFloatLength(firstValue, conversionData);
- else if (transformValue->operationType() == WebKitCSSTransformValue::TranslateYTransformOperation)
- ty = convertToFloatLength(firstValue, conversionData);
</del><ins>+ if (transformValue.operationType() == WebKitCSSTransformValue::TranslateZTransformOperation)
+ tz = convertToFloatLength(&firstValue, conversionData);
+ else if (transformValue.operationType() == WebKitCSSTransformValue::TranslateYTransformOperation)
+ ty = convertToFloatLength(&firstValue, conversionData);
</ins><span class="cx"> else {
</span><del>- tx = convertToFloatLength(firstValue, conversionData);
- if (transformValue->operationType() != WebKitCSSTransformValue::TranslateXTransformOperation) {
- if (transformValue->length() > 2) {
- CSSPrimitiveValue* thirdValue = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(2));
- tz = convertToFloatLength(thirdValue, conversionData);
</del><ins>+ tx = convertToFloatLength(&firstValue, conversionData);
+ if (transformValue.operationType() != WebKitCSSTransformValue::TranslateXTransformOperation) {
+ if (transformValue.length() > 2) {
+ CSSPrimitiveValue& thirdValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(2));
+ tz = convertToFloatLength(&thirdValue, conversionData);
</ins><span class="cx"> }
</span><del>- if (transformValue->length() > 1) {
- CSSPrimitiveValue* secondValue = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(1));
- ty = convertToFloatLength(secondValue, conversionData);
</del><ins>+ if (transformValue.length() > 1) {
+ CSSPrimitiveValue& secondValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1));
+ ty = convertToFloatLength(&secondValue, conversionData);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -207,12 +207,12 @@
</span><span class="cx"> if (tx.isUndefined() || ty.isUndefined() || tz.isUndefined())
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- operations.operations().append(TranslateTransformOperation::create(tx, ty, tz, transformOperationType(transformValue->operationType())));
</del><ins>+ operations.operations().append(TranslateTransformOperation::create(tx, ty, tz, transformOperationType(transformValue.operationType())));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case WebKitCSSTransformValue::RotateTransformOperation: {
</span><del>- double angle = firstValue->computeDegrees();
- operations.operations().append(RotateTransformOperation::create(0, 0, 1, angle, transformOperationType(transformValue->operationType())));
</del><ins>+ double angle = firstValue.computeDegrees();
+ operations.operations().append(RotateTransformOperation::create(0, 0, 1, angle, transformOperationType(transformValue.operationType())));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case WebKitCSSTransformValue::RotateXTransformOperation:
</span><span class="lines">@@ -221,28 +221,28 @@
</span><span class="cx"> double x = 0;
</span><span class="cx"> double y = 0;
</span><span class="cx"> double z = 0;
</span><del>- double angle = firstValue->computeDegrees();
</del><ins>+ double angle = firstValue.computeDegrees();
</ins><span class="cx">
</span><del>- if (transformValue->operationType() == WebKitCSSTransformValue::RotateXTransformOperation)
</del><ins>+ if (transformValue.operationType() == WebKitCSSTransformValue::RotateXTransformOperation)
</ins><span class="cx"> x = 1;
</span><del>- else if (transformValue->operationType() == WebKitCSSTransformValue::RotateYTransformOperation)
</del><ins>+ else if (transformValue.operationType() == WebKitCSSTransformValue::RotateYTransformOperation)
</ins><span class="cx"> y = 1;
</span><span class="cx"> else
</span><span class="cx"> z = 1;
</span><del>- operations.operations().append(RotateTransformOperation::create(x, y, z, angle, transformOperationType(transformValue->operationType())));
</del><ins>+ operations.operations().append(RotateTransformOperation::create(x, y, z, angle, transformOperationType(transformValue.operationType())));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case WebKitCSSTransformValue::Rotate3DTransformOperation: {
</span><del>- if (transformValue->length() < 4)
</del><ins>+ if (transformValue.length() < 4)
</ins><span class="cx"> break;
</span><del>- CSSPrimitiveValue* secondValue = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(1));
- CSSPrimitiveValue* thirdValue = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(2));
- CSSPrimitiveValue* fourthValue = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(3));
- double x = firstValue->getDoubleValue();
- double y = secondValue->getDoubleValue();
- double z = thirdValue->getDoubleValue();
- double angle = fourthValue->computeDegrees();
- operations.operations().append(RotateTransformOperation::create(x, y, z, angle, transformOperationType(transformValue->operationType())));
</del><ins>+ CSSPrimitiveValue& secondValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1));
+ CSSPrimitiveValue& thirdValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(2));
+ CSSPrimitiveValue& fourthValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(3));
+ double x = firstValue.getDoubleValue();
+ double y = secondValue.getDoubleValue();
+ double z = thirdValue.getDoubleValue();
+ double angle = fourthValue.computeDegrees();
+ operations.operations().append(RotateTransformOperation::create(x, y, z, angle, transformOperationType(transformValue.operationType())));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case WebKitCSSTransformValue::SkewTransformOperation:
</span><span class="lines">@@ -250,62 +250,62 @@
</span><span class="cx"> case WebKitCSSTransformValue::SkewYTransformOperation: {
</span><span class="cx"> double angleX = 0;
</span><span class="cx"> double angleY = 0;
</span><del>- double angle = firstValue->computeDegrees();
- if (transformValue->operationType() == WebKitCSSTransformValue::SkewYTransformOperation)
</del><ins>+ double angle = firstValue.computeDegrees();
+ if (transformValue.operationType() == WebKitCSSTransformValue::SkewYTransformOperation)
</ins><span class="cx"> angleY = angle;
</span><span class="cx"> else {
</span><span class="cx"> angleX = angle;
</span><del>- if (transformValue->operationType() == WebKitCSSTransformValue::SkewTransformOperation) {
- if (transformValue->length() > 1) {
- CSSPrimitiveValue* secondValue = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(1));
- angleY = secondValue->computeDegrees();
</del><ins>+ if (transformValue.operationType() == WebKitCSSTransformValue::SkewTransformOperation) {
+ if (transformValue.length() > 1) {
+ CSSPrimitiveValue& secondValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1));
+ angleY = secondValue.computeDegrees();
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- operations.operations().append(SkewTransformOperation::create(angleX, angleY, transformOperationType(transformValue->operationType())));
</del><ins>+ operations.operations().append(SkewTransformOperation::create(angleX, angleY, transformOperationType(transformValue.operationType())));
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case WebKitCSSTransformValue::MatrixTransformOperation: {
</span><del>- if (transformValue->length() < 6)
</del><ins>+ if (transformValue.length() < 6)
</ins><span class="cx"> break;
</span><del>- double a = firstValue->getDoubleValue();
- double b = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(1))->getDoubleValue();
- double c = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(2))->getDoubleValue();
- double d = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(3))->getDoubleValue();
- double e = conversionData.zoom() * toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(4))->getDoubleValue();
- double f = conversionData.zoom() * toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(5))->getDoubleValue();
</del><ins>+ double a = firstValue.getDoubleValue();
+ double b = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1)).getDoubleValue();
+ double c = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(2)).getDoubleValue();
+ double d = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(3)).getDoubleValue();
+ double e = conversionData.zoom() * downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(4)).getDoubleValue();
+ double f = conversionData.zoom() * downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(5)).getDoubleValue();
</ins><span class="cx"> operations.operations().append(MatrixTransformOperation::create(a, b, c, d, e, f));
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case WebKitCSSTransformValue::Matrix3DTransformOperation: {
</span><del>- if (transformValue->length() < 16)
</del><ins>+ if (transformValue.length() < 16)
</ins><span class="cx"> break;
</span><del>- TransformationMatrix matrix(toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(0))->getDoubleValue(),
- toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(1))->getDoubleValue(),
- toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(2))->getDoubleValue(),
- toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(3))->getDoubleValue(),
- toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(4))->getDoubleValue(),
- toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(5))->getDoubleValue(),
- toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(6))->getDoubleValue(),
- toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(7))->getDoubleValue(),
- toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(8))->getDoubleValue(),
- toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(9))->getDoubleValue(),
- toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(10))->getDoubleValue(),
- toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(11))->getDoubleValue(),
- conversionData.zoom() * toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(12))->getDoubleValue(),
- conversionData.zoom() * toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(13))->getDoubleValue(),
- toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(14))->getDoubleValue(),
- toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(15))->getDoubleValue());
</del><ins>+ TransformationMatrix matrix(downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(0)).getDoubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1)).getDoubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(2)).getDoubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(3)).getDoubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(4)).getDoubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(5)).getDoubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(6)).getDoubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(7)).getDoubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(8)).getDoubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(9)).getDoubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(10)).getDoubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(11)).getDoubleValue(),
+ conversionData.zoom() * downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(12)).getDoubleValue(),
+ conversionData.zoom() * downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(13)).getDoubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(14)).getDoubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(15)).getDoubleValue());
</ins><span class="cx"> operations.operations().append(Matrix3DTransformOperation::create(matrix));
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case WebKitCSSTransformValue::PerspectiveTransformOperation: {
</span><span class="cx"> Length p = Length(0, Fixed);
</span><del>- if (firstValue->isLength())
- p = convertToFloatLength(firstValue, conversionData);
</del><ins>+ if (firstValue.isLength())
+ p = convertToFloatLength(&firstValue, conversionData);
</ins><span class="cx"> else {
</span><span class="cx"> // This is a quirk that should go away when 3d transforms are finalized.
</span><del>- double val = firstValue->getDoubleValue();
</del><ins>+ double val = firstValue.getDoubleValue();
</ins><span class="cx"> p = val >= 0 ? Length(clampToPositiveInteger(val), Fixed) : Length(Undefined);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssViewportStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/ViewportStyleResolver.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/ViewportStyleResolver.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/ViewportStyleResolver.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -108,19 +108,19 @@
</span><span class="cx"> defaultValue = 1;
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValue> value = m_propertySet->getPropertyCSSValue(id);
</span><del>- if (!value || !value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(value.get()))
</ins><span class="cx"> return defaultValue;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value.get());
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx">
</span><del>- if (primitiveValue->isNumber() || primitiveValue->isPx())
- return primitiveValue->getFloatValue();
</del><ins>+ if (primitiveValue.isNumber() || primitiveValue.isPx())
+ return primitiveValue.getFloatValue();
</ins><span class="cx">
</span><del>- if (primitiveValue->isFontRelativeLength())
- return primitiveValue->getFloatValue() * m_document->documentElement()->renderStyle()->fontDescription().computedSize();
</del><ins>+ if (primitiveValue.isFontRelativeLength())
+ return primitiveValue.getFloatValue() * m_document->documentElement()->renderStyle()->fontDescription().computedSize();
</ins><span class="cx">
</span><del>- if (primitiveValue->isPercentage()) {
- float percentValue = primitiveValue->getFloatValue() / 100.0f;
</del><ins>+ if (primitiveValue.isPercentage()) {
+ float percentValue = primitiveValue.getFloatValue() / 100.0f;
</ins><span class="cx"> switch (id) {
</span><span class="cx"> case CSSPropertyMaxHeight:
</span><span class="cx"> case CSSPropertyMinHeight:
</span><span class="lines">@@ -140,7 +140,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- switch (primitiveValue->getValueID()) {
</del><ins>+ switch (primitiveValue.getValueID()) {
</ins><span class="cx"> case CSSValueAuto:
</span><span class="cx"> return defaultValue;
</span><span class="cx"> case CSSValueDeviceHeight:
</span></span></pre></div>
<a id="trunkSourceWebCorecssWebKitCSSFilterValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/WebKitCSSFilterValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/WebKitCSSFilterValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/WebKitCSSFilterValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -70,8 +70,8 @@
</span><span class="cx"> FilterOperationType m_type;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(WebKitCSSFilterValue, isWebKitCSSFilterValue())
</del><ins>+} // namespace WebCore
</ins><span class="cx">
</span><del>-}
</del><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(WebKitCSSFilterValue, isWebKitCSSFilterValue())
</ins><span class="cx">
</span><del>-#endif
</del><ins>+#endif // WebKitCSSFilterValue_h
</ins></span></pre></div>
<a id="trunkSourceWebCorecssWebKitCSSMatrixcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/WebKitCSSMatrix.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/WebKitCSSMatrix.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/WebKitCSSMatrix.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> RefPtr<CSSValue> value = styleDeclaration->getPropertyCSSValue(CSSPropertyWebkitTransform);
</span><span class="cx">
</span><span class="cx"> // Check for a "none" or empty transform. In these cases we can use the default identity matrix.
</span><del>- if (!value || (value->isPrimitiveValue() && (toCSSPrimitiveValue(value.get()))->getValueID() == CSSValueNone))
</del><ins>+ if (!value || (is<CSSPrimitiveValue>(*value) && downcast<CSSPrimitiveValue>(*value).getValueID() == CSSValueNone))
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> TransformOperations operations;
</span></span></pre></div>
<a id="trunkSourceWebCorecssWebKitCSSTransformValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/WebKitCSSTransformValue.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/WebKitCSSTransformValue.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/css/WebKitCSSTransformValue.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -79,18 +79,8 @@
</span><span class="cx"> TransformOperationType m_type;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-inline WebKitCSSTransformValue* toWebKitCSSTransformValue(CSSValue* value)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!value || value->isWebKitCSSTransformValue());
- return static_cast<WebKitCSSTransformValue*>(value);
-}
</del><ins>+} // namespace WebCore
</ins><span class="cx">
</span><del>-inline const WebKitCSSTransformValue* toWebKitCSSTransformValue(const CSSValue* value)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!value || value->isWebKitCSSTransformValue());
- return static_cast<const WebKitCSSTransformValue*>(value);
-}
</del><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(WebKitCSSTransformValue, isWebKitCSSTransformValue())
</ins><span class="cx">
</span><del>-}
-
</del><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingApplyStyleCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/ApplyStyleCommand.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/ApplyStyleCommand.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/editing/ApplyStyleCommand.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -1510,8 +1510,7 @@
</span><span class="cx"> return 0;
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValue> value = ComputedStyleExtractor(node).propertyValue(CSSPropertyFontSize);
</span><del>- ASSERT(value && value->isPrimitiveValue());
- return toCSSPrimitiveValue(value.get())->getFloatValue(CSSPrimitiveValue::CSS_PX);
</del><ins>+ return downcast<CSSPrimitiveValue>(*value).getFloatValue(CSSPrimitiveValue::CSS_PX);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ApplyStyleCommand::joinChildTextNodes(Node* node, const Position& start, const Position& end)
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditingStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/EditingStyle.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/EditingStyle.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/editing/EditingStyle.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -142,9 +142,9 @@
</span><span class="cx"> int identifierForStyleProperty(T* style, CSSPropertyID propertyID)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<CSSValue> value = extractPropertyValue(style, propertyID);
</span><del>- if (!value || !value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(value.get()))
</ins><span class="cx"> return 0;
</span><del>- return toCSSPrimitiveValue(value.get())->getValueID();
</del><ins>+ return downcast<CSSPrimitiveValue>(*value).getValueID();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template<typename T> PassRefPtr<MutableStyleProperties> getPropertiesNotIn(StyleProperties* styleWithRedundantProperties, T* baseStyle);
</span><span class="lines">@@ -197,7 +197,7 @@
</span><span class="cx"> bool HTMLElementEquivalent::valueIsPresentInStyle(Element* element, StyleProperties* style) const
</span><span class="cx"> {
</span><span class="cx"> RefPtr<CSSValue> value = style->getPropertyCSSValue(m_propertyID);
</span><del>- return matches(element) && value && value->isPrimitiveValue() && toCSSPrimitiveValue(value.get())->getValueID() == m_primitiveValue->getValueID();
</del><ins>+ return matches(element) && is<CSSPrimitiveValue>(value.get()) && downcast<CSSPrimitiveValue>(*value).getValueID() == m_primitiveValue->getValueID();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void HTMLElementEquivalent::addToStyle(Element*, EditingStyle* style) const
</span><span class="lines">@@ -229,7 +229,7 @@
</span><span class="cx"> RefPtr<CSSValue> styleValue = style->getPropertyCSSValue(CSSPropertyWebkitTextDecorationsInEffect);
</span><span class="cx"> if (!styleValue)
</span><span class="cx"> styleValue = style->getPropertyCSSValue(CSSPropertyTextDecoration);
</span><del>- return matches(element) && styleValue && styleValue->isValueList() && toCSSValueList(styleValue.get())->hasValue(m_primitiveValue.get());
</del><ins>+ return matches(element) && is<CSSValueList>(styleValue.get()) && downcast<CSSValueList>(*styleValue).hasValue(m_primitiveValue.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> class HTMLAttributeEquivalent : public HTMLElementEquivalent {
</span><span class="lines">@@ -356,12 +356,12 @@
</span><span class="cx">
</span><span class="cx"> static RGBA32 cssValueToRGBA(CSSValue* colorValue)
</span><span class="cx"> {
</span><del>- if (!colorValue || !colorValue->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(colorValue))
</ins><span class="cx"> return Color::transparent;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveColor = toCSSPrimitiveValue(colorValue);
- if (primitiveColor->isRGBColor())
- return primitiveColor->getRGBA32Value();
</del><ins>+ CSSPrimitiveValue& primitiveColor = downcast<CSSPrimitiveValue>(*colorValue);
+ if (primitiveColor.isRGBColor())
+ return primitiveColor.getRGBA32Value();
</ins><span class="cx">
</span><span class="cx"> RGBA32 rgba = 0;
</span><span class="cx"> CSSParser::parseColor(rgba, colorValue->cssText());
</span><span class="lines">@@ -476,17 +476,17 @@
</span><span class="cx">
</span><span class="cx"> // Get the adjustment amount out of the style.
</span><span class="cx"> RefPtr<CSSValue> value = m_mutableStyle->getPropertyCSSValue(CSSPropertyWebkitFontSizeDelta);
</span><del>- if (!value || !value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(value.get()))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value.get());
</del><ins>+ CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</ins><span class="cx">
</span><span class="cx"> // Only PX handled now. If we handle more types in the future, perhaps
</span><span class="cx"> // a switch statement here would be more appropriate.
</span><del>- if (!primitiveValue->isPx())
</del><ins>+ if (!primitiveValue.isPx())
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- m_fontSizeDelta = primitiveValue->getFloatValue();
</del><ins>+ m_fontSizeDelta = primitiveValue.getFloatValue();
</ins><span class="cx"> m_mutableStyle->removeProperty(CSSPropertyWebkitFontSizeDelta);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -501,16 +501,16 @@
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValue> unicodeBidi = m_mutableStyle->getPropertyCSSValue(CSSPropertyUnicodeBidi);
</span><del>- if (!unicodeBidi || !unicodeBidi->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(unicodeBidi.get()))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><del>- CSSValueID unicodeBidiValue = toCSSPrimitiveValue(unicodeBidi.get())->getValueID();
</del><ins>+ CSSValueID unicodeBidiValue = downcast<CSSPrimitiveValue>(*unicodeBidi).getValueID();
</ins><span class="cx"> if (unicodeBidiValue == CSSValueEmbed) {
</span><span class="cx"> RefPtr<CSSValue> direction = m_mutableStyle->getPropertyCSSValue(CSSPropertyDirection);
</span><del>- if (!direction || !direction->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(direction.get()))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><del>- writingDirection = toCSSPrimitiveValue(direction.get())->getValueID() == CSSValueLtr ? LeftToRightWritingDirection : RightToLeftWritingDirection;
</del><ins>+ writingDirection = downcast<CSSPrimitiveValue>(*direction).getValueID() == CSSValueLtr ? LeftToRightWritingDirection : RightToLeftWritingDirection;
</ins><span class="cx">
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -930,10 +930,10 @@
</span><span class="cx"> || cssValueToRGBA(m_mutableStyle->getPropertyCSSValue(CSSPropertyBackgroundColor).get()) == rgbaBackgroundColorInEffect(position.containerNode()))
</span><span class="cx"> m_mutableStyle->removeProperty(CSSPropertyBackgroundColor);
</span><span class="cx">
</span><del>- if (unicodeBidi && unicodeBidi->isPrimitiveValue()) {
- m_mutableStyle->setProperty(CSSPropertyUnicodeBidi, static_cast<CSSValueID>(toCSSPrimitiveValue(unicodeBidi.get())->getValueID()));
- if (direction && direction->isPrimitiveValue())
- m_mutableStyle->setProperty(CSSPropertyDirection, static_cast<CSSValueID>(toCSSPrimitiveValue(direction.get())->getValueID()));
</del><ins>+ if (is<CSSPrimitiveValue>(unicodeBidi.get())) {
+ m_mutableStyle->setProperty(CSSPropertyUnicodeBidi, static_cast<CSSValueID>(downcast<CSSPrimitiveValue>(*unicodeBidi).getValueID()));
+ if (is<CSSPrimitiveValue>(direction.get()))
+ m_mutableStyle->setProperty(CSSPropertyDirection, static_cast<CSSValueID>(downcast<CSSPrimitiveValue>(*direction).getValueID()));
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1073,13 +1073,13 @@
</span><span class="cx"> StyleProperties::PropertyReference property = style->propertyAt(i);
</span><span class="cx"> RefPtr<CSSValue> value = m_mutableStyle->getPropertyCSSValue(property.id());
</span><span class="cx">
</span><del>- // text decorations never override values
</del><ins>+ // text decorations never override values.
</ins><span class="cx"> if ((property.id() == CSSPropertyTextDecoration || property.id() == CSSPropertyWebkitTextDecorationsInEffect) && property.value()->isValueList() && value) {
</span><del>- if (value->isValueList()) {
- mergeTextDecorationValues(toCSSValueList(value.get()), toCSSValueList(property.value()));
</del><ins>+ if (is<CSSValueList>(*value)) {
+ mergeTextDecorationValues(downcast<CSSValueList>(value.get()), downcast<CSSValueList>(property.value()));
</ins><span class="cx"> continue;
</span><span class="cx"> }
</span><del>- value = 0; // text-decoration: none is equivalent to not having the property
</del><ins>+ value = nullptr; // text-decoration: none is equivalent to not having the property.
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (mode == OverrideValues || (mode == DoNotOverrideValues && !value))
</span><span class="lines">@@ -1131,9 +1131,9 @@
</span><span class="cx"> for (unsigned i = 0; i < propertyCount; ++i) {
</span><span class="cx"> StyleProperties::PropertyReference property = m_mutableStyle->propertyAt(i);
</span><span class="cx"> CSSValue* value = property.value();
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> continue;
</span><del>- if (toCSSPrimitiveValue(value)->isPercentage()) {
</del><ins>+ if (downcast<CSSPrimitiveValue>(*value).isPercentage()) {
</ins><span class="cx"> if (RefPtr<CSSValue> computedPropertyValue = computedStyle.propertyValue(property.id()))
</span><span class="cx"> fromComputedStyle->addParsedProperty(CSSProperty(property.id(), computedPropertyValue.release()));
</span><span class="cx"> }
</span><span class="lines">@@ -1245,9 +1245,9 @@
</span><span class="cx"> int EditingStyle::legacyFontSize(Document* document) const
</span><span class="cx"> {
</span><span class="cx"> RefPtr<CSSValue> cssValue = m_mutableStyle->getPropertyCSSValue(CSSPropertyFontSize);
</span><del>- if (!cssValue || !cssValue->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(cssValue.get()))
</ins><span class="cx"> return 0;
</span><del>- return legacyFontSizeFromCSSValue(document, toCSSPrimitiveValue(cssValue.get()),
</del><ins>+ return legacyFontSizeFromCSSValue(document, downcast<CSSPrimitiveValue>(cssValue.get()),
</ins><span class="cx"> m_shouldUseFixedDefaultFontSize, AlwaysUseLegacyFontSize);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1308,10 +1308,10 @@
</span><span class="cx"> continue;
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValue> unicodeBidi = ComputedStyleExtractor(n).propertyValue(CSSPropertyUnicodeBidi);
</span><del>- if (!unicodeBidi || !unicodeBidi->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(unicodeBidi.get()))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- CSSValueID unicodeBidiValue = toCSSPrimitiveValue(unicodeBidi.get())->getValueID();
</del><ins>+ CSSValueID unicodeBidiValue = downcast<CSSPrimitiveValue>(*unicodeBidi).getValueID();
</ins><span class="cx"> if (unicodeBidiValue == CSSValueEmbed || unicodeBidiValue == CSSValueBidiOverride)
</span><span class="cx"> return NaturalWritingDirection;
</span><span class="cx"> }
</span><span class="lines">@@ -1337,10 +1337,10 @@
</span><span class="cx">
</span><span class="cx"> ComputedStyleExtractor computedStyle(node);
</span><span class="cx"> RefPtr<CSSValue> unicodeBidi = computedStyle.propertyValue(CSSPropertyUnicodeBidi);
</span><del>- if (!unicodeBidi || !unicodeBidi->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(unicodeBidi.get()))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- CSSValueID unicodeBidiValue = toCSSPrimitiveValue(unicodeBidi.get())->getValueID();
</del><ins>+ CSSValueID unicodeBidiValue = downcast<CSSPrimitiveValue>(*unicodeBidi).getValueID();
</ins><span class="cx"> if (unicodeBidiValue == CSSValueNormal)
</span><span class="cx"> continue;
</span><span class="cx">
</span><span class="lines">@@ -1349,10 +1349,10 @@
</span><span class="cx">
</span><span class="cx"> ASSERT(unicodeBidiValue == CSSValueEmbed);
</span><span class="cx"> RefPtr<CSSValue> direction = computedStyle.propertyValue(CSSPropertyDirection);
</span><del>- if (!direction || !direction->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(direction.get()))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- CSSValueID directionValue = toCSSPrimitiveValue(direction.get())->getValueID();
</del><ins>+ CSSValueID directionValue = downcast<CSSPrimitiveValue>(*direction).getValueID();
</ins><span class="cx"> if (directionValue != CSSValueLtr && directionValue != CSSValueRtl)
</span><span class="cx"> continue;
</span><span class="cx">
</span><span class="lines">@@ -1452,11 +1452,11 @@
</span><span class="cx"> // Assuming reconcileTextDecorationProperties has been called, there should not be -webkit-text-decorations-in-effect
</span><span class="cx"> // Furthermore, text-decoration: none has been trimmed so that text-decoration property is always a CSSValueList.
</span><span class="cx"> RefPtr<CSSValue> textDecoration = style->getPropertyCSSValue(CSSPropertyTextDecoration);
</span><del>- if (textDecoration && textDecoration->isValueList()) {
</del><ins>+ if (is<CSSValueList>(textDecoration.get())) {
</ins><span class="cx"> RefPtr<CSSPrimitiveValue> underline = cssValuePool().createIdentifierValue(CSSValueUnderline);
</span><span class="cx"> RefPtr<CSSPrimitiveValue> lineThrough = cssValuePool().createIdentifierValue(CSSValueLineThrough);
</span><span class="cx">
</span><del>- RefPtr<CSSValueList> newTextDecoration = toCSSValueList(textDecoration.get())->copy();
</del><ins>+ RefPtr<CSSValueList> newTextDecoration = downcast<CSSValueList>(*textDecoration).copy();
</ins><span class="cx"> if (newTextDecoration->removeAll(underline.get()))
</span><span class="cx"> m_applyUnderline = true;
</span><span class="cx"> if (newTextDecoration->removeAll(lineThrough.get()))
</span><span class="lines">@@ -1489,9 +1489,9 @@
</span><span class="cx"> style->removeProperty(CSSPropertyFontFamily);
</span><span class="cx">
</span><span class="cx"> if (RefPtr<CSSValue> fontSize = style->getPropertyCSSValue(CSSPropertyFontSize)) {
</span><del>- if (!fontSize->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*fontSize))
</ins><span class="cx"> style->removeProperty(CSSPropertyFontSize); // Can't make sense of the number. Put no font size.
</span><del>- else if (int legacyFontSize = legacyFontSizeFromCSSValue(document, toCSSPrimitiveValue(fontSize.get()),
</del><ins>+ else if (int legacyFontSize = legacyFontSizeFromCSSValue(document, downcast<CSSPrimitiveValue>(fontSize.get()),
</ins><span class="cx"> shouldUseFixedFontDefaultSize, UseLegacyFontSizeOnlyIfPixelValuesMatch)) {
</span><span class="cx"> m_applyFontSize = String::number(legacyFontSize);
</span><span class="cx"> style->removeProperty(CSSPropertyFontSize);
</span><span class="lines">@@ -1502,28 +1502,26 @@
</span><span class="cx"> static void diffTextDecorations(MutableStyleProperties* style, CSSPropertyID propertID, CSSValue* refTextDecoration)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<CSSValue> textDecoration = style->getPropertyCSSValue(propertID);
</span><del>- if (!textDecoration || !textDecoration->isValueList() || !refTextDecoration || !refTextDecoration->isValueList())
</del><ins>+ if (!is<CSSValueList>(textDecoration.get()) || !is<CSSValueList>(refTextDecoration))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- RefPtr<CSSValueList> newTextDecoration = toCSSValueList(textDecoration.get())->copy();
- CSSValueList* valuesInRefTextDecoration = toCSSValueList(refTextDecoration);
</del><ins>+ RefPtr<CSSValueList> newTextDecoration = downcast<CSSValueList>(*textDecoration).copy();
+ CSSValueList& valuesInRefTextDecoration = downcast<CSSValueList>(*refTextDecoration);
</ins><span class="cx">
</span><del>- for (size_t i = 0; i < valuesInRefTextDecoration->length(); i++)
- newTextDecoration->removeAll(valuesInRefTextDecoration->item(i));
</del><ins>+ for (size_t i = 0; i < valuesInRefTextDecoration.length(); ++i)
+ newTextDecoration->removeAll(valuesInRefTextDecoration.item(i));
</ins><span class="cx">
</span><span class="cx"> setTextDecorationProperty(style, newTextDecoration.get(), propertID);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static bool fontWeightIsBold(CSSValue* fontWeight)
</span><span class="cx"> {
</span><del>- if (!fontWeight)
</del><ins>+ if (!is<CSSPrimitiveValue>(fontWeight))
</ins><span class="cx"> return false;
</span><del>- if (!fontWeight->isPrimitiveValue())
- return false;
</del><span class="cx">
</span><span class="cx"> // Because b tag can only bold text, there are only two states in plain html: bold and not bold.
</span><span class="cx"> // Collapse all other values to either one of these two states for editing purposes.
</span><del>- switch (toCSSPrimitiveValue(fontWeight)->getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(*fontWeight).getValueID()) {
</ins><span class="cx"> case CSSValue100:
</span><span class="cx"> case CSSValue200:
</span><span class="cx"> case CSSValue300:
</span><span class="lines">@@ -1615,12 +1613,12 @@
</span><span class="cx"> {
</span><span class="cx"> if (!cssValue)
</span><span class="cx"> return true;
</span><del>- if (!cssValue->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*cssValue))
</ins><span class="cx"> return false;
</span><del>- CSSPrimitiveValue* value = toCSSPrimitiveValue(cssValue);
- if (value->isRGBColor())
- return !alphaChannel(value->getRGBA32Value());
- return value->getValueID() == CSSValueTransparent;
</del><ins>+ CSSPrimitiveValue& value = downcast<CSSPrimitiveValue>(*cssValue);
+ if (value.isRGBColor())
+ return !alphaChannel(value.getRGBA32Value());
+ return value.getValueID() == CSSValueTransparent;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool hasTransparentBackgroundColor(StyleProperties* style)
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/EditorCommand.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/EditorCommand.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/editing/EditorCommand.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -139,8 +139,8 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValue> selectedCSSValue = selectionStyle->style()->getPropertyCSSValue(propertyID);
</span><span class="cx"> String newStyle = ASCIILiteral("none");
</span><del>- if (selectedCSSValue->isValueList()) {
- RefPtr<CSSValueList> selectedCSSValueList = toCSSValueList(selectedCSSValue.get());
</del><ins>+ if (is<CSSValueList>(*selectedCSSValue)) {
+ RefPtr<CSSValueList> selectedCSSValueList = downcast<CSSValueList>(selectedCSSValue.get());
</ins><span class="cx"> if (!selectedCSSValueList->removeAll(value))
</span><span class="cx"> selectedCSSValueList->append(*value);
</span><span class="cx"> if (selectedCSSValueList->length())
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingcocoaHTMLConvertermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -720,8 +720,8 @@
</span><span class="cx">
</span><span class="cx"> static bool stringFromCSSValue(CSSValue& value, String& result)
</span><span class="cx"> {
</span><del>- if (value.isPrimitiveValue()) {
- unsigned short primitiveType = toCSSPrimitiveValue(value).primitiveType();
</del><ins>+ if (is<CSSPrimitiveValue>(value)) {
+ unsigned short primitiveType = downcast<CSSPrimitiveValue>(value).primitiveType();
</ins><span class="cx"> if (primitiveType == CSSPrimitiveValue::CSS_STRING || primitiveType == CSSPrimitiveValue::CSS_URI ||
</span><span class="cx"> primitiveType == CSSPrimitiveValue::CSS_IDENT || primitiveType == CSSPrimitiveValue::CSS_ATTR) {
</span><span class="cx"> String stringValue = value.cssText();
</span><span class="lines">@@ -892,13 +892,13 @@
</span><span class="cx">
</span><span class="cx"> Element& element = downcast<Element>(node);
</span><span class="cx"> if (RefPtr<CSSValue> value = computedStylePropertyForElement(element, propertyId)) {
</span><del>- if (value->isPrimitiveValue() && floatValueFromPrimitiveValue(toCSSPrimitiveValue(*value), result))
</del><ins>+ if (is<CSSPrimitiveValue>(*value) && floatValueFromPrimitiveValue(downcast<CSSPrimitiveValue>(*value), result))
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool inherit = false;
</span><span class="cx"> if (RefPtr<CSSValue> value = inlineStylePropertyForElement(element, propertyId)) {
</span><del>- if (value->isPrimitiveValue() && floatValueFromPrimitiveValue(toCSSPrimitiveValue(*value), result))
</del><ins>+ if (is<CSSPrimitiveValue>(*value) && floatValueFromPrimitiveValue(downcast<CSSPrimitiveValue>(*value), result))
</ins><span class="cx"> return true;
</span><span class="cx"> if (value->isInheritedValue())
</span><span class="cx"> inherit = true;
</span><span class="lines">@@ -1061,14 +1061,14 @@
</span><span class="cx">
</span><span class="cx"> Element& element = downcast<Element>(node);
</span><span class="cx"> if (RefPtr<CSSValue> value = computedStylePropertyForElement(element, propertyId)) {
</span><del>- if (value->isPrimitiveValue() && toCSSPrimitiveValue(*value).isRGBColor())
- return normalizedColor(Color(toCSSPrimitiveValue(*value).getRGBA32Value()), propertyId == CSSPropertyColor);
</del><ins>+ if (is<CSSPrimitiveValue>(*value) && downcast<CSSPrimitiveValue>(*value).isRGBColor())
+ return normalizedColor(Color(downcast<CSSPrimitiveValue>(*value).getRGBA32Value()), propertyId == CSSPropertyColor);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool inherit = false;
</span><span class="cx"> if (RefPtr<CSSValue> value = inlineStylePropertyForElement(element, propertyId)) {
</span><del>- if (value->isPrimitiveValue() && toCSSPrimitiveValue(*value).isRGBColor())
- return normalizedColor(Color(toCSSPrimitiveValue(*value).getRGBA32Value()), propertyId == CSSPropertyColor);
</del><ins>+ if (is<CSSPrimitiveValue>(*value) && downcast<CSSPrimitiveValue>(*value).isRGBColor())
+ return normalizedColor(Color(downcast<CSSPrimitiveValue>(*value).getRGBA32Value()), propertyId == CSSPropertyColor);
</ins><span class="cx"> if (value->isInheritedValue())
</span><span class="cx"> inherit = true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingmarkupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/markup.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/markup.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/editing/markup.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -476,9 +476,9 @@
</span><span class="cx"> RefPtr<CSSValue> value = style->getPropertyCSSValue(propertyID);
</span><span class="cx"> if (!value)
</span><span class="cx"> return true;
</span><del>- if (!value->isPrimitiveValue())
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return false;
</span><del>- return toCSSPrimitiveValue(value.get())->getValueID() == CSSValueNone;
</del><ins>+ return downcast<CSSPrimitiveValue>(*value).getValueID() == CSSValueNone;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static bool needInterchangeNewlineAfter(const VisiblePosition& v)
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageSerializercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PageSerializer.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PageSerializer.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/page/PageSerializer.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -328,10 +328,10 @@
</span><span class="cx"> unsigned propertyCount = styleDeclaration->propertyCount();
</span><span class="cx"> for (unsigned i = 0; i < propertyCount; ++i) {
</span><span class="cx"> RefPtr<CSSValue> cssValue = styleDeclaration->propertyAt(i).value();
</span><del>- if (!cssValue->isImageValue())
</del><ins>+ if (!is<CSSImageValue>(*cssValue))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- StyleImage* styleImage = toCSSImageValue(cssValue.get())->cachedOrPendingImage();
</del><ins>+ StyleImage* styleImage = downcast<CSSImageValue>(*cssValue).cachedOrPendingImage();
</ins><span class="cx"> // Non cached-images are just place-holders and do not contain data.
</span><span class="cx"> if (!styleImage || !styleImage->isCachedImage())
</span><span class="cx"> continue;
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationCSSPropertyAnimationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -297,18 +297,18 @@
</span><span class="cx"> CSSImageGeneratorValue& fromGenerated = toStyleGeneratedImage(from)->imageValue();
</span><span class="cx"> CSSImageGeneratorValue& toGenerated = toStyleGeneratedImage(to)->imageValue();
</span><span class="cx">
</span><del>- if (fromGenerated.isFilterImageValue() && toGenerated.isFilterImageValue()) {
</del><ins>+ if (is<CSSFilterImageValue>(fromGenerated) && is<CSSFilterImageValue>(toGenerated)) {
</ins><span class="cx"> // Animation of generated images just possible if input images are equal.
</span><span class="cx"> // Otherwise fall back to cross fade animation.
</span><del>- CSSFilterImageValue& fromFilter = toCSSFilterImageValue(fromGenerated);
- CSSFilterImageValue& toFilter = toCSSFilterImageValue(toGenerated);
</del><ins>+ CSSFilterImageValue& fromFilter = downcast<CSSFilterImageValue>(fromGenerated);
+ CSSFilterImageValue& toFilter = downcast<CSSFilterImageValue>(toGenerated);
</ins><span class="cx"> if (fromFilter.equalInputImages(toFilter) && fromFilter.cachedImage())
</span><span class="cx"> return blendFilter(anim, fromFilter.cachedImage(), fromFilter.filterOperations(), toFilter.filterOperations(), progress);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (fromGenerated.isCrossfadeValue() && toGenerated.isCrossfadeValue()) {
- CSSCrossfadeValue& fromCrossfade = toCSSCrossfadeValue(fromGenerated);
- CSSCrossfadeValue& toCrossfade = toCSSCrossfadeValue(toGenerated);
</del><ins>+ if (is<CSSCrossfadeValue>(fromGenerated) && is<CSSCrossfadeValue>(toGenerated)) {
+ CSSCrossfadeValue& fromCrossfade = downcast<CSSCrossfadeValue>(fromGenerated);
+ CSSCrossfadeValue& toCrossfade = downcast<CSSCrossfadeValue>(toGenerated);
</ins><span class="cx"> if (fromCrossfade.equalInputImages(toCrossfade))
</span><span class="cx"> return StyleGeneratedImage::create(*toCrossfade.blend(fromCrossfade, progress));
</span><span class="cx"> }
</span><span class="lines">@@ -317,16 +317,16 @@
</span><span class="cx"> // https://bugs.webkit.org/show_bug.cgi?id=119956
</span><span class="cx"> } else if (from->isGeneratedImage() && to->isCachedImage()) {
</span><span class="cx"> CSSImageGeneratorValue& fromGenerated = toStyleGeneratedImage(from)->imageValue();
</span><del>- if (fromGenerated.isFilterImageValue()) {
- CSSFilterImageValue& fromFilter = toCSSFilterImageValue(fromGenerated);
</del><ins>+ if (is<CSSFilterImageValue>(fromGenerated)) {
+ CSSFilterImageValue& fromFilter = downcast<CSSFilterImageValue>(fromGenerated);
</ins><span class="cx"> if (fromFilter.cachedImage() && toStyleCachedImage(to)->cachedImage() == fromFilter.cachedImage())
</span><span class="cx"> return blendFilter(anim, fromFilter.cachedImage(), fromFilter.filterOperations(), FilterOperations(), progress);
</span><span class="cx"> }
</span><span class="cx"> // FIXME: Add interpolation between cross-fade and image source.
</span><span class="cx"> } else if (from->isCachedImage() && to->isGeneratedImage()) {
</span><span class="cx"> CSSImageGeneratorValue& toGenerated = toStyleGeneratedImage(to)->imageValue();
</span><del>- if (toGenerated.isFilterImageValue()) {
- CSSFilterImageValue& toFilter = toCSSFilterImageValue(toGenerated);
</del><ins>+ if (is<CSSFilterImageValue>(toGenerated)) {
+ CSSFilterImageValue& toFilter = downcast<CSSFilterImageValue>(toGenerated);
</ins><span class="cx"> if (toFilter.cachedImage() && toStyleCachedImage(from)->cachedImage() == toFilter.cachedImage())
</span><span class="cx"> return blendFilter(anim, toFilter.cachedImage(), FilterOperations(), toFilter.filterOperations(), progress);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTextControlcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTextControl.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTextControl.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/rendering/RenderTextControl.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -84,8 +84,8 @@
</span><span class="cx"> if (HTMLElement* innerText = control.innerTextElement()) {
</span><span class="cx"> if (const StyleProperties* properties = innerText->presentationAttributeStyle()) {
</span><span class="cx"> RefPtr<CSSValue> value = properties->getPropertyCSSValue(CSSPropertyWebkitUserModify);
</span><del>- if (value && value->isPrimitiveValue())
- textBlockStyle->setUserModify(toCSSPrimitiveValue(*value));
</del><ins>+ if (is<CSSPrimitiveValue>(value.get()))
+ textBlockStyle->setUserModify(downcast<CSSPrimitiveValue>(*value));
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStylePendingImageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StylePendingImage.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StylePendingImage.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/rendering/style/StylePendingImage.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -45,12 +45,12 @@
</span><span class="cx"> public:
</span><span class="cx"> static PassRefPtr<StylePendingImage> create(CSSValue* value) { return adoptRef(new StylePendingImage(value)); }
</span><span class="cx">
</span><del>- CSSImageValue* cssImageValue() const { return m_value && m_value->isImageValue() ? toCSSImageValue(m_value) : nullptr; }
</del><ins>+ CSSImageValue* cssImageValue() const { return is<CSSImageValue>(m_value) ? downcast<CSSImageValue>(m_value) : nullptr; }
</ins><span class="cx"> CSSImageGeneratorValue* cssImageGeneratorValue() const { return m_value && m_value->isImageGeneratorValue() ? static_cast<CSSImageGeneratorValue*>(m_value) : nullptr; }
</span><del>- CSSCursorImageValue* cssCursorImageValue() const { return m_value && m_value->isCursorImageValue() ? toCSSCursorImageValue(m_value) : nullptr; }
</del><ins>+ CSSCursorImageValue* cssCursorImageValue() const { return is<CSSCursorImageValue>(m_value) ? downcast<CSSCursorImageValue>(m_value) : nullptr; }
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><del>- CSSImageSetValue* cssImageSetValue() const { return m_value && m_value->isImageSetValue() ? toCSSImageSetValue(m_value) : nullptr; }
</del><ins>+ CSSImageSetValue* cssImageSetValue() const { return is<CSSImageSetValue>(m_value) ? downcast<CSSImageSetValue>(m_value) : nullptr; }
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> void detachFromCSSValue() { m_value = nullptr; }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGColorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGColor.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGColor.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/svg/SVGColor.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -92,8 +92,8 @@
</span><span class="cx"> SVGColorType m_colorType;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(SVGColor, isSVGColor());
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(SVGColor, isSVGColor())
+
</ins><span class="cx"> #endif // SVGColor_h
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontFaceElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontFaceElement.cpp (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontFaceElement.cpp        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/svg/SVGFontFaceElement.cpp        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -253,11 +253,11 @@
</span><span class="cx"> if (describesParentFont) {
</span><span class="cx"> // Traverse parsed CSS values and associate CSSFontFaceSrcValue elements with ourselves.
</span><span class="cx"> RefPtr<CSSValue> src = m_fontFaceRule->properties().getPropertyCSSValue(CSSPropertySrc);
</span><del>- CSSValueList* srcList = toCSSValueList(src.get());
</del><ins>+ CSSValueList* srcList = downcast<CSSValueList>(src.get());
</ins><span class="cx">
</span><span class="cx"> unsigned srcLength = srcList ? srcList->length() : 0;
</span><del>- for (unsigned i = 0; i < srcLength; i++) {
- if (CSSFontFaceSrcValue* item = toCSSFontFaceSrcValue(srcList->itemWithoutBoundsCheck(i)))
</del><ins>+ for (unsigned i = 0; i < srcLength; ++i) {
+ if (CSSFontFaceSrcValue* item = downcast<CSSFontFaceSrcValue>(srcList->itemWithoutBoundsCheck(i)))
</ins><span class="cx"> item->setSVGFontFaceElement(this);
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGPainth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGPaint.h (174299 => 174300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGPaint.h        2014-10-03 23:05:07 UTC (rev 174299)
+++ trunk/Source/WebCore/svg/SVGPaint.h        2014-10-03 23:17:00 UTC (rev 174300)
</span><span class="lines">@@ -112,8 +112,8 @@
</span><span class="cx"> String m_uri;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-CSS_VALUE_TYPE_CASTS(SVGPaint, isSVGPaint());
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(SVGPaint, isSVGPaint())
+
</ins><span class="cx"> #endif // SVGPaint_h
</span></span></pre>
</div>
</div>
</body>
</html>