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

Unified Diff: Source/core/css/resolver/AnimatedStyleBuilder.cpp

Issue 23548021: Web Animations CSS: Add unsigned short to support outline-width (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/css/resolver/AnimatedStyleBuilder.cpp
diff --git a/Source/core/css/resolver/AnimatedStyleBuilder.cpp b/Source/core/css/resolver/AnimatedStyleBuilder.cpp
index 952411509e944294238c55022df72ce27ee3a7db..b449e716689f440c7e0111e47c57fab65899432d 100644
--- a/Source/core/css/resolver/AnimatedStyleBuilder.cpp
+++ b/Source/core/css/resolver/AnimatedStyleBuilder.cpp
@@ -64,6 +64,11 @@ unsigned animatableValueToUnsigned(const AnimatableValue* value)
return clampTo<unsigned>(round(toAnimatableNumber(value)->toDouble()));
}
+unsigned short animatableValueToUnsignedShort(const AnimatableValue* value)
+{
+ return clampTo<unsigned short>(round(toAnimatableNumber(value)->toDouble()));
+}
+
LengthBox animatableValueToLengthBox(const AnimatableValue* value, const StyleResolverState& state)
{
const AnimatableLengthBox* animatableLengthBox = toAnimatableLengthBox(value);
@@ -179,6 +184,9 @@ void AnimatedStyleBuilder::applyProperty(CSSPropertyID property, StyleResolverSt
style->setOutlineColor(toAnimatableColor(value)->color());
style->setVisitedLinkOutlineColor(toAnimatableColor(value)->visitedLinkColor());
return;
+ case CSSPropertyOutlineWidth:
+ style->setOutlineWidth(animatableValueToUnsignedShort(value));
+ return;
case CSSPropertyPaddingBottom:
style->setPaddingBottom(animatableValueToLength(value, state));
return;

Powered by Google App Engine
This is Rietveld 408576698