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

Unified Diff: Source/core/rendering/svg/RenderSVGResourceContainer.h

Issue 672613002: Move resourceType() method to RenderSVGResourceContainer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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/core/rendering/svg/RenderSVGResource.h ('k') | Source/core/rendering/svg/SVGRenderTreeAsText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/RenderSVGResourceContainer.h
diff --git a/Source/core/rendering/svg/RenderSVGResourceContainer.h b/Source/core/rendering/svg/RenderSVGResourceContainer.h
index 780f503e9cdf7776016433028aaaeef4372f5099..dc4a602a99ff03f73ff178fd50af9c7c49fbc6bc 100644
--- a/Source/core/rendering/svg/RenderSVGResourceContainer.h
+++ b/Source/core/rendering/svg/RenderSVGResourceContainer.h
@@ -26,6 +26,16 @@
namespace blink {
+enum RenderSVGResourceType {
+ MaskerResourceType,
+ MarkerResourceType,
+ PatternResourceType,
+ LinearGradientResourceType,
+ RadialGradientResourceType,
+ FilterResourceType,
+ ClipperResourceType
+};
+
class RenderLayer;
class RenderSVGResourceContainer : public RenderSVGHiddenContainer,
@@ -41,6 +51,8 @@ public:
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override final;
virtual bool isOfType(RenderObjectType type) const override { return type == RenderObjectSVGResourceContainer || RenderSVGHiddenContainer::isOfType(type); }
+ virtual RenderSVGResourceType resourceType() const = 0;
+
void idChanged();
void addClientRenderLayer(Node*);
void addClientRenderLayer(RenderLayer*);
@@ -109,6 +121,9 @@ Renderer* getRenderSVGResourceById(TreeScope& treeScope, const AtomicString& id)
DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGResourceContainer, isSVGResourceContainer());
+#define DEFINE_RENDER_SVG_RESOURCE_TYPE_CASTS(thisType, typeName) \
+ DEFINE_TYPE_CASTS(thisType, RenderSVGResourceContainer, resource, resource->resourceType() == typeName, resource.resourceType() == typeName)
+
}
#endif
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResource.h ('k') | Source/core/rendering/svg/SVGRenderTreeAsText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698