OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2009 Apple Inc. All rights reserved. | 4 * Copyright (C) 2009 Apple Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
148 | 148 |
149 bool isContextElement() const { return m_isContextElement; } | 149 bool isContextElement() const { return m_isContextElement; } |
150 void setContextElement() { m_isContextElement = true; } | 150 void setContextElement() { m_isContextElement = true; } |
151 | 151 |
152 void addToPropertyMap(PassRefPtr<SVGAnimatedPropertyBase>); | 152 void addToPropertyMap(PassRefPtr<SVGAnimatedPropertyBase>); |
153 | 153 |
154 SVGAnimatedString* className() { return m_className.get(); } | 154 SVGAnimatedString* className() { return m_className.get(); } |
155 | 155 |
156 bool inUseShadowTree() const; | 156 bool inUseShadowTree() const; |
157 | 157 |
158 class InstanceInvalidationGuard { | |
pdr.
2014/05/05 21:00:15
I would have left this as InvalidationGuard since
| |
159 WTF_MAKE_NONCOPYABLE(InstanceInvalidationGuard); | |
160 public: | |
161 InstanceInvalidationGuard(SVGElement* element) : m_element(element) { } | |
162 ~InstanceInvalidationGuard() { SVGElement::invalidateAllInstancesOfEleme nt(m_element); } | |
163 private: | |
164 SVGElement* m_element; | |
165 }; | |
166 | |
167 class InstanceUpdateBlocker { | |
168 WTF_MAKE_NONCOPYABLE(InstanceUpdateBlocker); | |
169 public: | |
170 InstanceUpdateBlocker(SVGElement* targetElement); | |
171 ~InstanceUpdateBlocker(); | |
172 | |
173 private: | |
174 SVGElement* m_targetElement; | |
175 }; | |
176 | |
177 static void invalidateAllInstancesOfElement(SVGElement*); | |
178 | |
158 protected: | 179 protected: |
159 SVGElement(const QualifiedName&, Document&, ConstructionType = CreateSVGElem ent); | 180 SVGElement(const QualifiedName&, Document&, ConstructionType = CreateSVGElem ent); |
160 | 181 |
161 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; | 182 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; |
162 | 183 |
163 virtual void finishParsingChildren() OVERRIDE; | 184 virtual void finishParsingChildren() OVERRIDE; |
164 virtual void attributeChanged(const QualifiedName&, const AtomicString&, Att ributeModificationReason = ModifiedDirectly) OVERRIDE; | 185 virtual void attributeChanged(const QualifiedName&, const AtomicString&, Att ributeModificationReason = ModifiedDirectly) OVERRIDE; |
165 | 186 |
166 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; | 187 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; |
167 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) OVERRIDE; | 188 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) OVERRIDE; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
233 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a .matches(b); } | 254 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a .matches(b); } |
234 }; | 255 }; |
235 | 256 |
236 DEFINE_ELEMENT_TYPE_CASTS(SVGElement, isSVGElement()); | 257 DEFINE_ELEMENT_TYPE_CASTS(SVGElement, isSVGElement()); |
237 | 258 |
238 template <> inline bool isElementOfType<const SVGElement>(const Node& node) { re turn node.isSVGElement(); } | 259 template <> inline bool isElementOfType<const SVGElement>(const Node& node) { re turn node.isSVGElement(); } |
239 | 260 |
240 } | 261 } |
241 | 262 |
242 #endif | 263 #endif |
OLD | NEW |