Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / svg / SVGURIReference.h
index c940502..07c726f 100644 (file)
 #define SVGURIReference_h
 
 #include "core/dom/Document.h"
+#include "core/svg/SVGAnimatedString.h"
 
-namespace WebCore {
+namespace blink {
 
-class Attribute;
 class Element;
 
 class SVGURIReference {
 public:
     virtual ~SVGURIReference() { }
 
-    bool parseAttribute(const QualifiedName&, const AtomicString&);
     bool isKnownAttribute(const QualifiedName&);
     void addSupportedAttributes(HashSet<QualifiedName>&);
 
-    static AtomicString fragmentIdentifierFromIRIString(const String&, const Document&);
-    static Element* targetElementFromIRIString(const String&, const Document&, AtomicString* = 0, Document* = 0);
+    static AtomicString fragmentIdentifierFromIRIString(const String&, const TreeScope&);
+    static Element* targetElementFromIRIString(const String&, const TreeScope&, AtomicString* = 0, Document* = 0);
 
     static inline bool isExternalURIReference(const String& uri, const Document& document)
     {
@@ -50,10 +49,18 @@ public:
         return !equalIgnoringFragmentIdentifier(url, document.url());
     }
 
+    const String& hrefString() const { return m_href->currentValue()->value(); }
+
+    // JS API
+    SVGAnimatedString* href() const { return m_href.get(); }
+
 protected:
-    virtual void setHrefBaseValue(const String&) = 0;
+    explicit SVGURIReference(SVGElement*);
+
+private:
+    RefPtr<SVGAnimatedString> m_href;
 };
 
-} // namespace WebCore
+} // namespace blink
 
 #endif // SVGURIReference_h