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

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

Issue 1150623003: Revamp asynchronous (load) event dispatching for SVG elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/svg/SVGElement.cpp » ('j') | Source/core/svg/SVGStyleElement.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, 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 *
11 * This library is distributed in the hope that it will be useful, 11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details. 14 * Library General Public License for more details.
15 * 15 *
16 * You should have received a copy of the GNU Library General Public License 16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to 17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA. 19 * Boston, MA 02110-1301, USA.
20 */ 20 */
21 21
22 #ifndef SVGElement_h 22 #ifndef SVGElement_h
23 #define SVGElement_h 23 #define SVGElement_h
24 24
25 #include "core/SVGNames.h" 25 #include "core/SVGNames.h"
26 #include "core/dom/Element.h" 26 #include "core/dom/Element.h"
27 #include "core/svg/SVGParsingError.h" 27 #include "core/svg/SVGParsingError.h"
28 #include "core/svg/properties/SVGPropertyInfo.h" 28 #include "core/svg/properties/SVGPropertyInfo.h"
29 #include "platform/Timer.h"
30 #include "platform/heap/Handle.h" 29 #include "platform/heap/Handle.h"
31 #include "wtf/HashMap.h" 30 #include "wtf/HashMap.h"
32 #include "wtf/OwnPtr.h" 31 #include "wtf/OwnPtr.h"
33 32
34 namespace blink { 33 namespace blink {
35 34
36 class AffineTransform; 35 class AffineTransform;
37 class CSSCursorImageValue; 36 class CSSCursorImageValue;
38 class Document; 37 class Document;
39 class SVGAnimatedPropertyBase; 38 class SVGAnimatedPropertyBase;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // For SVGTests 92 // For SVGTests
94 virtual bool isValid() const { return true; } 93 virtual bool isValid() const { return true; }
95 94
96 virtual void svgAttributeChanged(const QualifiedName&); 95 virtual void svgAttributeChanged(const QualifiedName&);
97 96
98 PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> propertyFromAttribute(const QualifiedName& attributeName); 97 PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> propertyFromAttribute(const QualifiedName& attributeName);
99 static AnimatedPropertyType animatedPropertyTypeForCSSAttribute(const Qualif iedName& attributeName); 98 static AnimatedPropertyType animatedPropertyTypeForCSSAttribute(const Qualif iedName& attributeName);
100 99
101 void sendSVGLoadEventToSelfAndAncestorChainIfPossible(); 100 void sendSVGLoadEventToSelfAndAncestorChainIfPossible();
102 bool sendSVGLoadEventIfPossible(); 101 bool sendSVGLoadEventIfPossible();
103 void sendSVGLoadEventIfPossibleAsynchronously();
104 void svgLoadEventTimerFired(Timer<SVGElement>*);
105 virtual Timer<SVGElement>* svgLoadEventTimer();
106 102
107 virtual AffineTransform* animateMotionTransform() { return nullptr; } 103 virtual AffineTransform* animateMotionTransform() { return nullptr; }
108 104
109 void invalidateSVGAttributes() { ensureUniqueElementData().m_animatedSVGAttr ibutesAreDirty = true; } 105 void invalidateSVGAttributes() { ensureUniqueElementData().m_animatedSVGAttr ibutesAreDirty = true; }
110 void invalidateSVGPresentationAttributeStyle() { ensureUniqueElementData().m _presentationAttributeStyleIsDirty = true; } 106 void invalidateSVGPresentationAttributeStyle() { ensureUniqueElementData().m _presentationAttributeStyleIsDirty = true; }
111 void addSVGLengthPropertyToPresentationAttributeStyle(MutableStylePropertySe t*, CSSPropertyID, SVGLength&); 107 void addSVGLengthPropertyToPresentationAttributeStyle(MutableStylePropertySe t*, CSSPropertyID, SVGLength&);
112 108
113 const WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement>>& instancesForEle ment() const; 109 const WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement>>& instancesForEle ment() const;
114 void mapInstanceToElement(SVGElement*); 110 void mapInstanceToElement(SVGElement*);
115 void removeInstanceMapping(SVGElement*); 111 void removeInstanceMapping(SVGElement*);
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 template<typename T> inline bool is##thisType(const PassRefPtrWillBeRawPtr<T >& node) { return is##thisType(node.get()); } \ 274 template<typename T> inline bool is##thisType(const PassRefPtrWillBeRawPtr<T >& node) { return is##thisType(node.get()); } \
279 template<typename T> inline bool is##thisType(const RefPtrWillBeMember<T>& n ode) { return is##thisType(node.get()); } \ 275 template<typename T> inline bool is##thisType(const RefPtrWillBeMember<T>& n ode) { return is##thisType(node.get()); } \
280 template <> inline bool isElementOfType<const thisType>(const SVGElement& el ement) { return is##thisType(element); } \ 276 template <> inline bool isElementOfType<const thisType>(const SVGElement& el ement) { return is##thisType(element); } \
281 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) 277 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType)
282 278
283 } // namespace blink 279 } // namespace blink
284 280
285 #include "core/SVGElementTypeHelpers.h" 281 #include "core/SVGElementTypeHelpers.h"
286 282
287 #endif // SVGElement_h 283 #endif // SVGElement_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/svg/SVGElement.cpp » ('j') | Source/core/svg/SVGStyleElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698