| 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 28 matching lines...) Expand all Loading... |
| 39 // Use this for accesses to 'href' or 'xlink:href' (in that order) for | 39 // Use this for accesses to 'href' or 'xlink:href' (in that order) for |
| 40 // elements where both are allowed and don't necessarily inherit from | 40 // elements where both are allowed and don't necessarily inherit from |
| 41 // SVGURIReference. | 41 // SVGURIReference. |
| 42 static const AtomicString& legacyHrefString(const SVGElement&); | 42 static const AtomicString& legacyHrefString(const SVGElement&); |
| 43 | 43 |
| 44 // Like above, but for elements that inherit from SVGURIReference. Resolves | 44 // Like above, but for elements that inherit from SVGURIReference. Resolves |
| 45 // against the base URL of the passed Document. | 45 // against the base URL of the passed Document. |
| 46 KURL legacyHrefURL(const Document&) const; | 46 KURL legacyHrefURL(const Document&) const; |
| 47 | 47 |
| 48 static AtomicString fragmentIdentifierFromIRIString(const String&, const Tre
eScope&); | 48 static AtomicString fragmentIdentifierFromIRIString(const String&, const Tre
eScope&); |
| 49 static Element* targetElementFromIRIString(const String&, const TreeScope&,
AtomicString* = 0, Document* = 0); | 49 static Element* targetElementFromIRIString(const String&, const TreeScope&,
AtomicString* = nullptr); |
| 50 | 50 |
| 51 static inline bool isExternalURIReference(const String& uri, const Document&
document) | 51 static inline bool isExternalURIReference(const String& uri, const Document&
document) |
| 52 { | 52 { |
| 53 // Fragment-only URIs are always internal if the baseURL is same as the
document URL. | 53 // Fragment-only URIs are always internal if the baseURL is same as the
document URL. |
| 54 // This is common case, so check that first to avoid resolving URL (whic
h is relatively expensive). See crbug.com/557979 | 54 // This is common case, so check that first to avoid resolving URL (whic
h is relatively expensive). See crbug.com/557979 |
| 55 if (document.baseURL() == document.url() && uri.startsWith('#')) | 55 if (document.baseURL() == document.url() && uri.startsWith('#')) |
| 56 return false; | 56 return false; |
| 57 | 57 |
| 58 // If the URI matches our documents URL, we're dealing with a local refe
rence. | 58 // If the URI matches our documents URL, we're dealing with a local refe
rence. |
| 59 KURL url = document.completeURL(uri); | 59 KURL url = document.completeURL(uri); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 70 protected: | 70 protected: |
| 71 explicit SVGURIReference(SVGElement*); | 71 explicit SVGURIReference(SVGElement*); |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 Member<SVGAnimatedHref> m_href; | 74 Member<SVGAnimatedHref> m_href; |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace blink | 77 } // namespace blink |
| 78 | 78 |
| 79 #endif // SVGURIReference_h | 79 #endif // SVGURIReference_h |
| OLD | NEW |