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

Unified Diff: third_party/WebKit/Source/core/animation/SVGPathSegInterpolationFunctions.cpp

Issue 2487913002: Remove InterpolableBool and existing use of it in SVG path interpolation (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/core/animation/InterpolableValueTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/animation/SVGPathSegInterpolationFunctions.cpp
diff --git a/third_party/WebKit/Source/core/animation/SVGPathSegInterpolationFunctions.cpp b/third_party/WebKit/Source/core/animation/SVGPathSegInterpolationFunctions.cpp
index 96bb4c887b1f01a460bbe0e1a1ea36404dcb4cc4..67fc49a727c457b5e41695ff207d669df8882230 100644
--- a/third_party/WebKit/Source/core/animation/SVGPathSegInterpolationFunctions.cpp
+++ b/third_party/WebKit/Source/core/animation/SVGPathSegInterpolationFunctions.cpp
@@ -188,8 +188,9 @@ std::unique_ptr<InterpolableValue> consumeArc(const PathSegmentData& segment,
result->set(2, InterpolableNumber::create(segment.r1()));
result->set(3, InterpolableNumber::create(segment.r2()));
result->set(4, InterpolableNumber::create(segment.arcAngle()));
- result->set(5, InterpolableBool::create(segment.largeArcFlag()));
- result->set(6, InterpolableBool::create(segment.sweepFlag()));
+ // TODO(alancutter): Make these flags part of the NonInterpolableValue.
+ result->set(5, InterpolableNumber::create(segment.largeArcFlag()));
+ result->set(6, InterpolableNumber::create(segment.sweepFlag()));
return std::move(result);
}
@@ -207,8 +208,8 @@ PathSegmentData consumeInterpolableArc(const InterpolableValue& value,
segment.arcRadii().setX(toInterpolableNumber(list.get(2))->value());
segment.arcRadii().setY(toInterpolableNumber(list.get(3))->value());
segment.setArcAngle(toInterpolableNumber(list.get(4))->value());
- segment.arcLarge = toInterpolableBool(list.get(5))->value();
- segment.arcSweep = toInterpolableBool(list.get(6))->value();
+ segment.arcLarge = toInterpolableNumber(list.get(5))->value() >= 0.5;
+ segment.arcSweep = toInterpolableNumber(list.get(6))->value() >= 0.5;
return segment;
}
« no previous file with comments | « third_party/WebKit/Source/core/animation/InterpolableValueTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698