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

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

Issue 2547053003: s/ passed(...) / WTF::passed(...) / to avoid future ambiguity w/ base::Passed. (Closed)
Patch Set: Rebasing... 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef LengthUnitsChecker_h 5 #ifndef LengthUnitsChecker_h
6 #define LengthUnitsChecker_h 6 #define LengthUnitsChecker_h
7 7
8 #include "core/animation/InterpolationType.h" 8 #include "core/animation/InterpolationType.h"
9 #include "core/css/CSSPrimitiveValue.h" 9 #include "core/css/CSSPrimitiveValue.h"
10 #include "core/css/resolver/StyleResolverState.h" 10 #include "core/css/resolver/StyleResolverState.h"
(...skipping 12 matching lines...) Expand all
23 for (size_t i = 0; i < lengthArray.values.size(); i++) { 23 for (size_t i = 0; i < lengthArray.values.size(); i++) {
24 if (i == CSSPrimitiveValue::UnitTypePercentage || 24 if (i == CSSPrimitiveValue::UnitTypePercentage ||
25 !lengthArray.typeFlags.get(i)) 25 !lengthArray.typeFlags.get(i))
26 continue; 26 continue;
27 lengthArray.values[i] = lengthUnit(i, state.cssToLengthConversionData()); 27 lengthArray.values[i] = lengthUnit(i, state.cssToLengthConversionData());
28 create = true; 28 create = true;
29 lastIndex = i; 29 lastIndex = i;
30 } 30 }
31 if (!create) 31 if (!create)
32 return nullptr; 32 return nullptr;
33 return wrapUnique( 33 return WTF::wrapUnique(
34 new LengthUnitsChecker(std::move(lengthArray), lastIndex)); 34 new LengthUnitsChecker(std::move(lengthArray), lastIndex));
35 } 35 }
36 36
37 bool isValid(const InterpolationEnvironment& environment, 37 bool isValid(const InterpolationEnvironment& environment,
38 const InterpolationValue& underlying) const final { 38 const InterpolationValue& underlying) const final {
39 for (size_t i = 0; i <= m_lastIndex; i++) { 39 for (size_t i = 0; i <= m_lastIndex; i++) {
40 if (i == CSSPrimitiveValue::UnitTypePercentage || 40 if (i == CSSPrimitiveValue::UnitTypePercentage ||
41 !m_lengthArray.typeFlags.get(i)) 41 !m_lengthArray.typeFlags.get(i))
42 continue; 42 continue;
43 if (m_lengthArray.values[i] != 43 if (m_lengthArray.values[i] !=
(...skipping 15 matching lines...) Expand all
59 size_t lastIndex) 59 size_t lastIndex)
60 : m_lengthArray(std::move(lengthArray)), m_lastIndex(lastIndex) {} 60 : m_lengthArray(std::move(lengthArray)), m_lastIndex(lastIndex) {}
61 61
62 const CSSLengthArray m_lengthArray; 62 const CSSLengthArray m_lengthArray;
63 const size_t m_lastIndex; 63 const size_t m_lastIndex;
64 }; 64 };
65 65
66 } // namespace blink 66 } // namespace blink
67 67
68 #endif // LengthUnitsChecker_h 68 #endif // LengthUnitsChecker_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698