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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 AtomicString* = nullptr); | 52 AtomicString* = nullptr); |
53 | 53 |
54 const String& hrefString() const { return m_href->currentValue()->value(); } | 54 const String& hrefString() const { return m_href->currentValue()->value(); } |
55 | 55 |
56 // JS API | 56 // JS API |
57 SVGAnimatedHref* href() const { return m_href.get(); } | 57 SVGAnimatedHref* href() const { return m_href.get(); } |
58 | 58 |
59 DECLARE_VIRTUAL_TRACE(); | 59 DECLARE_VIRTUAL_TRACE(); |
60 | 60 |
61 protected: | 61 protected: |
62 explicit SVGURIReference(SVGElement*); | 62 enum PropertyMapAddition { |
| 63 DoNotAddToPropertyMap, |
| 64 AddToPropertyMap, |
| 65 }; |
| 66 explicit SVGURIReference(SVGElement*, PropertyMapAddition = AddToPropertyMap); |
63 | 67 |
64 private: | 68 private: |
65 Member<SVGAnimatedHref> m_href; | 69 Member<SVGAnimatedHref> m_href; |
66 }; | 70 }; |
67 | 71 |
68 // Helper class used to resolve fragment references. Handles the 'local url | 72 // Helper class used to resolve fragment references. Handles the 'local url |
69 // flag' per https://drafts.csswg.org/css-values/#local-urls . | 73 // flag' per https://drafts.csswg.org/css-values/#local-urls . |
70 class SVGURLReferenceResolver { | 74 class SVGURLReferenceResolver { |
71 STACK_ALLOCATED(); | 75 STACK_ALLOCATED(); |
72 | 76 |
73 public: | 77 public: |
74 SVGURLReferenceResolver(const String& urlString, const Document&); | 78 SVGURLReferenceResolver(const String& urlString, const Document&); |
75 | 79 |
76 bool isLocal() const; | 80 bool isLocal() const; |
77 KURL absoluteUrl() const; | 81 KURL absoluteUrl() const; |
78 AtomicString fragmentIdentifier() const; | 82 AtomicString fragmentIdentifier() const; |
79 | 83 |
80 private: | 84 private: |
81 const String& m_relativeUrl; | 85 const String& m_relativeUrl; |
82 Member<const Document> m_document; | 86 Member<const Document> m_document; |
83 mutable KURL m_absoluteUrl; | 87 mutable KURL m_absoluteUrl; |
84 bool m_isLocal; | 88 bool m_isLocal; |
85 }; | 89 }; |
86 | 90 |
87 } // namespace blink | 91 } // namespace blink |
88 | 92 |
89 #endif // SVGURIReference_h | 93 #endif // SVGURIReference_h |
OLD | NEW |