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

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

Issue 1697593002: Simplify SVGAnimatedHref (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Now with less infinite recursion! Created 4 years, 10 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/SVGAnimatedHref.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/SVGAnimatedHref.h
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimatedHref.h b/third_party/WebKit/Source/core/svg/SVGAnimatedHref.h
index 18ef03d2bbef16f8216b317c69efb3c47c1c6342..9ed58ede38bda12e1b97f4d7022adba62a1419fe 100644
--- a/third_party/WebKit/Source/core/svg/SVGAnimatedHref.h
+++ b/third_party/WebKit/Source/core/svg/SVGAnimatedHref.h
@@ -9,37 +9,26 @@
namespace blink {
-// This is an "access wrapper" for the 'href' attribute. It holds one object
-// for 'href' in the null/default NS and one for 'href' in the XLink NS. The
-// internal objects are the ones added to an SVGElement's property map and
-// hence any updates/synchronization/etc via the "attribute DOM" (setAttribute
-// and friends) will operate on the internal objects, while users of 'href'
-// will be using this interface (which essentially just selects one of the
-// internal objects and forwards the operation to it.)
+// This is an "access wrapper" for the 'href' attribute. The object
+// itself holds the value for 'href' in the null/default NS and wraps
+// one for 'href' in the XLink NS. Both objects are added to an
+// SVGElement's property map and hence any updates/synchronization/etc
+// via the "attribute DOM" (setAttribute and friends) will operate on
+// the independent objects, while users of an 'href' value will be
+// using this interface (which essentially just selects either itself
+// or the wrapped object and forwards the operation to it.)
class SVGAnimatedHref final : public SVGAnimatedString {
public:
static PassRefPtrWillBeRawPtr<SVGAnimatedHref> create(SVGElement* contextElement);
- SVGString* baseValue() { return backingHref()->baseValue(); }
- SVGString* currentValue() { return backingHref()->currentValue(); }
- const SVGString* currentValue() const { return backingHref()->currentValue(); }
-
- // None of the below should be called on this interface.
- SVGPropertyBase* currentValueBase() override;
- const SVGPropertyBase& baseValueBase() const override;
- bool isAnimating() const override;
- PassRefPtrWillBeRawPtr<SVGPropertyBase> createAnimatedValue() override;
- void setAnimatedValue(PassRefPtrWillBeRawPtr<SVGPropertyBase>) override;
- void animationEnded() override;
- SVGParsingError setBaseValueAsString(const String&) override;
- bool needsSynchronizeAttribute() override;
- void synchronizeAttribute() override;
+ SVGString* currentValue();
+ const SVGString* currentValue() const;
String baseVal() override;
void setBaseVal(const String&, ExceptionState&) override;
String animVal() override;
- bool isSpecified() const { return m_href->isSpecified() || m_xlinkHref->isSpecified(); }
+ bool isSpecified() const { return SVGAnimatedString::isSpecified() || m_xlinkHref->isSpecified(); }
static bool isKnownAttribute(const QualifiedName&);
void addToPropertyMap(SVGElement*);
@@ -49,9 +38,10 @@ public:
private:
explicit SVGAnimatedHref(SVGElement* contextElement);
- SVGAnimatedString* backingHref() const;
+ SVGAnimatedString* backingString();
+ const SVGAnimatedString* backingString() const;
+ bool useXLink() const;
- RefPtrWillBeMember<SVGAnimatedString> m_href;
RefPtrWillBeMember<SVGAnimatedString> m_xlinkHref;
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGAnimatedHref.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698