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

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

Issue 1991513003: Lock animated property type of result animation during processing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lock-animated-property-in
Patch Set: Update comment and mention bug. Created 4 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 | « third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp ('k') | no next file » | 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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 bool isContributing(SMILTime elapsed) const; 105 bool isContributing(SMILTime elapsed) const;
106 bool isFrozen() const; 106 bool isFrozen() const;
107 107
108 unsigned documentOrderIndex() const { return m_documentOrderIndex; } 108 unsigned documentOrderIndex() const { return m_documentOrderIndex; }
109 void setDocumentOrderIndex(unsigned index) { m_documentOrderIndex = index; } 109 void setDocumentOrderIndex(unsigned index) { m_documentOrderIndex = index; }
110 110
111 virtual void resetAnimatedType() = 0; 111 virtual void resetAnimatedType() = 0;
112 virtual void clearAnimatedType() = 0; 112 virtual void clearAnimatedType() = 0;
113 virtual void applyResultsToTarget() = 0; 113 virtual void applyResultsToTarget() = 0;
114 114
115 bool animatedTypeIsLocked() const { return m_animatedPropertyLocked; }
116 void lockAnimatedType() { DCHECK(!m_animatedPropertyLocked); m_animatedPrope rtyLocked = true; }
117 void unlockAnimatedType() { DCHECK(m_animatedPropertyLocked); m_animatedProp ertyLocked = false; }
118
115 void connectSyncBaseConditions(); 119 void connectSyncBaseConditions();
116 void connectEventBaseConditions(); 120 void connectEventBaseConditions();
117 121
118 void dispatchPendingEvent(SMILEventSender*); 122 void dispatchPendingEvent(SMILEventSender*);
119 void dispatchRepeatEvents(unsigned); 123 void dispatchRepeatEvents(unsigned);
120 124
121 virtual bool isSVGDiscardElement() const { return false; } 125 virtual bool isSVGDiscardElement() const { return false; }
122 126
123 DECLARE_VIRTUAL_TRACE(); 127 DECLARE_VIRTUAL_TRACE();
124 128
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 unsigned m_documentOrderIndex; 274 unsigned m_documentOrderIndex;
271 275
272 Vector<unsigned> m_repeatEventCountList; 276 Vector<unsigned> m_repeatEventCountList;
273 277
274 mutable SMILTime m_cachedDur; 278 mutable SMILTime m_cachedDur;
275 mutable SMILTime m_cachedRepeatDur; 279 mutable SMILTime m_cachedRepeatDur;
276 mutable SMILTime m_cachedRepeatCount; 280 mutable SMILTime m_cachedRepeatCount;
277 mutable SMILTime m_cachedMin; 281 mutable SMILTime m_cachedMin;
278 mutable SMILTime m_cachedMax; 282 mutable SMILTime m_cachedMax;
279 283
284 bool m_animatedPropertyLocked;
285
280 friend class ConditionEventListener; 286 friend class ConditionEventListener;
281 }; 287 };
282 288
283 inline bool isSVGSMILElement(const SVGElement& element) 289 inline bool isSVGSMILElement(const SVGElement& element)
284 { 290 {
285 return element.hasTagName(SVGNames::setTag) || element.hasTagName(SVGNames:: animateTag) || element.hasTagName(SVGNames::animateMotionTag) 291 return element.hasTagName(SVGNames::setTag) || element.hasTagName(SVGNames:: animateTag) || element.hasTagName(SVGNames::animateMotionTag)
286 || element.hasTagName(SVGNames::animateTransformTag) || element.hasTagNa me((SVGNames::discardTag)); 292 || element.hasTagName(SVGNames::animateTransformTag) || element.hasTagNa me((SVGNames::discardTag));
287 } 293 }
288 294
289 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGSMILElement); 295 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGSMILElement);
290 296
291 } // namespace blink 297 } // namespace blink
292 298
293 #endif // SVGSMILElement_h 299 #endif // SVGSMILElement_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698