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

Side by Side Diff: Source/core/svg/animation/SMILTimeContainer.cpp

Issue 103393002: Use DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION to generate toSVGSMILElement() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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 | « Source/core/svg/SVGAElement.cpp ('k') | Source/core/svg/animation/SVGSMILElement.h » ('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) 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 { 222 {
223 ASSERT(m_beginTime); 223 ASSERT(m_beginTime);
224 ASSERT(!m_pauseTime); 224 ASSERT(!m_pauseTime);
225 updateAnimations(elapsed()); 225 updateAnimations(elapsed());
226 } 226 }
227 227
228 void SMILTimeContainer::updateDocumentOrderIndexes() 228 void SMILTimeContainer::updateDocumentOrderIndexes()
229 { 229 {
230 unsigned timingElementCount = 0; 230 unsigned timingElementCount = 0;
231 for (Element* element = m_ownerSVGElement; element; element = ElementTravers al::next(*element, m_ownerSVGElement)) { 231 for (Element* element = m_ownerSVGElement; element; element = ElementTravers al::next(*element, m_ownerSVGElement)) {
232 if (SVGSMILElement::isSMILElement(element)) 232 if (isSVGSMILElement(*element))
233 toSVGSMILElement(element)->setDocumentOrderIndex(timingElementCount+ +); 233 toSVGSMILElement(element)->setDocumentOrderIndex(timingElementCount+ +);
234 } 234 }
235 m_documentOrderIndexesDirty = false; 235 m_documentOrderIndexesDirty = false;
236 } 236 }
237 237
238 struct PriorityCompare { 238 struct PriorityCompare {
239 PriorityCompare(SMILTime elapsed) : m_elapsed(elapsed) {} 239 PriorityCompare(SMILTime elapsed) : m_elapsed(elapsed) {}
240 bool operator()(SVGSMILElement* a, SVGSMILElement* b) 240 bool operator()(SVGSMILElement* a, SVGSMILElement* b)
241 { 241 {
242 // FIXME: This should also consider possible timing relations between th e elements. 242 // FIXME: This should also consider possible timing relations between th e elements.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 animationsToApply[i]->applyResultsToTarget(); 322 animationsToApply[i]->applyResultsToTarget();
323 323
324 #ifndef NDEBUG 324 #ifndef NDEBUG
325 m_preventScheduledAnimationsChanges = false; 325 m_preventScheduledAnimationsChanges = false;
326 #endif 326 #endif
327 327
328 startTimer(earliestFireTime, animationFrameDelay); 328 startTimer(earliestFireTime, animationFrameDelay);
329 } 329 }
330 330
331 } 331 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGAElement.cpp ('k') | Source/core/svg/animation/SVGSMILElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698