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

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

Issue 2578043002: Rename apply() in CSSInterpolationType subclasses (Closed)
Patch Set: rebased 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 #include "core/animation/CSSFilterListInterpolationType.h" 5 #include "core/animation/CSSFilterListInterpolationType.h"
6 6
7 #include "core/animation/FilterInterpolationFunctions.h" 7 #include "core/animation/FilterInterpolationFunctions.h"
8 #include "core/animation/FilterListPropertyFunctions.h" 8 #include "core/animation/FilterListPropertyFunctions.h"
9 #include "core/animation/ListInterpolationFunctions.h" 9 #include "core/animation/ListInterpolationFunctions.h"
10 #include "core/css/CSSIdentifierValue.h" 10 #include "core/css/CSSIdentifierValue.h"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 else 265 else
266 extendedInterpolableList->set(i, interpolableList.get(i)->clone()); 266 extendedInterpolableList->set(i, interpolableList.get(i)->clone());
267 } 267 }
268 underlyingValueOwner.mutableValue().interpolableValue = 268 underlyingValueOwner.mutableValue().interpolableValue =
269 std::move(extendedInterpolableList); 269 std::move(extendedInterpolableList);
270 // const_cast to take a ref. 270 // const_cast to take a ref.
271 underlyingValueOwner.mutableValue().nonInterpolableValue = 271 underlyingValueOwner.mutableValue().nonInterpolableValue =
272 const_cast<NonInterpolableValue*>(value.nonInterpolableValue.get()); 272 const_cast<NonInterpolableValue*>(value.nonInterpolableValue.get());
273 } 273 }
274 274
275 void CSSFilterListInterpolationType::apply( 275 void CSSFilterListInterpolationType::applyStandardPropertyValue(
276 const InterpolableValue& interpolableValue, 276 const InterpolableValue& interpolableValue,
277 const NonInterpolableValue* nonInterpolableValue, 277 const NonInterpolableValue* nonInterpolableValue,
278 InterpolationEnvironment& environment) const { 278 StyleResolverState& state) const {
279 const InterpolableList& interpolableList = 279 const InterpolableList& interpolableList =
280 toInterpolableList(interpolableValue); 280 toInterpolableList(interpolableValue);
281 const NonInterpolableList& nonInterpolableList = 281 const NonInterpolableList& nonInterpolableList =
282 toNonInterpolableList(*nonInterpolableValue); 282 toNonInterpolableList(*nonInterpolableValue);
283 size_t length = interpolableList.length(); 283 size_t length = interpolableList.length();
284 DCHECK_EQ(length, nonInterpolableList.length()); 284 DCHECK_EQ(length, nonInterpolableList.length());
285 285
286 FilterOperations filterOperations; 286 FilterOperations filterOperations;
287 filterOperations.operations().reserveCapacity(length); 287 filterOperations.operations().reserveCapacity(length);
288 for (size_t i = 0; i < length; i++) 288 for (size_t i = 0; i < length; i++) {
289 filterOperations.operations().push_back( 289 filterOperations.operations().push_back(
290 FilterInterpolationFunctions::createFilter(*interpolableList.get(i), 290 FilterInterpolationFunctions::createFilter(
291 *nonInterpolableList.get(i), 291 *interpolableList.get(i), *nonInterpolableList.get(i), state));
292 environment.state())); 292 }
293 FilterListPropertyFunctions::setFilterList( 293 FilterListPropertyFunctions::setFilterList(cssProperty(), *state.style(),
294 cssProperty(), *environment.state().style(), std::move(filterOperations)); 294 std::move(filterOperations));
295 } 295 }
296 296
297 } // namespace blink 297 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698