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

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

Issue 330933002: Revert of Removing "using" declarations that import names in the C++ Standard library. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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 | « Source/core/page/TouchDisambiguation.cpp ('k') | Source/core/svg/animation/SVGSMILElement.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) 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 15 matching lines...) Expand all
26 #include "config.h" 26 #include "config.h"
27 #include "core/svg/animation/SMILTimeContainer.h" 27 #include "core/svg/animation/SMILTimeContainer.h"
28 28
29 #include "core/animation/AnimationClock.h" 29 #include "core/animation/AnimationClock.h"
30 #include "core/animation/AnimationTimeline.h" 30 #include "core/animation/AnimationTimeline.h"
31 #include "core/dom/ElementTraversal.h" 31 #include "core/dom/ElementTraversal.h"
32 #include "core/frame/FrameView.h" 32 #include "core/frame/FrameView.h"
33 #include "core/svg/SVGSVGElement.h" 33 #include "core/svg/SVGSVGElement.h"
34 #include "core/svg/animation/SVGSMILElement.h" 34 #include "core/svg/animation/SVGSMILElement.h"
35 35
36 using namespace std;
37
36 namespace WebCore { 38 namespace WebCore {
37 39
38 static const double initialFrameDelay = 0.025; 40 static const double initialFrameDelay = 0.025;
39 41
40 #if !ENABLE(OILPAN) 42 #if !ENABLE(OILPAN)
41 // Every entry-point that calls updateAnimations() should instantiate a 43 // Every entry-point that calls updateAnimations() should instantiate a
42 // DiscardScope to prevent deletion of the ownerElement (and hence itself.) 44 // DiscardScope to prevent deletion of the ownerElement (and hence itself.)
43 class DiscardScope { 45 class DiscardScope {
44 public: 46 public:
45 explicit DiscardScope(SVGSVGElement& timeContainerOwner) : m_discardScopeEle ment(&timeContainerOwner) { } 47 explicit DiscardScope(SVGSVGElement& timeContainerOwner) : m_discardScopeEle ment(&timeContainerOwner) { }
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 continue; 416 continue;
415 resultElement = animation; 417 resultElement = animation;
416 } 418 }
417 419
418 // This will calculate the contribution from the animation and add i t to the resultsElement. 420 // This will calculate the contribution from the animation and add i t to the resultsElement.
419 if (!animation->progress(elapsed, resultElement, seekToTime) && resu ltElement == animation) 421 if (!animation->progress(elapsed, resultElement, seekToTime) && resu ltElement == animation)
420 resultElement = 0; 422 resultElement = 0;
421 423
422 SMILTime nextFireTime = animation->nextProgressTime(); 424 SMILTime nextFireTime = animation->nextProgressTime();
423 if (nextFireTime.isFinite()) 425 if (nextFireTime.isFinite())
424 earliestFireTime = std::min(nextFireTime, earliestFireTime); 426 earliestFireTime = min(nextFireTime, earliestFireTime);
425 } 427 }
426 428
427 if (resultElement) 429 if (resultElement)
428 animationsToApply.append(resultElement); 430 animationsToApply.append(resultElement);
429 } 431 }
430 m_scheduledAnimations.removeAll(invalidKeys); 432 m_scheduledAnimations.removeAll(invalidKeys);
431 433
432 std::sort(animationsToApply.begin(), animationsToApply.end(), PriorityCompar e(elapsed)); 434 std::sort(animationsToApply.begin(), animationsToApply.end(), PriorityCompar e(elapsed));
433 435
434 unsigned animationsToApplySize = animationsToApply.size(); 436 unsigned animationsToApplySize = animationsToApply.size();
(...skipping 29 matching lines...) Expand all
464 } 466 }
465 return earliestFireTime; 467 return earliestFireTime;
466 } 468 }
467 469
468 void SMILTimeContainer::trace(Visitor* visitor) 470 void SMILTimeContainer::trace(Visitor* visitor)
469 { 471 {
470 visitor->trace(m_scheduledAnimations); 472 visitor->trace(m_scheduledAnimations);
471 } 473 }
472 474
473 } 475 }
OLDNEW
« no previous file with comments | « Source/core/page/TouchDisambiguation.cpp ('k') | Source/core/svg/animation/SVGSMILElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698