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

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: 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') | Source/core/svg/SVGElement.cpp » ('J')
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 bool hasSVGRareData() const { return m_hasSVGRareData; } 205 bool hasSVGRareData() const { return m_hasSVGRareData; }
205 void setHasSVGRareData() { m_hasSVGRareData = true; } 206 void setHasSVGRareData() { m_hasSVGRareData = true; }
206 void clearHasSVGRareData() { m_hasSVGRareData = false; } 207 void clearHasSVGRareData() { m_hasSVGRareData = false; }
207 208
208 // SVGFitToViewBox::parseAttribute uses reportAttributeParsingError. 209 // SVGFitToViewBox::parseAttribute uses reportAttributeParsingError.
209 friend class SVGFitToViewBox; 210 friend class SVGFitToViewBox;
210 void reportAttributeParsingError(SVGParsingError, const QualifiedName&, cons t AtomicString&); 211 void reportAttributeParsingError(SVGParsingError, const QualifiedName&, cons t AtomicString&);
211 bool hasFocusEventListeners() const; 212 bool hasFocusEventListeners() const;
212 213
213 private: 214 private:
214 friend class SVGElementInstance;
215
216 // FIXME: Author shadows should be allowed 215 // FIXME: Author shadows should be allowed
217 // https://bugs.webkit.org/show_bug.cgi?id=77938 216 // https://bugs.webkit.org/show_bug.cgi?id=77938
218 virtual bool areAuthorShadowsAllowed() const OVERRIDE FINAL { return false; } 217 virtual bool areAuthorShadowsAllowed() const OVERRIDE FINAL { return false; }
219 218
220 RenderStyle* computedStyle(PseudoId = NOPSEUDO); 219 RenderStyle* computedStyle(PseudoId = NOPSEUDO);
221 virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO) OVERRIDE FINAL { return computedStyle(pseudoElementSpecifier); } 220 virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO) OVERRIDE FINAL { return computedStyle(pseudoElementSpecifier); }
222 virtual void willRecalcStyle(StyleRecalcChange) OVERRIDE; 221 virtual void willRecalcStyle(StyleRecalcChange) OVERRIDE;
223 222
224 void buildPendingResourcesIfNeeded(); 223 void buildPendingResourcesIfNeeded();
225 224
226 void mapInstanceToElement(SVGElementInstance*);
227 void removeInstanceMapping(SVGElementInstance*);
228
229 bool supportsSpatialNavigationFocus() const; 225 bool supportsSpatialNavigationFocus() const;
230 226
231 HashSet<SVGElement*> m_elementsWithRelativeLengths; 227 HashSet<SVGElement*> m_elementsWithRelativeLengths;
232 228
233 typedef HashMap<QualifiedName, RefPtr<SVGAnimatedPropertyBase> > AttributeTo PropertyMap; 229 typedef HashMap<QualifiedName, RefPtr<SVGAnimatedPropertyBase> > AttributeTo PropertyMap;
234 AttributeToPropertyMap m_newAttributeToPropertyMap; 230 AttributeToPropertyMap m_newAttributeToPropertyMap;
235 231
236 #if !ASSERT_DISABLED 232 #if !ASSERT_DISABLED
237 bool m_inRelativeLengthClientsInvalidation; 233 bool m_inRelativeLengthClientsInvalidation;
238 #endif 234 #endif
(...skipping 15 matching lines...) Expand all
254 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a .matches(b); } 250 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a .matches(b); }
255 }; 251 };
256 252
257 DEFINE_ELEMENT_TYPE_CASTS(SVGElement, isSVGElement()); 253 DEFINE_ELEMENT_TYPE_CASTS(SVGElement, isSVGElement());
258 254
259 template <> inline bool isElementOfType<const SVGElement>(const Node& node) { re turn node.isSVGElement(); } 255 template <> inline bool isElementOfType<const SVGElement>(const Node& node) { re turn node.isSVGElement(); }
260 256
261 } 257 }
262 258
263 #endif 259 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/svg/SVGElement.cpp » ('j') | Source/core/svg/SVGElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698