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

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

Issue 196573030: Web Animations API: Load resources referenced in element.animate() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed asserts. Created 6 years, 9 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 | Annotate | Revision Log
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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 inline static PassRefPtr<AnimatableValue> createFromLengthSize(const LengthSize& lengthSize, const RenderStyle& style) 149 inline static PassRefPtr<AnimatableValue> createFromLengthSize(const LengthSize& lengthSize, const RenderStyle& style)
150 { 150 {
151 return AnimatableLengthSize::create( 151 return AnimatableLengthSize::create(
152 createFromLength(lengthSize.width(), style), 152 createFromLength(lengthSize.width(), style),
153 createFromLength(lengthSize.height(), style)); 153 createFromLength(lengthSize.height(), style));
154 } 154 }
155 155
156 inline static PassRefPtr<AnimatableValue> createFromStyleImage(StyleImage* image ) 156 inline static PassRefPtr<AnimatableValue> createFromStyleImage(StyleImage* image )
157 { 157 {
158 if (image) 158 if (image)
159 return AnimatableImage::create(image); 159 return AnimatableImage::create(image->cssValue());
160 return AnimatableUnknown::create(CSSValueNone); 160 return AnimatableUnknown::create(CSSValueNone);
161 } 161 }
162 162
163 inline static PassRefPtr<AnimatableValue> createFromFillSize(const FillSize& fil lSize, const RenderStyle& style) 163 inline static PassRefPtr<AnimatableValue> createFromFillSize(const FillSize& fil lSize, const RenderStyle& style)
164 { 164 {
165 switch (fillSize.type) { 165 switch (fillSize.type) {
166 case SizeLength: 166 case SizeLength:
167 return createFromLengthSize(fillSize.size, style); 167 return createFromLengthSize(fillSize.size, style);
168 case Contain: 168 case Contain:
169 case Cover: 169 case Cover:
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 case CSSPropertyZoom: 494 case CSSPropertyZoom:
495 return createFromDouble(style.zoom()); 495 return createFromDouble(style.zoom());
496 default: 496 default:
497 ASSERT_NOT_REACHED(); 497 ASSERT_NOT_REACHED();
498 // This return value is to avoid a release crash if possible. 498 // This return value is to avoid a release crash if possible.
499 return AnimatableUnknown::create(nullptr); 499 return AnimatableUnknown::create(nullptr);
500 } 500 }
501 } 501 }
502 502
503 } // namespace WebCore 503 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698