| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/CSSColorInterpolationType.h" | 5 #include "core/animation/CSSColorInterpolationType.h" |
| 6 | 6 |
| 7 #include "core/animation/ColorPropertyFunctions.h" | 7 #include "core/animation/ColorPropertyFunctions.h" |
| 8 #include "core/css/CSSColorValue.h" | 8 #include "core/css/CSSColorValue.h" |
| 9 #include "core/css/CSSIdentifierValue.h" | 9 #include "core/css/CSSIdentifierValue.h" |
| 10 #include "core/css/resolver/StyleResolverState.h" | 10 #include "core/css/resolver/StyleResolverState.h" |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 resolveInterpolableColor( | 258 resolveInterpolableColor( |
| 259 *colorPair.get(Unvisited), state, false, | 259 *colorPair.get(Unvisited), state, false, |
| 260 cssProperty() == CSSPropertyTextDecorationColor)); | 260 cssProperty() == CSSPropertyTextDecorationColor)); |
| 261 ColorPropertyFunctions::setVisitedColor( | 261 ColorPropertyFunctions::setVisitedColor( |
| 262 cssProperty(), *state.style(), | 262 cssProperty(), *state.style(), |
| 263 resolveInterpolableColor( | 263 resolveInterpolableColor( |
| 264 *colorPair.get(Visited), state, true, | 264 *colorPair.get(Visited), state, true, |
| 265 cssProperty() == CSSPropertyTextDecorationColor)); | 265 cssProperty() == CSSPropertyTextDecorationColor)); |
| 266 } | 266 } |
| 267 | 267 |
| 268 const CSSValue* CSSColorInterpolationType::createCSSValue( |
| 269 const InterpolableValue& interpolableValue, |
| 270 const NonInterpolableValue*, |
| 271 const StyleResolverState& state) const { |
| 272 const InterpolableList& colorPair = toInterpolableList(interpolableValue); |
| 273 Color color = resolveInterpolableColor(*colorPair.get(Unvisited), state); |
| 274 return CSSColorValue::create(color.rgb()); |
| 275 } |
| 276 |
| 268 } // namespace blink | 277 } // namespace blink |
| OLD | NEW |