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

Side by Side Diff: sky/engine/core/animation/css/CSSAnimatableValueFactory.cpp

Issue 667003003: Remove most of visited link support. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 values.append(createFromFillSize(fillLayer->size(), style)); 202 values.append(createFromFillSize(fillLayer->size(), style));
203 } else { 203 } else {
204 ASSERT_NOT_REACHED(); 204 ASSERT_NOT_REACHED();
205 } 205 }
206 } 206 }
207 return AnimatableRepeatable::create(values); 207 return AnimatableRepeatable::create(values);
208 } 208 }
209 209
210 PassRefPtrWillBeRawPtr<AnimatableValue> CSSAnimatableValueFactory::createFromCol or(CSSPropertyID property, const RenderStyle& style) 210 PassRefPtrWillBeRawPtr<AnimatableValue> CSSAnimatableValueFactory::createFromCol or(CSSPropertyID property, const RenderStyle& style)
211 { 211 {
212 Color color = style.colorIncludingFallback(property, false); 212 Color color = style.colorIncludingFallback(property);
213 Color visitedLinkColor = style.colorIncludingFallback(property, true); 213 return AnimatableColor::create(color);
214 return AnimatableColor::create(color, visitedLinkColor);
215 } 214 }
216 215
217 inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromShapeValue(Shape Value* value) 216 inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromShapeValue(Shape Value* value)
218 { 217 {
219 if (value) 218 if (value)
220 return AnimatableShapeValue::create(value); 219 return AnimatableShapeValue::create(value);
221 return AnimatableUnknown::create(CSSValueNone); 220 return AnimatableUnknown::create(CSSValueNone);
222 } 221 }
223 222
224 static double fontStretchToDouble(FontStretch fontStretch) 223 static double fontStretchToDouble(FontStretch fontStretch)
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 return createFromLength(style.paddingBottom(), style); 379 return createFromLength(style.paddingBottom(), style);
381 case CSSPropertyPaddingLeft: 380 case CSSPropertyPaddingLeft:
382 return createFromLength(style.paddingLeft(), style); 381 return createFromLength(style.paddingLeft(), style);
383 case CSSPropertyPaddingRight: 382 case CSSPropertyPaddingRight:
384 return createFromLength(style.paddingRight(), style); 383 return createFromLength(style.paddingRight(), style);
385 case CSSPropertyPaddingTop: 384 case CSSPropertyPaddingTop:
386 return createFromLength(style.paddingTop(), style); 385 return createFromLength(style.paddingTop(), style);
387 case CSSPropertyRight: 386 case CSSPropertyRight:
388 return createFromLength(style.right(), style); 387 return createFromLength(style.right(), style);
389 case CSSPropertyTextDecorationColor: 388 case CSSPropertyTextDecorationColor:
390 return AnimatableColor::create(style.textDecorationColor().resolve(style .color()), style.visitedLinkTextDecorationColor().resolve(style.visitedLinkColor ())); 389 return AnimatableColor::create(style.textDecorationColor().resolve(style .color()));
391 case CSSPropertyTextIndent: 390 case CSSPropertyTextIndent:
392 return createFromLength(style.textIndent(), style); 391 return createFromLength(style.textIndent(), style);
393 case CSSPropertyTextShadow: 392 case CSSPropertyTextShadow:
394 return AnimatableShadow::create(style.textShadow()); 393 return AnimatableShadow::create(style.textShadow());
395 case CSSPropertyTop: 394 case CSSPropertyTop:
396 return createFromLength(style.top(), style); 395 return createFromLength(style.top(), style);
397 case CSSPropertyWebkitBorderHorizontalSpacing: 396 case CSSPropertyWebkitBorderHorizontalSpacing:
398 return createFromDouble(style.horizontalBorderSpacing()); 397 return createFromDouble(style.horizontalBorderSpacing());
399 case CSSPropertyWebkitBorderVerticalSpacing: 398 case CSSPropertyWebkitBorderVerticalSpacing:
400 return createFromDouble(style.verticalBorderSpacing()); 399 return createFromDouble(style.verticalBorderSpacing());
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 case CSSPropertyZoom: 455 case CSSPropertyZoom:
457 return createFromDouble(style.zoom()); 456 return createFromDouble(style.zoom());
458 default: 457 default:
459 ASSERT_NOT_REACHED(); 458 ASSERT_NOT_REACHED();
460 // This return value is to avoid a release crash if possible. 459 // This return value is to avoid a release crash if possible.
461 return AnimatableUnknown::create(nullptr); 460 return AnimatableUnknown::create(nullptr);
462 } 461 }
463 } 462 }
464 463
465 } // namespace blink 464 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698