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

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

Issue 2470233009: WTF/std normalization: replace WTF::Vector::first() with ::front() (Closed)
Patch Set: rebase Created 4 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
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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 if (nextFireTime.isFinite()) 470 if (nextFireTime.isFinite())
471 earliestFireTime = std::min(nextFireTime, earliestFireTime); 471 earliestFireTime = std::min(nextFireTime, earliestFireTime);
472 } 472 }
473 473
474 if (!sandwich.isEmpty()) { 474 if (!sandwich.isEmpty()) {
475 // Results are accumulated to the first animation that animates and 475 // Results are accumulated to the first animation that animates and
476 // contributes to a particular element/attribute pair. 476 // contributes to a particular element/attribute pair.
477 // Only reset the animated type to the base value once for 477 // Only reset the animated type to the base value once for
478 // the lowest priority animation that animates and 478 // the lowest priority animation that animates and
479 // contributes to a particular element/attribute pair. 479 // contributes to a particular element/attribute pair.
480 SVGSMILElement* resultElement = sandwich.first(); 480 SVGSMILElement* resultElement = sandwich.front();
481 resultElement->resetAnimatedType(); 481 resultElement->resetAnimatedType();
482 482
483 // Go through the sandwich from lowest prio to highest and generate 483 // Go through the sandwich from lowest prio to highest and generate
484 // the animated value (if any.) 484 // the animated value (if any.)
485 for (const auto& animation : sandwich) 485 for (const auto& animation : sandwich)
486 animation->updateAnimatedValue(resultElement); 486 animation->updateAnimatedValue(resultElement);
487 487
488 animationsToApply.append(resultElement); 488 animationsToApply.append(resultElement);
489 } 489 }
490 } 490 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 void SMILTimeContainer::advanceFrameForTesting() { 530 void SMILTimeContainer::advanceFrameForTesting() {
531 setElapsed(elapsed() + initialFrameDelay); 531 setElapsed(elapsed() + initialFrameDelay);
532 } 532 }
533 533
534 DEFINE_TRACE(SMILTimeContainer) { 534 DEFINE_TRACE(SMILTimeContainer) {
535 visitor->trace(m_scheduledAnimations); 535 visitor->trace(m_scheduledAnimations);
536 visitor->trace(m_ownerSVGElement); 536 visitor->trace(m_ownerSVGElement);
537 } 537 }
538 538
539 } // namespace blink 539 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698