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

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

Issue 26261009: Add toSVGColor|Paint() to cleanup static_cast<>, and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Cover static_cast<const SVGPaint|Color*> Created 7 years, 2 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/bindings/v8/custom/V8CSSValueCustom.cpp ('k') | Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSValue.cpp
diff --git a/Source/core/css/CSSValue.cpp b/Source/core/css/CSSValue.cpp
index f924202b8be2a93efaea00ed82f931983aa63ca6..b2110bbf443a14e8250829effb8dbc8e5709f976 100644
--- a/Source/core/css/CSSValue.cpp
+++ b/Source/core/css/CSSValue.cpp
@@ -303,9 +303,9 @@ String CSSValue::cssText() const
case VariableClass:
return toCSSVariableValue(this)->value();
case SVGColorClass:
- return static_cast<const SVGColor*>(this)->customCssText();
+ return toSVGColor(this)->customCssText();
case SVGPaintClass:
- return static_cast<const SVGPaint*>(this)->customCssText();
+ return toSVGPaint(this)->customCssText();
case CSSSVGDocumentClass:
return toCSSSVGDocumentValue(this)->customCssText();
}
@@ -433,10 +433,10 @@ void CSSValue::destroy()
delete toCSSVariableValue(this);
return;
case SVGColorClass:
- delete static_cast<SVGColor*>(this);
+ delete toSVGColor(this);
return;
case SVGPaintClass:
- delete static_cast<SVGPaint*>(this);
+ delete toSVGPaint(this);
return;
case CSSSVGDocumentClass:
delete toCSSSVGDocumentValue(this);
@@ -466,9 +466,9 @@ PassRefPtr<CSSValue> CSSValue::cloneForCSSOM() const
case ImageSetClass:
return toCSSImageSetValue(this)->cloneForCSSOM();
case SVGColorClass:
- return static_cast<const SVGColor*>(this)->cloneForCSSOM();
+ return toSVGColor(this)->cloneForCSSOM();
case SVGPaintClass:
- return static_cast<const SVGPaint*>(this)->cloneForCSSOM();
+ return toSVGPaint(this)->cloneForCSSOM();
default:
ASSERT(!isSubtypeExposedToCSSOM());
return TextCloneCSSValue::create(classType(), cssText());
« no previous file with comments | « Source/bindings/v8/custom/V8CSSValueCustom.cpp ('k') | Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698