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

Side by Side Diff: Source/core/css/resolver/AnimatedStyleBuilder.cpp

Issue 26340006: Web Animations: Support animation of flood-opacity (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Rebase Created 7 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
« no previous file with comments | « Source/core/animation/css/CSSAnimatableValueFactory.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 return; 247 return;
248 case CSSPropertyFlexGrow: 248 case CSSPropertyFlexGrow:
249 style->setFlexGrow(clampTo<float>(toAnimatableDouble(value)->toDouble(), 0)); 249 style->setFlexGrow(clampTo<float>(toAnimatableDouble(value)->toDouble(), 0));
250 return; 250 return;
251 case CSSPropertyFlexShrink: 251 case CSSPropertyFlexShrink:
252 style->setFlexShrink(clampTo<float>(toAnimatableDouble(value)->toDouble( ), 0)); 252 style->setFlexShrink(clampTo<float>(toAnimatableDouble(value)->toDouble( ), 0));
253 return; 253 return;
254 case CSSPropertyFlexBasis: 254 case CSSPropertyFlexBasis:
255 style->setFlexBasis(animatableValueToLength(value, state, NonNegativeVal ues)); 255 style->setFlexBasis(animatableValueToLength(value, state, NonNegativeVal ues));
256 return; 256 return;
257 case CSSPropertyFloodColor:
258 style->setFloodColor(toAnimatableColor(value)->color());
259 return;
260 case CSSPropertyFloodOpacity:
261 style->setFloodOpacity(clampTo<float>(toAnimatableDouble(value)->toDoubl e(), 0, 1));
262 return;
257 case CSSPropertyFontSize: 263 case CSSPropertyFontSize:
258 style->setFontSize(clampTo<float>(toAnimatableDouble(value)->toDouble(), 0)); 264 style->setFontSize(clampTo<float>(toAnimatableDouble(value)->toDouble(), 0));
259 return; 265 return;
260 case CSSPropertyFloodColor:
261 style->setFloodColor(toAnimatableColor(value)->color());
262 return;
263 case CSSPropertyHeight: 266 case CSSPropertyHeight:
264 style->setHeight(animatableValueToLength(value, state, NonNegativeValues )); 267 style->setHeight(animatableValueToLength(value, state, NonNegativeValues ));
265 return; 268 return;
266 case CSSPropertyKerning: 269 case CSSPropertyKerning:
267 style->setKerning(toAnimatableSVGLength(value)->toSVGLength()); 270 style->setKerning(toAnimatableSVGLength(value)->toSVGLength());
268 return; 271 return;
269 case CSSPropertyLeft: 272 case CSSPropertyLeft:
270 style->setLeft(animatableValueToLength(value, state)); 273 style->setLeft(animatableValueToLength(value, state));
271 return; 274 return;
272 case CSSPropertyLightingColor: 275 case CSSPropertyLightingColor:
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 case CSSPropertyZoom: 454 case CSSPropertyZoom:
452 style->setZoom(clampTo<float>(toAnimatableDouble(value)->toDouble(), std ::numeric_limits<float>::denorm_min())); 455 style->setZoom(clampTo<float>(toAnimatableDouble(value)->toDouble(), std ::numeric_limits<float>::denorm_min()));
453 return; 456 return;
454 default: 457 default:
455 RELEASE_ASSERT_WITH_MESSAGE(!CSSAnimations::isAnimatableProperty(propert y), "Web Animations not yet implemented: Unable to apply AnimatableValue to Rend erStyle: %s", getPropertyNameString(property).utf8().data()); 458 RELEASE_ASSERT_WITH_MESSAGE(!CSSAnimations::isAnimatableProperty(propert y), "Web Animations not yet implemented: Unable to apply AnimatableValue to Rend erStyle: %s", getPropertyNameString(property).utf8().data());
456 ASSERT_NOT_REACHED(); 459 ASSERT_NOT_REACHED();
457 } 460 }
458 } 461 }
459 462
460 } // namespace WebCore 463 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/animation/css/CSSAnimatableValueFactory.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698