[webkit-reviews] review granted: [Bug 181978] [Web Animations] Expose getKeyframes() and parsing of remaining keyframe properties : [Attachment 332034] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jan 23 10:24:00 PST 2018
Dean Jackson <dino at apple.com> has granted Antoine Quint <graouts at apple.com>'s
request for review:
Bug 181978: [Web Animations] Expose getKeyframes() and parsing of remaining
keyframe properties
https://bugs.webkit.org/show_bug.cgi?id=181978
Attachment 332034: Patch
https://bugs.webkit.org/attachment.cgi?id=332034&action=review
--- Comment #6 from Dean Jackson <dino at apple.com> ---
Comment on attachment 332034
--> https://bugs.webkit.org/attachment.cgi?id=332034
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=332034&action=review
> Source/WebCore/ChangeLog:10
> + parsig the remaining properties that can be exposed on keyframes:
"easing" and "composite". And since we parse
parsig
> Source/WebCore/animation/KeyframeEffect.cpp:82
> + for (size_t i = 0; i < keyframes.size(); ++i) {
Use for : loop
> Source/WebCore/platform/animation/TimingFunction.cpp:106
> +ExceptionOr<Ref<TimingFunction>> TimingFunction::createFromCSSText(const
String& cssText)
If this returned a RefPtr<TimingFunction> you wouldn't need the &foo.get() at
the calling sites.
> Source/WebCore/platform/animation/TimingFunction.cpp:172
> + if (function.x1() == 0.25 && function.y1() == 0.1 && function.x2()
== 0.25 && function.y2() == 1.0)
> + return "ease";
> + if (function.x1() == 0.42 && !function.y1() && function.x2() == 1.0
&& function.y2() == 1.0)
> + return "ease-in";
> + if (!function.x1() && !function.y1() && function.x2() == 0.58 &&
function.y2() == 1.0)
> + return "ease-out";
> + if (function.x1() == 0.42 && !function.y1() && function.x2() == 0.58
&& function.y2() == 1.0)
> + return "ease-in-out";
Are these accurate enough? (no rounding errors?)
> Source/WebCore/platform/animation/TimingFunction.cpp:180
> + if (m_type == TimingFunction::StepsFunction) {
> + auto& function = downcast<StepsTimingFunction>(*this);
> + if (!function.stepAtStart())
> + return String::format("steps(%d)", function.numberOfSteps());
> + }
We don't do step-start or step-end?
More information about the webkit-reviews
mailing list