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

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

Issue 2537373005: [css-ui] Make caret-color animatable (Closed)
Patch Set: Rebased patch 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 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 InterpolationValue CSSColorInterpolationType::maybeConvertNeutral( 177 InterpolationValue CSSColorInterpolationType::maybeConvertNeutral(
178 const InterpolationValue&, 178 const InterpolationValue&,
179 ConversionCheckers&) const { 179 ConversionCheckers&) const {
180 return convertStyleColorPair(StyleColor(Color::transparent), 180 return convertStyleColorPair(StyleColor(Color::transparent),
181 StyleColor(Color::transparent)); 181 StyleColor(Color::transparent));
182 } 182 }
183 183
184 InterpolationValue CSSColorInterpolationType::maybeConvertInitial( 184 InterpolationValue CSSColorInterpolationType::maybeConvertInitial(
185 const StyleResolverState&, 185 const StyleResolverState&,
186 ConversionCheckers& conversionCheckers) const { 186 ConversionCheckers& conversionCheckers) const {
187 if (cssProperty() == CSSPropertyCaretColor)
188 return nullptr;
alancutter (OOO until 2018) 2016/12/15 22:27:11 Make getInitialColor() return a bool instead of th
Manuel Rego 2016/12/19 12:28:31 Done.
187 const StyleColor initialColor = 189 const StyleColor initialColor =
188 ColorPropertyFunctions::getInitialColor(cssProperty()); 190 ColorPropertyFunctions::getInitialColor(cssProperty());
189 return convertStyleColorPair(initialColor, initialColor); 191 return convertStyleColorPair(initialColor, initialColor);
190 } 192 }
191 193
192 InterpolationValue CSSColorInterpolationType::maybeConvertInherit( 194 InterpolationValue CSSColorInterpolationType::maybeConvertInherit(
193 const StyleResolverState& state, 195 const StyleResolverState& state,
194 ConversionCheckers& conversionCheckers) const { 196 ConversionCheckers& conversionCheckers) const {
195 if (!state.parentStyle()) 197 if (!state.parentStyle())
196 return nullptr; 198 return nullptr;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 *colorPair.get(Unvisited), environment.state(), false, 261 *colorPair.get(Unvisited), environment.state(), false,
260 cssProperty() == CSSPropertyTextDecorationColor)); 262 cssProperty() == CSSPropertyTextDecorationColor));
261 ColorPropertyFunctions::setVisitedColor( 263 ColorPropertyFunctions::setVisitedColor(
262 cssProperty(), *environment.state().style(), 264 cssProperty(), *environment.state().style(),
263 resolveInterpolableColor( 265 resolveInterpolableColor(
264 *colorPair.get(Visited), environment.state(), true, 266 *colorPair.get(Visited), environment.state(), true,
265 cssProperty() == CSSPropertyTextDecorationColor)); 267 cssProperty() == CSSPropertyTextDecorationColor));
266 } 268 }
267 269
268 } // namespace blink 270 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698