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

Unified Diff: third_party/WebKit/Source/core/svg/SVGGradientElement.h

Issue 2741993002: Move common gradient attribute collection to SVGGradientElement (Closed)
Patch Set: Rebase; fix semantics on find cycle Created 3 years, 9 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 | « no previous file | third_party/WebKit/Source/core/svg/SVGGradientElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/SVGGradientElement.h
diff --git a/third_party/WebKit/Source/core/svg/SVGGradientElement.h b/third_party/WebKit/Source/core/svg/SVGGradientElement.h
index f7c24e2d47f72ee28438601670c6fc99fd0763d9..ed58079295e327234a36f8b0bc37f1e4fef8e236 100644
--- a/third_party/WebKit/Source/core/svg/SVGGradientElement.h
+++ b/third_party/WebKit/Source/core/svg/SVGGradientElement.h
@@ -32,6 +32,8 @@
namespace blink {
+struct GradientAttributes;
+
enum SVGSpreadMethodType {
SVGSpreadMethodUnknown = 0,
SVGSpreadMethodPad,
@@ -47,23 +49,26 @@ class SVGGradientElement : public SVGElement, public SVGURIReference {
USING_GARBAGE_COLLECTED_MIXIN(SVGGradientElement);
public:
- Vector<Gradient::ColorStop> buildStops();
-
- SVGAnimatedTransformList* gradientTransform() {
+ SVGAnimatedTransformList* gradientTransform() const {
return m_gradientTransform.get();
}
- SVGAnimatedEnumeration<SVGSpreadMethodType>* spreadMethod() {
+ SVGAnimatedEnumeration<SVGSpreadMethodType>* spreadMethod() const {
return m_spreadMethod.get();
}
- SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>* gradientUnits() {
+ SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>* gradientUnits() const {
return m_gradientUnits.get();
}
+ const SVGGradientElement* referencedElement() const;
+ void collectCommonAttributes(GradientAttributes&) const;
+
DECLARE_VIRTUAL_TRACE();
protected:
SVGGradientElement(const QualifiedName&, Document&);
+ using VisitedSet = HeapHashSet<Member<const SVGGradientElement>>;
+
void svgAttributeChanged(const QualifiedName&) override;
private:
@@ -75,6 +80,8 @@ class SVGGradientElement : public SVGElement, public SVGURIReference {
void childrenChanged(const ChildrenChange&) final;
+ Vector<Gradient::ColorStop> buildStops() const;
+
Member<SVGAnimatedTransformList> m_gradientTransform;
Member<SVGAnimatedEnumeration<SVGSpreadMethodType>> m_spreadMethod;
Member<SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>> m_gradientUnits;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGGradientElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698