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

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

Issue 2668903003: Replace WTF::emptyString{16Bit}() with a static global (Closed)
Patch Set: Replace WTF::emptyString{16Bit}() with a static global Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 (fastHasAttribute(SVGNames::keyPointsAttr) && 552 (fastHasAttribute(SVGNames::keyPointsAttr) &&
553 fastHasAttribute(SVGNames::keyTimesAttr) && 553 fastHasAttribute(SVGNames::keyTimesAttr) &&
554 (m_keyTimes.size() < 2 || m_keyTimes.size() != m_keyPoints.size()))) 554 (m_keyTimes.size() < 2 || m_keyTimes.size() != m_keyPoints.size())))
555 return; 555 return;
556 if (animationMode == FromToAnimation) { 556 if (animationMode == FromToAnimation) {
557 m_animationValid = calculateFromAndToValues(from, to); 557 m_animationValid = calculateFromAndToValues(from, to);
558 } else if (animationMode == ToAnimation) { 558 } else if (animationMode == ToAnimation) {
559 // For to-animations the from value is the current accumulated value from 559 // For to-animations the from value is the current accumulated value from
560 // lower priority animations. 560 // lower priority animations.
561 // The value is not static and is determined during the animation. 561 // The value is not static and is determined during the animation.
562 m_animationValid = calculateFromAndToValues(emptyString(), to); 562 m_animationValid = calculateFromAndToValues(emptyString, to);
563 } else if (animationMode == FromByAnimation) { 563 } else if (animationMode == FromByAnimation) {
564 m_animationValid = calculateFromAndByValues(from, by); 564 m_animationValid = calculateFromAndByValues(from, by);
565 } else if (animationMode == ByAnimation) { 565 } else if (animationMode == ByAnimation) {
566 m_animationValid = calculateFromAndByValues(emptyString(), by); 566 m_animationValid = calculateFromAndByValues(emptyString, by);
567 } else if (animationMode == ValuesAnimation) { 567 } else if (animationMode == ValuesAnimation) {
568 m_animationValid = 568 m_animationValid =
569 m_values.size() >= 1 && (calcMode == CalcModePaced || 569 m_values.size() >= 1 && (calcMode == CalcModePaced ||
570 !fastHasAttribute(SVGNames::keyTimesAttr) || 570 !fastHasAttribute(SVGNames::keyTimesAttr) ||
571 fastHasAttribute(SVGNames::keyPointsAttr) || 571 fastHasAttribute(SVGNames::keyPointsAttr) ||
572 (m_values.size() == m_keyTimes.size())) && 572 (m_values.size() == m_keyTimes.size())) &&
573 (calcMode == CalcModeDiscrete || !m_keyTimes.size() || 573 (calcMode == CalcModeDiscrete || !m_keyTimes.size() ||
574 m_keyTimes.back() == 1) && 574 m_keyTimes.back() == 1) &&
575 (calcMode != CalcModeSpline || 575 (calcMode != CalcModeSpline ||
576 ((m_keySplines.size() && 576 ((m_keySplines.size() &&
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 calculatePercentForSpline(percent, calculateKeyTimesIndex(percent)); 621 calculatePercentForSpline(percent, calculateKeyTimesIndex(percent));
622 else if (animationMode == FromToAnimation || animationMode == ToAnimation) 622 else if (animationMode == FromToAnimation || animationMode == ToAnimation)
623 effectivePercent = calculatePercentForFromTo(percent); 623 effectivePercent = calculatePercentForFromTo(percent);
624 else 624 else
625 effectivePercent = percent; 625 effectivePercent = percent;
626 626
627 calculateAnimatedValue(effectivePercent, repeatCount, resultElement); 627 calculateAnimatedValue(effectivePercent, repeatCount, resultElement);
628 } 628 }
629 629
630 } // namespace blink 630 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/QuotesData.cpp ('k') | third_party/WebKit/Source/core/svg/SVGEnumeration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698