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

Unified Diff: Source/core/css/BasicShapeFunctions.cpp

Issue 370073002: Use type cast macro for AnimatableLengthPoint|3D instead of manual toFoo() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 years, 5 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
Index: Source/core/css/BasicShapeFunctions.cpp
diff --git a/Source/core/css/BasicShapeFunctions.cpp b/Source/core/css/BasicShapeFunctions.cpp
index e6399b9918739e231a0617d5393a49a09a9c1fac..e7975262591b8525fe2feb6cb9f8c2467b49c605 100644
--- a/Source/core/css/BasicShapeFunctions.cpp
+++ b/Source/core/css/BasicShapeFunctions.cpp
@@ -72,7 +72,7 @@ PassRefPtrWillBeRawPtr<CSSValue> valueForBasicShape(const RenderStyle& style, co
RefPtrWillBeRawPtr<CSSBasicShape> basicShapeValue = nullptr;
switch (basicShape->type()) {
case BasicShape::BasicShapeCircleType: {
- const BasicShapeCircle* circle = static_cast<const BasicShapeCircle*>(basicShape);
+ const BasicShapeCircle* circle = toBasicShapeCircle(basicShape);
RefPtrWillBeRawPtr<CSSBasicShapeCircle> circleValue = CSSBasicShapeCircle::create();
circleValue->setCenterX(valueForCenterCoordinate(pool, style, circle->centerX(), HORIZONTAL));
@@ -82,7 +82,7 @@ PassRefPtrWillBeRawPtr<CSSValue> valueForBasicShape(const RenderStyle& style, co
break;
}
case BasicShape::BasicShapeEllipseType: {
- const BasicShapeEllipse* ellipse = static_cast<const BasicShapeEllipse*>(basicShape);
+ const BasicShapeEllipse* ellipse = toBasicShapeEllipse(basicShape);
RefPtrWillBeRawPtr<CSSBasicShapeEllipse> ellipseValue = CSSBasicShapeEllipse::create();
ellipseValue->setCenterX(valueForCenterCoordinate(pool, style, ellipse->centerX(), HORIZONTAL));
@@ -93,7 +93,7 @@ PassRefPtrWillBeRawPtr<CSSValue> valueForBasicShape(const RenderStyle& style, co
break;
}
case BasicShape::BasicShapePolygonType: {
- const BasicShapePolygon* polygon = static_cast<const BasicShapePolygon*>(basicShape);
+ const BasicShapePolygon* polygon = toBasicShapePolygon(basicShape);
RefPtrWillBeRawPtr<CSSBasicShapePolygon> polygonValue = CSSBasicShapePolygon::create();
polygonValue->setWindRule(polygon->windRule());
@@ -105,7 +105,7 @@ PassRefPtrWillBeRawPtr<CSSValue> valueForBasicShape(const RenderStyle& style, co
break;
}
case BasicShape::BasicShapeInsetType: {
- const BasicShapeInset* inset = static_cast<const BasicShapeInset*>(basicShape);
+ const BasicShapeInset* inset = toBasicShapeInset(basicShape);
RefPtrWillBeRawPtr<CSSBasicShapeInset> insetValue = CSSBasicShapeInset::create();
insetValue->setTop(pool.createValue(inset->top(), style));
« no previous file with comments | « Source/core/animation/interpolation/LegacyStyleInterpolation.h ('k') | Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698