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

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

Issue 1627713002: Add more missing closing namespace comments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, address comment (also filed llvm.org/PR26290) Created 4 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "core/animation/LengthStyleInterpolation.h" 5 #include "core/animation/LengthStyleInterpolation.h"
6 6
7 #include "core/animation/LengthPropertyFunctions.h" 7 #include "core/animation/LengthPropertyFunctions.h"
8 #include "core/animation/css/CSSAnimatableValueFactory.h" 8 #include "core/animation/css/CSSAnimatableValueFactory.h"
9 #include "core/css/CSSCalculationValue.h" 9 #include "core/css/CSSCalculationValue.h"
10 #include "core/css/resolver/StyleBuilder.h" 10 #include "core/css/resolver/StyleBuilder.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 if (hasPixels && hasPercent) 113 if (hasPixels && hasPercent)
114 return Length(CalculationValue::create(pixelsAndPercent, range)); 114 return Length(CalculationValue::create(pixelsAndPercent, range));
115 if (hasPixels) 115 if (hasPixels)
116 return Length(CSSPrimitiveValue::clampToCSSLengthRange(clampToRange(pixe lsAndPercent.pixels, range)), Fixed); 116 return Length(CSSPrimitiveValue::clampToCSSLengthRange(clampToRange(pixe lsAndPercent.pixels, range)), Fixed);
117 if (hasPercent) 117 if (hasPercent)
118 return Length(clampToRange(pixelsAndPercent.percent, range), Percent); 118 return Length(clampToRange(pixelsAndPercent.percent, range), Percent);
119 ASSERT_NOT_REACHED(); 119 ASSERT_NOT_REACHED();
120 return Length(0, Fixed); 120 return Length(0, Fixed);
121 } 121 }
122 122
123 } 123 } // namespace
124 124
125 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> LengthStyleInterpolation::fromInterpol ableValue(const InterpolableValue& value, InterpolationRange range) 125 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> LengthStyleInterpolation::fromInterpol ableValue(const InterpolableValue& value, InterpolationRange range)
126 { 126 {
127 const InterpolableList* listOfValuesAndTypes = toInterpolableList(&value); 127 const InterpolableList* listOfValuesAndTypes = toInterpolableList(&value);
128 const InterpolableList* listOfValues = toInterpolableList(listOfValuesAndTyp es->get(0)); 128 const InterpolableList* listOfValues = toInterpolableList(listOfValuesAndTyp es->get(0));
129 const InterpolableList* listOfTypes = toInterpolableList(listOfValuesAndType s->get(1)); 129 const InterpolableList* listOfTypes = toInterpolableList(listOfValuesAndType s->get(1));
130 unsigned unitTypeCount = 0; 130 unsigned unitTypeCount = 0;
131 for (size_t i = 0; i < CSSPrimitiveValue::LengthUnitTypeCount; i++) { 131 for (size_t i = 0; i < CSSPrimitiveValue::LengthUnitTypeCount; i++) {
132 const InterpolableNumber* subType = toInterpolableNumber(listOfTypes->ge t(i)); 132 const InterpolableNumber* subType = toInterpolableNumber(listOfTypes->ge t(i));
133 if (subType->value()) { 133 if (subType->value()) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 } 172 }
173 } 173 }
174 StyleBuilder::applyProperty(property, state, fromInterpolableValue(value, ra nge).get()); 174 StyleBuilder::applyProperty(property, state, fromInterpolableValue(value, ra nge).get());
175 } 175 }
176 176
177 void LengthStyleInterpolation::apply(StyleResolverState& state) const 177 void LengthStyleInterpolation::apply(StyleResolverState& state) const
178 { 178 {
179 applyInterpolableValue(m_id, *m_cachedValue, m_range, state); 179 applyInterpolableValue(m_id, *m_cachedValue, m_range, state);
180 } 180 }
181 181
182 } 182 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698