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

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

Issue 2384263003: Reflow comments in core/animation and subdirs (Closed)
Patch Set: Created 4 years, 2 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 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 const StyleColor initialColor = 186 const StyleColor initialColor =
187 ColorPropertyFunctions::getInitialColor(cssProperty()); 187 ColorPropertyFunctions::getInitialColor(cssProperty());
188 return convertStyleColorPair(initialColor, initialColor); 188 return convertStyleColorPair(initialColor, initialColor);
189 } 189 }
190 190
191 InterpolationValue CSSColorInterpolationType::maybeConvertInherit( 191 InterpolationValue CSSColorInterpolationType::maybeConvertInherit(
192 const StyleResolverState& state, 192 const StyleResolverState& state,
193 ConversionCheckers& conversionCheckers) const { 193 ConversionCheckers& conversionCheckers) const {
194 if (!state.parentStyle()) 194 if (!state.parentStyle())
195 return nullptr; 195 return nullptr;
196 // Visited color can never explicitly inherit from parent visited color so onl y use the unvisited color. 196 // Visited color can never explicitly inherit from parent visited color so
197 // only use the unvisited color.
197 const StyleColor inheritedColor = ColorPropertyFunctions::getUnvisitedColor( 198 const StyleColor inheritedColor = ColorPropertyFunctions::getUnvisitedColor(
198 cssProperty(), *state.parentStyle()); 199 cssProperty(), *state.parentStyle());
199 conversionCheckers.append( 200 conversionCheckers.append(
200 ParentColorChecker::create(cssProperty(), inheritedColor)); 201 ParentColorChecker::create(cssProperty(), inheritedColor));
201 return convertStyleColorPair(inheritedColor, inheritedColor); 202 return convertStyleColorPair(inheritedColor, inheritedColor);
202 } 203 }
203 204
204 enum InterpolableColorPairIndex : unsigned { 205 enum InterpolableColorPairIndex : unsigned {
205 Unvisited, 206 Unvisited,
206 Visited, 207 Visited,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 *colorPair.get(Unvisited), environment.state(), false, 258 *colorPair.get(Unvisited), environment.state(), false,
258 cssProperty() == CSSPropertyTextDecorationColor)); 259 cssProperty() == CSSPropertyTextDecorationColor));
259 ColorPropertyFunctions::setVisitedColor( 260 ColorPropertyFunctions::setVisitedColor(
260 cssProperty(), *environment.state().style(), 261 cssProperty(), *environment.state().style(),
261 resolveInterpolableColor( 262 resolveInterpolableColor(
262 *colorPair.get(Visited), environment.state(), true, 263 *colorPair.get(Visited), environment.state(), true,
263 cssProperty() == CSSPropertyTextDecorationColor)); 264 cssProperty() == CSSPropertyTextDecorationColor));
264 } 265 }
265 266
266 } // namespace blink 267 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698