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

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: 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
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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 return; 173 return;
174 case CSSPropertyFillOpacity: 174 case CSSPropertyFillOpacity:
175 style->setFillOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble (), 0, 1)); 175 style->setFillOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble (), 0, 1));
176 return; 176 return;
177 case CSSPropertyFill: 177 case CSSPropertyFill:
178 { 178 {
179 const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value); 179 const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value);
180 style->accessSVGStyle()->setFillPaint(svgPaint->paintType(), svgPain t->color(), svgPaint->uri()); 180 style->accessSVGStyle()->setFillPaint(svgPaint->paintType(), svgPain t->color(), svgPaint->uri());
181 } 181 }
182 return; 182 return;
183 case CSSPropertyFloodOpacity:
184 style->setFloodOpacity(clampTo<float>(toAnimatableDouble(value)->toDoubl e(), 0, 1));
185 return;
183 case CSSPropertyHeight: 186 case CSSPropertyHeight:
184 style->setHeight(animatableValueToLength(value, state)); 187 style->setHeight(animatableValueToLength(value, state));
185 return; 188 return;
186 case CSSPropertyKerning: 189 case CSSPropertyKerning:
187 style->setKerning(toAnimatableSVGLength(value)->toSVGLength()); 190 style->setKerning(toAnimatableSVGLength(value)->toSVGLength());
188 return; 191 return;
189 case CSSPropertyLeft: 192 case CSSPropertyLeft:
190 style->setLeft(animatableValueToLength(value, state)); 193 style->setLeft(animatableValueToLength(value, state));
191 return; 194 return;
192 case CSSPropertyListStyleImage: 195 case CSSPropertyListStyleImage:
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 case CSSPropertyZoom: 351 case CSSPropertyZoom:
349 style->setZoom(clampTo<float>(toAnimatableDouble(value)->toDouble())); 352 style->setZoom(clampTo<float>(toAnimatableDouble(value)->toDouble()));
350 return; 353 return;
351 default: 354 default:
352 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()); 355 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());
353 ASSERT_NOT_REACHED(); 356 ASSERT_NOT_REACHED();
354 } 357 }
355 } 358 }
356 359
357 } // namespace WebCore 360 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698