Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(543)

Unified Diff: Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 24020008: Introduce CSS_VALUE_TYPE_CASTS macro to cast CSSValue (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/resolver/ElementStyleResources.cpp ('k') | Source/core/rendering/style/StylePendingImage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleBuilderCustom.cpp
diff --git a/Source/core/css/resolver/StyleBuilderCustom.cpp b/Source/core/css/resolver/StyleBuilderCustom.cpp
index 5f05ecab84573eaa7d0790d05d56398218822741..26e457f31baf2d55418a1b65730240a637142d32 100644
--- a/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -1211,7 +1211,7 @@ static bool hasVariableReference(CSSValue* value)
return static_cast<CSSCalcValue*>(value)->hasVariableReference();
if (value->isReflectValue()) {
- CSSReflectValue* reflectValue = static_cast<CSSReflectValue*>(value);
+ CSSReflectValue* reflectValue = toCSSReflectValue(value);
CSSPrimitiveValue* direction = reflectValue->direction();
CSSPrimitiveValue* offset = reflectValue->offset();
CSSValue* mask = reflectValue->mask();
@@ -1332,7 +1332,7 @@ void StyleBuilder::oldApplyProperty(CSSPropertyID id, StyleResolverState& state,
state.style()->setContent(StyleGeneratedImage::create(static_cast<CSSImageGeneratorValue*>(item)), didSet);
didSet = true;
} else if (item->isImageSetValue()) {
- state.style()->setContent(state.elementStyleResources().setOrPendingFromValue(CSSPropertyContent, static_cast<CSSImageSetValue*>(item)), didSet);
+ state.style()->setContent(state.elementStyleResources().setOrPendingFromValue(CSSPropertyContent, toCSSImageSetValue(item)), didSet);
didSet = true;
}
@@ -1534,7 +1534,7 @@ void StyleBuilder::oldApplyProperty(CSSPropertyID id, StyleResolverState& state,
if (!value->isReflectValue())
return;
- CSSReflectValue* reflectValue = static_cast<CSSReflectValue*>(value);
+ CSSReflectValue* reflectValue = toCSSReflectValue(value);
RefPtr<StyleReflection> reflection = StyleReflection::create();
reflection->setDirection(*reflectValue->direction());
if (reflectValue->offset())
« no previous file with comments | « Source/core/css/resolver/ElementStyleResources.cpp ('k') | Source/core/rendering/style/StylePendingImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698