diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-26 11:37:00 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-26 11:36:36 +0100 |
commit | f474b2b60ec57205facd4eec2181ebe69b686772 (patch) | |
tree | 42a132541a82c97039ea8a98b40e5012187ede28 /Source/WebCore/css/CSSCrossfadeValue.cpp | |
parent | 061d58bc0fa016cfeed744fd3e4663460635d69b (diff) | |
download | qtwebkit-f474b2b60ec57205facd4eec2181ebe69b686772.tar.gz |
Imported WebKit commit 76dac539db7ece7079963adfcfe878d8e2f7d861 (http://svn.webkit.org/repository/webkit/trunk@135696)
New snapshot that fixes build after QMacStyle removal
Change-Id: Idea95c96c73b49158d52861db2a4b8d2c51766b0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WebCore/css/CSSCrossfadeValue.cpp')
-rw-r--r-- | Source/WebCore/css/CSSCrossfadeValue.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/WebCore/css/CSSCrossfadeValue.cpp b/Source/WebCore/css/CSSCrossfadeValue.cpp index 126734ffc..7375d08bb 100644 --- a/Source/WebCore/css/CSSCrossfadeValue.cpp +++ b/Source/WebCore/css/CSSCrossfadeValue.cpp @@ -52,6 +52,19 @@ static bool subimageIsPending(CSSValue* value) return false; } +static bool subimageHasAlpha(CSSValue* value, const RenderObject* renderer) +{ + if (value->isImageValue()) + return static_cast<CSSImageValue*>(value)->hasAlpha(renderer); + + if (value->isImageGeneratorValue()) + return static_cast<CSSImageGeneratorValue*>(value)->hasAlpha(renderer); + + ASSERT_NOT_REACHED(); + + return true; +} + static CachedImage* cachedImageForCSSValue(CSSValue* value, CachedResourceLoader* cachedResourceLoader) { if (!value) @@ -126,6 +139,11 @@ bool CSSCrossfadeValue::isPending() const return subimageIsPending(m_fromValue.get()) || subimageIsPending(m_toValue.get()); } +bool CSSCrossfadeValue::hasAlpha(const RenderObject* renderer) const +{ + return subimageHasAlpha(m_fromValue.get(), renderer) || subimageHasAlpha(m_toValue.get(), renderer); +} + void CSSCrossfadeValue::loadSubimages(CachedResourceLoader* cachedResourceLoader) { m_cachedFromImage = cachedImageForCSSValue(m_fromValue.get(), cachedResourceLoader); |