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

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

Issue 1158583003: Reduce how often LayoutSVGShape::updateShapeFromElement is called (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
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, 2014 Apple Inc. All rights reserved. 4 * Copyright (C) 2009, 2014 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 MutableStylePropertySet* ensureAnimatedSMILStyleProperties(); 137 MutableStylePropertySet* ensureAnimatedSMILStyleProperties();
138 void setUseOverrideComputedStyle(bool); 138 void setUseOverrideComputedStyle(bool);
139 139
140 virtual bool haveLoadedRequiredResources(); 140 virtual bool haveLoadedRequiredResources();
141 141
142 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even tListener>, bool useCapture = false) override final; 142 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even tListener>, bool useCapture = false) override final;
143 virtual bool removeEventListener(const AtomicString& eventType, PassRefPtr<E ventListener>, bool useCapture = false) override final; 143 virtual bool removeEventListener(const AtomicString& eventType, PassRefPtr<E ventListener>, bool useCapture = false) override final;
144 144
145 void invalidateRelativeLengthClients(SubtreeLayoutScope* = 0); 145 void invalidateRelativeLengthClients(SubtreeLayoutScope* = 0);
146 146
147 virtual bool selfHasRelativeLengths() const { return false; }
148
147 void addToPropertyMap(PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase>); 149 void addToPropertyMap(PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase>);
148 150
149 SVGAnimatedString* className() { return m_className.get(); } 151 SVGAnimatedString* className() { return m_className.get(); }
150 152
151 bool inUseShadowTree() const; 153 bool inUseShadowTree() const;
152 154
153 SVGElementSet* setOfIncomingReferences() const; 155 SVGElementSet* setOfIncomingReferences() const;
154 void addReferenceTo(SVGElement*); 156 void addReferenceTo(SVGElement*);
155 void rebuildAllIncomingReferences(); 157 void rebuildAllIncomingReferences();
156 void removeAllIncomingReferences(); 158 void removeAllIncomingReferences();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 200
199 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; 201 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override;
200 virtual void removedFrom(ContainerNode*) override; 202 virtual void removedFrom(ContainerNode*) override;
201 virtual void childrenChanged(const ChildrenChange&) override; 203 virtual void childrenChanged(const ChildrenChange&) override;
202 204
203 static CSSPropertyID cssPropertyIdForSVGAttributeName(const QualifiedName&); 205 static CSSPropertyID cssPropertyIdForSVGAttributeName(const QualifiedName&);
204 void updateRelativeLengthsInformation() { updateRelativeLengthsInformation(s elfHasRelativeLengths(), this); } 206 void updateRelativeLengthsInformation() { updateRelativeLengthsInformation(s elfHasRelativeLengths(), this); }
205 void updateRelativeLengthsInformation(bool hasRelativeLengths, SVGElement*); 207 void updateRelativeLengthsInformation(bool hasRelativeLengths, SVGElement*);
206 static void markForLayoutAndParentResourceInvalidation(LayoutObject*); 208 static void markForLayoutAndParentResourceInvalidation(LayoutObject*);
207 209
208 virtual bool selfHasRelativeLengths() const { return false; }
209
210 SVGElementRareData* ensureSVGRareData(); 210 SVGElementRareData* ensureSVGRareData();
211 inline bool hasSVGRareData() const { return m_SVGRareData; } 211 inline bool hasSVGRareData() const { return m_SVGRareData; }
212 inline SVGElementRareData* svgRareData() const 212 inline SVGElementRareData* svgRareData() const
213 { 213 {
214 ASSERT(m_SVGRareData); 214 ASSERT(m_SVGRareData);
215 return m_SVGRareData.get(); 215 return m_SVGRareData.get();
216 } 216 }
217 217
218 // SVGFitToViewBox::parseAttribute uses reportAttributeParsingError. 218 // SVGFitToViewBox::parseAttribute uses reportAttributeParsingError.
219 friend class SVGFitToViewBox; 219 friend class SVGFitToViewBox;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 template<typename T> inline bool is##thisType(const PassRefPtrWillBeRawPtr<T >& node) { return is##thisType(node.get()); } \ 275 template<typename T> inline bool is##thisType(const PassRefPtrWillBeRawPtr<T >& node) { return is##thisType(node.get()); } \
276 template<typename T> inline bool is##thisType(const RefPtrWillBeMember<T>& n ode) { return is##thisType(node.get()); } \ 276 template<typename T> inline bool is##thisType(const RefPtrWillBeMember<T>& n ode) { return is##thisType(node.get()); } \
277 template <> inline bool isElementOfType<const thisType>(const SVGElement& el ement) { return is##thisType(element); } \ 277 template <> inline bool isElementOfType<const thisType>(const SVGElement& el ement) { return is##thisType(element); } \
278 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) 278 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType)
279 279
280 } // namespace blink 280 } // namespace blink
281 281
282 #include "core/SVGElementTypeHelpers.h" 282 #include "core/SVGElementTypeHelpers.h"
283 283
284 #endif // SVGElement_h 284 #endif // SVGElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698