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

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

Issue 272623003: Stop using SVGElementInstance in SVGElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Do shadow dom deletion later 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
« no previous file with comments | « no previous file | 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 22 matching lines...) Expand all
33 33
34 namespace WebCore { 34 namespace WebCore {
35 35
36 class AffineTransform; 36 class AffineTransform;
37 class CSSCursorImageValue; 37 class CSSCursorImageValue;
38 class Document; 38 class Document;
39 class SVGAnimatedPropertyBase; 39 class SVGAnimatedPropertyBase;
40 class SubtreeLayoutScope; 40 class SubtreeLayoutScope;
41 class SVGCursorElement; 41 class SVGCursorElement;
42 class SVGDocumentExtensions; 42 class SVGDocumentExtensions;
43 class SVGElementInstance;
44 class SVGElementRareData; 43 class SVGElementRareData;
45 class SVGFitToViewBox; 44 class SVGFitToViewBox;
46 class SVGSVGElement; 45 class SVGSVGElement;
47 46
48 void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyName ToIdMap, const QualifiedName& attrName); 47 void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyName ToIdMap, const QualifiedName& attrName);
49 48
50 class SVGElement : public Element { 49 class SVGElement : public Element {
51 public: 50 public:
52 virtual ~SVGElement(); 51 virtual ~SVGElement();
53 52
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 void sendSVGLoadEventIfPossibleAsynchronously(); 101 void sendSVGLoadEventIfPossibleAsynchronously();
103 void svgLoadEventTimerFired(Timer<SVGElement>*); 102 void svgLoadEventTimerFired(Timer<SVGElement>*);
104 virtual Timer<SVGElement>* svgLoadEventTimer(); 103 virtual Timer<SVGElement>* svgLoadEventTimer();
105 104
106 virtual AffineTransform* supplementalTransform() { return 0; } 105 virtual AffineTransform* supplementalTransform() { return 0; }
107 106
108 void invalidateSVGAttributes() { ensureUniqueElementData().m_animatedSVGAttr ibutesAreDirty = true; } 107 void invalidateSVGAttributes() { ensureUniqueElementData().m_animatedSVGAttr ibutesAreDirty = true; }
109 void invalidateSVGPresentationAttributeStyle() { ensureUniqueElementData().m _presentationAttributeStyleIsDirty = true; } 108 void invalidateSVGPresentationAttributeStyle() { ensureUniqueElementData().m _presentationAttributeStyleIsDirty = true; }
110 109
111 const HashSet<SVGElement*>& instancesForElement() const; 110 const HashSet<SVGElement*>& instancesForElement() const;
111 void mapInstanceToElement(SVGElement*);
112 void removeInstanceMapping(SVGElement*);
112 113
113 bool getBoundingBox(FloatRect&); 114 bool getBoundingBox(FloatRect&);
114 115
115 void setCursorElement(SVGCursorElement*); 116 void setCursorElement(SVGCursorElement*);
116 void setCursorImageValue(CSSCursorImageValue*); 117 void setCursorImageValue(CSSCursorImageValue*);
117 #if !ENABLE(OILPAN) 118 #if !ENABLE(OILPAN)
118 void cursorElementRemoved(); 119 void cursorElementRemoved();
119 void cursorImageValueRemoved(); 120 void cursorImageValueRemoved();
120 #endif 121 #endif
121 122
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 bool hasSVGRareData() const { return m_hasSVGRareData; } 204 bool hasSVGRareData() const { return m_hasSVGRareData; }
204 void setHasSVGRareData() { m_hasSVGRareData = true; } 205 void setHasSVGRareData() { m_hasSVGRareData = true; }
205 void clearHasSVGRareData() { m_hasSVGRareData = false; } 206 void clearHasSVGRareData() { m_hasSVGRareData = false; }
206 207
207 // SVGFitToViewBox::parseAttribute uses reportAttributeParsingError. 208 // SVGFitToViewBox::parseAttribute uses reportAttributeParsingError.
208 friend class SVGFitToViewBox; 209 friend class SVGFitToViewBox;
209 void reportAttributeParsingError(SVGParsingError, const QualifiedName&, cons t AtomicString&); 210 void reportAttributeParsingError(SVGParsingError, const QualifiedName&, cons t AtomicString&);
210 bool hasFocusEventListeners() const; 211 bool hasFocusEventListeners() const;
211 212
212 private: 213 private:
213 friend class SVGElementInstance;
214
215 // FIXME: Author shadows should be allowed 214 // FIXME: Author shadows should be allowed
216 // https://bugs.webkit.org/show_bug.cgi?id=77938 215 // https://bugs.webkit.org/show_bug.cgi?id=77938
217 virtual bool areAuthorShadowsAllowed() const OVERRIDE FINAL { return false; } 216 virtual bool areAuthorShadowsAllowed() const OVERRIDE FINAL { return false; }
218 217
219 RenderStyle* computedStyle(PseudoId = NOPSEUDO); 218 RenderStyle* computedStyle(PseudoId = NOPSEUDO);
220 virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO) OVERRIDE FINAL { return computedStyle(pseudoElementSpecifier); } 219 virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO) OVERRIDE FINAL { return computedStyle(pseudoElementSpecifier); }
221 virtual void willRecalcStyle(StyleRecalcChange) OVERRIDE; 220 virtual void willRecalcStyle(StyleRecalcChange) OVERRIDE;
222 221
223 void buildPendingResourcesIfNeeded(); 222 void buildPendingResourcesIfNeeded();
224 223
225 void mapInstanceToElement(SVGElementInstance*);
226 void removeInstanceMapping(SVGElementInstance*);
227
228 bool supportsSpatialNavigationFocus() const; 224 bool supportsSpatialNavigationFocus() const;
229 225
230 HashSet<SVGElement*> m_elementsWithRelativeLengths; 226 HashSet<SVGElement*> m_elementsWithRelativeLengths;
231 227
232 typedef HashMap<QualifiedName, RefPtr<SVGAnimatedPropertyBase> > AttributeTo PropertyMap; 228 typedef HashMap<QualifiedName, RefPtr<SVGAnimatedPropertyBase> > AttributeTo PropertyMap;
233 AttributeToPropertyMap m_newAttributeToPropertyMap; 229 AttributeToPropertyMap m_newAttributeToPropertyMap;
234 230
235 #if !ASSERT_DISABLED 231 #if !ASSERT_DISABLED
236 bool m_inRelativeLengthClientsInvalidation; 232 bool m_inRelativeLengthClientsInvalidation;
237 #endif 233 #endif
(...skipping 15 matching lines...) Expand all
253 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a .matches(b); } 249 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a .matches(b); }
254 }; 250 };
255 251
256 DEFINE_ELEMENT_TYPE_CASTS(SVGElement, isSVGElement()); 252 DEFINE_ELEMENT_TYPE_CASTS(SVGElement, isSVGElement());
257 253
258 template <> inline bool isElementOfType<const SVGElement>(const Node& node) { re turn node.isSVGElement(); } 254 template <> inline bool isElementOfType<const SVGElement>(const Node& node) { re turn node.isSVGElement(); }
259 255
260 } 256 }
261 257
262 #endif 258 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/svg/SVGElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698