summaryrefslogtreecommitdiff
path: root/Source/WebCore/svg/SVGURIReference.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/svg/SVGURIReference.h')
-rw-r--r--Source/WebCore/svg/SVGURIReference.h25
1 files changed, 10 insertions, 15 deletions
diff --git a/Source/WebCore/svg/SVGURIReference.h b/Source/WebCore/svg/SVGURIReference.h
index dd956af87..ddd66b27b 100644
--- a/Source/WebCore/svg/SVGURIReference.h
+++ b/Source/WebCore/svg/SVGURIReference.h
@@ -18,29 +18,25 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef SVGURIReference_h
-#define SVGURIReference_h
+#pragma once
-#if ENABLE(SVG)
#include "Document.h"
+#include "QualifiedName.h"
namespace WebCore {
-class Attribute;
-class Element;
-
class SVGURIReference {
public:
virtual ~SVGURIReference() { }
- bool parseAttribute(const QualifiedName&, const AtomicString&);
- bool isKnownAttribute(const QualifiedName&);
- void addSupportedAttributes(HashSet<QualifiedName>&);
+ void parseAttribute(const QualifiedName&, const AtomicString&);
+ static bool isKnownAttribute(const QualifiedName&);
+ static void addSupportedAttributes(HashSet<QualifiedName>&);
- static String fragmentIdentifierFromIRIString(const String&, Document&);
- static Element* targetElementFromIRIString(const String&, Document&, String* = 0, Document* = 0);
+ static String fragmentIdentifierFromIRIString(const String&, const Document&);
+ static Element* targetElementFromIRIString(const String&, const Document&, String* fragmentIdentifier = nullptr, const Document* externalDocument = nullptr);
- static inline bool isExternalURIReference(const String& uri, Document& document)
+ static bool isExternalURIReference(const String& uri, const Document& document)
{
// Fragment-only URIs are always internal
if (uri.startsWith('#'))
@@ -48,14 +44,13 @@ public:
// If the URI matches our documents URL, we're dealing with a local reference.
URL url = document.completeURL(uri);
+ ASSERT(!url.protocolIsData());
return !equalIgnoringFragmentIdentifier(url, document.url());
}
protected:
+ virtual String& hrefBaseValue() const = 0;
virtual void setHrefBaseValue(const String&, const bool validValue = true) = 0;
};
} // namespace WebCore
-
-#endif // ENABLE(SVG)
-#endif // SVGURIReference_h