| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2008, 2009 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2008, 2009 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 namespace WebCore { | 26 namespace WebCore { |
| 27 | 27 |
| 28 class Attribute; | 28 class Attribute; |
| 29 class Element; | 29 class Element; |
| 30 | 30 |
| 31 class SVGURIReference { | 31 class SVGURIReference { |
| 32 public: | 32 public: |
| 33 virtual ~SVGURIReference() { } | 33 virtual ~SVGURIReference() { } |
| 34 | 34 |
| 35 bool parseAttribute(const QualifiedName&, const AtomicString&); | |
| 36 bool isKnownAttribute(const QualifiedName&); | 35 bool isKnownAttribute(const QualifiedName&); |
| 37 void addSupportedAttributes(HashSet<QualifiedName>&); | 36 void addSupportedAttributes(HashSet<QualifiedName>&); |
| 38 | 37 |
| 39 static AtomicString fragmentIdentifierFromIRIString(const String&, const Doc
ument&); | 38 static AtomicString fragmentIdentifierFromIRIString(const String&, const Doc
ument&); |
| 40 static Element* targetElementFromIRIString(const String&, const Document&, A
tomicString* = 0, Document* = 0); | 39 static Element* targetElementFromIRIString(const String&, const Document&, A
tomicString* = 0, Document* = 0); |
| 41 | 40 |
| 42 static inline bool isExternalURIReference(const String& uri, const Document&
document) | 41 static inline bool isExternalURIReference(const String& uri, const Document&
document) |
| 43 { | 42 { |
| 44 // Fragment-only URIs are always internal | 43 // Fragment-only URIs are always internal |
| 45 if (uri.startsWith('#')) | 44 if (uri.startsWith('#')) |
| 46 return false; | 45 return false; |
| 47 | 46 |
| 48 // If the URI matches our documents URL, we're dealing with a local refe
rence. | 47 // If the URI matches our documents URL, we're dealing with a local refe
rence. |
| 49 KURL url = document.completeURL(uri); | 48 KURL url = document.completeURL(uri); |
| 50 return !equalIgnoringFragmentIdentifier(url, document.url()); | 49 return !equalIgnoringFragmentIdentifier(url, document.url()); |
| 51 } | 50 } |
| 52 | |
| 53 protected: | |
| 54 virtual void setHrefBaseValue(const String&) = 0; | |
| 55 }; | 51 }; |
| 56 | 52 |
| 57 } // namespace WebCore | 53 } // namespace WebCore |
| 58 | 54 |
| 59 #endif // SVGURIReference_h | 55 #endif // SVGURIReference_h |
| OLD | NEW |