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

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

Issue 321023002: Avoid branching in createAttributeEventListener (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 6 years, 6 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
« no previous file with comments | « Source/core/html/HTMLInputElement.cpp ('k') | Source/core/svg/SVGElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 ~InstanceUpdateBlocker(); 175 ~InstanceUpdateBlocker();
176 176
177 private: 177 private:
178 SVGElement* m_targetElement; 178 SVGElement* m_targetElement;
179 }; 179 };
180 180
181 void invalidateInstances(); 181 void invalidateInstances();
182 182
183 virtual void trace(Visitor*) OVERRIDE; 183 virtual void trace(Visitor*) OVERRIDE;
184 184
185 static const AtomicString& eventParameterName();
186
185 protected: 187 protected:
186 SVGElement(const QualifiedName&, Document&, ConstructionType = CreateSVGElem ent); 188 SVGElement(const QualifiedName&, Document&, ConstructionType = CreateSVGElem ent);
187 189
188 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 190 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
189 191
190 virtual void attributeChanged(const QualifiedName&, const AtomicString&, Att ributeModificationReason = ModifiedDirectly) OVERRIDE; 192 virtual void attributeChanged(const QualifiedName&, const AtomicString&, Att ributeModificationReason = ModifiedDirectly) OVERRIDE;
191 193
192 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 194 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
193 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) OVERRIDE; 195 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) OVERRIDE;
194 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; 196 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a .matches(b); } 258 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a .matches(b); }
257 }; 259 };
258 260
259 DEFINE_ELEMENT_TYPE_CASTS(SVGElement, isSVGElement()); 261 DEFINE_ELEMENT_TYPE_CASTS(SVGElement, isSVGElement());
260 262
261 template <> inline bool isElementOfType<const SVGElement>(const Node& node) { re turn node.isSVGElement(); } 263 template <> inline bool isElementOfType<const SVGElement>(const Node& node) { re turn node.isSVGElement(); }
262 264
263 } 265 }
264 266
265 #endif 267 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLInputElement.cpp ('k') | Source/core/svg/SVGElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698