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

Unified Diff: Source/core/rendering/style/ShapeValue.h

Issue 244693003: [CSS Shapes] Add parsing support for gradients (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Increase threshold Created 6 years, 8 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/rendering/shapes/ShapeOutsideInfo.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/style/ShapeValue.h
diff --git a/Source/core/rendering/style/ShapeValue.h b/Source/core/rendering/style/ShapeValue.h
index 8115046b616dca927b41468686eea84387c7b738..dc12b4f1ff84f6aec00550094f22da389b26560f 100644
--- a/Source/core/rendering/style/ShapeValue.h
+++ b/Source/core/rendering/style/ShapeValue.h
@@ -66,7 +66,14 @@ public:
BasicShape* shape() const { return m_shape.get(); }
StyleImage* image() const { return m_image.get(); }
- bool isImageValid() const { return image() && image()->cachedImage() && image()->cachedImage()->hasImage(); }
+ bool isImageValid() const
+ {
+ if (!image())
+ return false;
+ if (image()->isImageResource() || image()->isImageResourceSet())
+ return image()->cachedImage() && image()->cachedImage()->hasImage();
+ return image()->isGeneratedImage();
+ }
void setImage(PassRefPtr<StyleImage> image)
{
ASSERT(type() == Image);
« no previous file with comments | « Source/core/rendering/shapes/ShapeOutsideInfo.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698