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

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

Issue 25044003: Generate toCSSFooValue for CSS*GradientValues (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/CSSGradientValue.cpp ('k') | Source/core/css/CSSParser-in.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSImageGeneratorValue.cpp
diff --git a/Source/core/css/CSSImageGeneratorValue.cpp b/Source/core/css/CSSImageGeneratorValue.cpp
index 472c6eecbf384a77639a6d0d152b7728cd03ae78..83ff50a750900d31f8104df29b0d26f4be654018 100644
--- a/Source/core/css/CSSImageGeneratorValue.cpp
+++ b/Source/core/css/CSSImageGeneratorValue.cpp
@@ -114,9 +114,9 @@ PassRefPtr<Image> CSSImageGeneratorValue::image(RenderObject* renderer, const In
case CrossfadeClass:
return static_cast<CSSCrossfadeValue*>(this)->image(renderer, size);
case LinearGradientClass:
- return static_cast<CSSLinearGradientValue*>(this)->image(renderer, size);
+ return toCSSLinearGradientValue(this)->image(renderer, size);
case RadialGradientClass:
- return static_cast<CSSRadialGradientValue*>(this)->image(renderer, size);
+ return toCSSRadialGradientValue(this)->image(renderer, size);
default:
ASSERT_NOT_REACHED();
}
@@ -148,9 +148,9 @@ IntSize CSSImageGeneratorValue::fixedSize(const RenderObject* renderer)
case CrossfadeClass:
return static_cast<CSSCrossfadeValue*>(this)->fixedSize(renderer);
case LinearGradientClass:
- return static_cast<CSSLinearGradientValue*>(this)->fixedSize(renderer);
+ return toCSSLinearGradientValue(this)->fixedSize(renderer);
case RadialGradientClass:
- return static_cast<CSSRadialGradientValue*>(this)->fixedSize(renderer);
+ return toCSSRadialGradientValue(this)->fixedSize(renderer);
default:
ASSERT_NOT_REACHED();
}
@@ -201,10 +201,10 @@ void CSSImageGeneratorValue::loadSubimages(ResourceFetcher* fetcher)
static_cast<CSSCanvasValue*>(this)->loadSubimages(fetcher);
break;
case LinearGradientClass:
- static_cast<CSSLinearGradientValue*>(this)->loadSubimages(fetcher);
+ toCSSLinearGradientValue(this)->loadSubimages(fetcher);
break;
case RadialGradientClass:
- static_cast<CSSRadialGradientValue*>(this)->loadSubimages(fetcher);
+ toCSSRadialGradientValue(this)->loadSubimages(fetcher);
break;
default:
ASSERT_NOT_REACHED();
« no previous file with comments | « Source/core/css/CSSGradientValue.cpp ('k') | Source/core/css/CSSParser-in.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698