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

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

Issue 1545713003: Add StylePath and use it to store 'd' in ComputedStyle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2015->2016; Remove unnecessary explicit. Created 4 years, 11 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 return AnimatableColor::create(color, visitedLinkColor); 240 return AnimatableColor::create(color, visitedLinkColor);
241 } 241 }
242 242
243 inline static PassRefPtr<AnimatableValue> createFromShapeValue(ShapeValue* value ) 243 inline static PassRefPtr<AnimatableValue> createFromShapeValue(ShapeValue* value )
244 { 244 {
245 if (value) 245 if (value)
246 return AnimatableShapeValue::create(value); 246 return AnimatableShapeValue::create(value);
247 return AnimatableUnknown::create(CSSValueNone); 247 return AnimatableUnknown::create(CSSValueNone);
248 } 248 }
249 249
250 static PassRefPtr<AnimatableValue> createFromPath(CSSPathValue* pathValue) 250 static PassRefPtr<AnimatableValue> createFromPath(StylePath* path)
251 { 251 {
252 return AnimatablePath::create(pathValue); 252 return AnimatablePath::create(path);
253 } 253 }
254 254
255 static double fontStretchToDouble(FontStretch fontStretch) 255 static double fontStretchToDouble(FontStretch fontStretch)
256 { 256 {
257 return static_cast<unsigned>(fontStretch); 257 return static_cast<unsigned>(fontStretch);
258 } 258 }
259 259
260 static PassRefPtr<AnimatableValue> createFromFontStretch(FontStretch fontStretch ) 260 static PassRefPtr<AnimatableValue> createFromFontStretch(FontStretch fontStretch )
261 { 261 {
262 return createFromDouble(fontStretchToDouble(fontStretch)); 262 return createFromDouble(fontStretchToDouble(fontStretch));
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 if (style.hasAutoZIndex()) 598 if (style.hasAutoZIndex())
599 return AnimatableUnknown::create(CSSValueAuto); 599 return AnimatableUnknown::create(CSSValueAuto);
600 return createFromDouble(style.zIndex()); 600 return createFromDouble(style.zIndex());
601 default: 601 default:
602 ASSERT_NOT_REACHED(); 602 ASSERT_NOT_REACHED();
603 return nullptr; 603 return nullptr;
604 } 604 }
605 } 605 }
606 606
607 } // namespace blink 607 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/animation/animatable/AnimatablePath.cpp ('k') | third_party/WebKit/Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698