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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 const TreeScope&, | 54 const TreeScope&, |
55 AtomicString* = nullptr); | 55 AtomicString* = nullptr); |
56 | 56 |
57 const String& hrefString() const { return m_href->currentValue()->value(); } | 57 const String& hrefString() const { return m_href->currentValue()->value(); } |
58 | 58 |
59 // Create an 'id' observer for the href associated with this SVGURIReference | 59 // Create an 'id' observer for the href associated with this SVGURIReference |
60 // and its corresponding SVGElement (which should be passed as | 60 // and its corresponding SVGElement (which should be passed as |
61 // |contextElement|.) Will call buildPendingResource() on |contextElement| | 61 // |contextElement|.) Will call buildPendingResource() on |contextElement| |
62 // when changes to the 'id' are noticed. | 62 // when changes to the 'id' are noticed. |
63 Element* observeTarget(Member<IdTargetObserver>&, SVGElement&); | 63 Element* observeTarget(Member<IdTargetObserver>&, SVGElement&); |
| 64 // Create an 'id' observer for any id denoted by |hrefString|, calling |
| 65 // buildPendingResource() on |contextElement| on changes. |
| 66 static Element* observeTarget(Member<IdTargetObserver>&, |
| 67 SVGElement&, |
| 68 const String& hrefString); |
64 // Create an 'id' observer for |id| in the specified TreeScope. On changes, | 69 // Create an 'id' observer for |id| in the specified TreeScope. On changes, |
65 // the passed Closure will be called. | 70 // the passed Closure will be called. |
66 static Element* observeTarget(Member<IdTargetObserver>&, | 71 static Element* observeTarget(Member<IdTargetObserver>&, |
67 TreeScope&, | 72 TreeScope&, |
68 const AtomicString& id, | 73 const AtomicString& id, |
69 std::unique_ptr<WTF::Closure>); | 74 std::unique_ptr<WTF::Closure>); |
70 // Unregister and destroy the observer. | 75 // Unregister and destroy the observer. |
71 static void unobserveTarget(Member<IdTargetObserver>&); | 76 static void unobserveTarget(Member<IdTargetObserver>&); |
72 | 77 |
73 // JS API | 78 // JS API |
(...skipping 23 matching lines...) Expand all Loading... |
97 private: | 102 private: |
98 const String& m_relativeUrl; | 103 const String& m_relativeUrl; |
99 Member<const Document> m_document; | 104 Member<const Document> m_document; |
100 mutable KURL m_absoluteUrl; | 105 mutable KURL m_absoluteUrl; |
101 bool m_isLocal; | 106 bool m_isLocal; |
102 }; | 107 }; |
103 | 108 |
104 } // namespace blink | 109 } // namespace blink |
105 | 110 |
106 #endif // SVGURIReference_h | 111 #endif // SVGURIReference_h |
OLD | NEW |