Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: Source/core/svg/SVGElementInstance.h

Issue 268223003: Move InvalidationGuard/InstanceUpdateBlocker out of SVGElementInstance (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 3 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 SVGElementInstance* parentNode() const { return m_parentInstance; } 66 SVGElementInstance* parentNode() const { return m_parentInstance; }
67 67
68 SVGElementInstance* previousSibling() const { return m_previousSibling; } 68 SVGElementInstance* previousSibling() const { return m_previousSibling; }
69 SVGElementInstance* nextSibling() const { return m_nextSibling; } 69 SVGElementInstance* nextSibling() const { return m_nextSibling; }
70 70
71 SVGElementInstance* firstChild() const { return m_firstChild; } 71 SVGElementInstance* firstChild() const { return m_firstChild; }
72 SVGElementInstance* lastChild() const { return m_lastChild; } 72 SVGElementInstance* lastChild() const { return m_lastChild; }
73 73
74 inline Document* ownerDocument() const; 74 inline Document* ownerDocument() const;
75 75
76 class InvalidationGuard {
77 WTF_MAKE_NONCOPYABLE(InvalidationGuard);
78 public:
79 InvalidationGuard(SVGElement* element) : m_element(element) { }
80 ~InvalidationGuard() { SVGElementInstance::invalidateAllInstancesOfEleme nt(m_element); }
81 private:
82 SVGElement* m_element;
83 };
84
85 class InstanceUpdateBlocker {
86 WTF_MAKE_NONCOPYABLE(InstanceUpdateBlocker);
87 public:
88 InstanceUpdateBlocker(SVGElement* targetElement);
89 ~InstanceUpdateBlocker();
90
91 private:
92 SVGElement* m_targetElement;
93 };
94
95 static void invalidateAllInstancesOfElement(SVGElement*);
96
97 virtual void trace(Visitor*) { } 76 virtual void trace(Visitor*) { }
98 77
99 // EventTarget API 78 // EventTarget API
100 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), abort); 79 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), abort);
101 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), blur); 80 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), blur);
102 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), change); 81 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), change);
103 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), click); 82 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), click);
104 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), contextm enu); 83 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), contextm enu);
105 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), dblclick ); 84 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), dblclick );
106 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), error); 85 DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(correspondingElement(), error);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 SVGElementInstance* m_previousSibling; 164 SVGElementInstance* m_previousSibling;
186 SVGElementInstance* m_nextSibling; 165 SVGElementInstance* m_nextSibling;
187 166
188 SVGElementInstance* m_firstChild; 167 SVGElementInstance* m_firstChild;
189 SVGElementInstance* m_lastChild; 168 SVGElementInstance* m_lastChild;
190 }; 169 };
191 170
192 } // namespace WebCore 171 } // namespace WebCore
193 172
194 #endif 173 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698