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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGUseElement.h

Issue 1377063004: Use more const, more RefPtrs while iterating the SVG shadow tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | third_party/WebKit/Source/core/svg/SVGUseElement.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, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
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 16 matching lines...) Expand all
27 #include "core/svg/SVGGeometryElement.h" 27 #include "core/svg/SVGGeometryElement.h"
28 #include "core/svg/SVGGraphicsElement.h" 28 #include "core/svg/SVGGraphicsElement.h"
29 #include "core/svg/SVGURIReference.h" 29 #include "core/svg/SVGURIReference.h"
30 #include "platform/heap/Handle.h" 30 #include "platform/heap/Handle.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 typedef EventSender<SVGUseElement> SVGUseEventSender; 34 typedef EventSender<SVGUseElement> SVGUseEventSender;
35 35
36 class SVGUseElement final : public SVGGraphicsElement, 36 class SVGUseElement final : public SVGGraphicsElement,
37 public SVGURIReference, 37 public SVGURIReference,
38 public DocumentResourceClient { 38 public DocumentResourceClient {
39
39 DEFINE_WRAPPERTYPEINFO(); 40 DEFINE_WRAPPERTYPEINFO();
40 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SVGUseElement); 41 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SVGUseElement);
41 public: 42 public:
42 static PassRefPtrWillBeRawPtr<SVGUseElement> create(Document&); 43 static PassRefPtrWillBeRawPtr<SVGUseElement> create(Document&);
43 ~SVGUseElement() override; 44 ~SVGUseElement() override;
44 45
45 void invalidateShadowTree(); 46 void invalidateShadowTree();
46 47
47 // Return the element that should be used for clipping, 48 // Return the element that should be used for clipping,
48 // or null if a valid clip element is not directly referenced. 49 // or null if a valid clip element is not directly referenced.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 bool buildShadowTree(SVGElement* target, SVGElement* targetInstance, bool fo undUse); 91 bool buildShadowTree(SVGElement* target, SVGElement* targetInstance, bool fo undUse);
91 void clearShadowTree(); 92 void clearShadowTree();
92 bool hasCycleUseReferencing(SVGUseElement*, ContainerNode* targetInstance, S VGElement*& newTarget); 93 bool hasCycleUseReferencing(SVGUseElement*, ContainerNode* targetInstance, S VGElement*& newTarget);
93 bool expandUseElementsInShadowTree(SVGElement*); 94 bool expandUseElementsInShadowTree(SVGElement*);
94 void expandSymbolElementsInShadowTree(SVGElement*); 95 void expandSymbolElementsInShadowTree(SVGElement*);
95 96
96 void transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to ) const; 97 void transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to ) const;
97 98
98 void invalidateDependentShadowTrees(); 99 void invalidateDependentShadowTrees();
99 100
100 bool resourceIsStillLoading(); 101 bool resourceIsStillLoading() const;
101 Document* externalDocument() const; 102 Document* externalDocument() const;
102 bool instanceTreeIsLoading(SVGElement*); 103 bool instanceTreeIsLoading(const SVGElement*);
103 void notifyFinished(Resource*) override; 104 void notifyFinished(Resource*) override;
104 TreeScope* referencedScope() const; 105 TreeScope* referencedScope() const;
105 void setDocumentResource(ResourcePtr<DocumentResource>); 106 void setDocumentResource(ResourcePtr<DocumentResource>);
106 107
107 RefPtrWillBeMember<SVGAnimatedLength> m_x; 108 RefPtrWillBeMember<SVGAnimatedLength> m_x;
108 RefPtrWillBeMember<SVGAnimatedLength> m_y; 109 RefPtrWillBeMember<SVGAnimatedLength> m_y;
109 RefPtrWillBeMember<SVGAnimatedLength> m_width; 110 RefPtrWillBeMember<SVGAnimatedLength> m_width;
110 RefPtrWillBeMember<SVGAnimatedLength> m_height; 111 RefPtrWillBeMember<SVGAnimatedLength> m_height;
111 112
112 bool m_haveFiredLoadEvent; 113 bool m_haveFiredLoadEvent;
113 bool m_needsShadowTreeRecreation; 114 bool m_needsShadowTreeRecreation;
114 RefPtrWillBeMember<SVGElement> m_targetElementInstance; 115 RefPtrWillBeMember<SVGElement> m_targetElementInstance;
115 ResourcePtr<DocumentResource> m_resource; 116 ResourcePtr<DocumentResource> m_resource;
116 }; 117 };
117 118
118 } // namespace blink 119 } // namespace blink
119 120
120 #endif // SVGUseElement_h 121 #endif // SVGUseElement_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGUseElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698