Generate toCSSCrossfadeValue() instead of using manual function

https://bugs.webkit.org/show_bug.cgi?id=122057

Reviewed by Antti Koivisto.

Generated toCSSFooValue() supports more plenty functions rather than
to use manual cast function.

No new tests, no behavior changes.

* css/CSSCrossfadeValue.h:
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::image):
(WebCore::CSSImageGeneratorValue::fixedSize):
(WebCore::CSSImageGeneratorValue::loadSubimages):
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b8296662
2013-09-29 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Generate toCSSCrossfadeValue() instead of using manual function
https://bugs.webkit.org/show_bug.cgi?id=122057
Reviewed by Antti Koivisto.
Generated toCSSFooValue() supports more plenty functions rather than
to use manual cast function.
No new tests, no behavior changes.
* css/CSSCrossfadeValue.h:
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::image):
(WebCore::CSSImageGeneratorValue::fixedSize):
(WebCore::CSSImageGeneratorValue::loadSubimages):
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
2013-09-29 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Generate toCSSFooValue() for CSSFilterImageValue and CSSInitialValue
......@@ -110,11 +110,7 @@ private:
CrossfadeSubimageObserverProxy m_crossfadeSubimageObserver;
};
inline CSSCrossfadeValue* toCSSCrossfadeValue(CSSImageGeneratorValue* value)
{
ASSERT_WITH_SECURITY_IMPLICATION(!value || value->isCrossfadeValue());
return static_cast<CSSCrossfadeValue*>(value);
}
CSS_VALUE_TYPE_CASTS(CrossfadeValue)
} // namespace WebCore
......
......@@ -110,7 +110,7 @@ PassRefPtr<Image> CSSImageGeneratorValue::image(RenderElement* renderer, const I
case CanvasClass:
return static_cast<CSSCanvasValue*>(this)->image(renderer, size);
case CrossfadeClass:
return static_cast<CSSCrossfadeValue*>(this)->image(renderer, size);
return toCSSCrossfadeValue(this)->image(renderer, size);
#if ENABLE(CSS_FILTERS)
case FilterImageClass:
return toCSSFilterImageValue(this)->image(renderer, size);
......@@ -152,7 +152,7 @@ IntSize CSSImageGeneratorValue::fixedSize(const RenderElement* renderer)
case CanvasClass:
return static_cast<CSSCanvasValue*>(this)->fixedSize(renderer);
case CrossfadeClass:
return static_cast<CSSCrossfadeValue*>(this)->fixedSize(renderer);
return toCSSCrossfadeValue(this)->fixedSize(renderer);
#if ENABLE(CSS_FILTERS)
case FilterImageClass:
return toCSSFilterImageValue(this)->fixedSize(renderer);
......@@ -213,7 +213,7 @@ void CSSImageGeneratorValue::loadSubimages(CachedResourceLoader* cachedResourceL
{
switch (classType()) {
case CrossfadeClass:
static_cast<CSSCrossfadeValue*>(this)->loadSubimages(cachedResourceLoader);
toCSSCrossfadeValue(this)->loadSubimages(cachedResourceLoader);
break;
case CanvasClass:
static_cast<CSSCanvasValue*>(this)->loadSubimages(cachedResourceLoader);
......
......@@ -413,7 +413,7 @@ void CSSValue::destroy()
delete static_cast<CSSRadialGradientValue*>(this);
return;
case CrossfadeClass:
delete static_cast<CSSCrossfadeValue*>(this);
delete toCSSCrossfadeValue(this);
return;
case ImageClass:
delete toCSSImageValue(this);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment