WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
109010
SVG paced value animations overwrite user-provided keyTimes
https://bugs.webkit.org/show_bug.cgi?id=109010
Summary
SVG paced value animations overwrite user-provided keyTimes
Philip Rogers
Reported
2013-02-05 23:38:23 PST
Created
attachment 186766
[details]
Repro Paced animations can synthesize keytimes in SVGAnimationElement::calculateKeyTimesForCalcModePaced() but this overwrites user-provided values. If an animation's calcMode is later changed to be something other than 'paced', m_keyTimes will contain synthesized values instead of the user-provided values.
Attachments
Repro
(1.14 KB, text/html)
2013-02-05 23:38 PST
,
Philip Rogers
no flags
Details
Patch
(18.24 KB, patch)
2021-04-12 18:24 PDT
,
Said Abou-Hallawa
rniwa
: review+
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(18.20 KB, patch)
2021-04-12 20:12 PDT
,
Said Abou-Hallawa
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Said Abou-Hallawa
Comment 1
2021-04-12 18:24:03 PDT
Created
attachment 425821
[details]
Patch
Ryosuke Niwa
Comment 2
2021-04-12 18:41:11 PDT
Comment on
attachment 425821
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=425821&action=review
> Source/WebCore/svg/SVGAnimationElement.cpp:385 > - if (m_keyTimes[index] > percent) > + if (keyTimes()[index] > percent)
Can we store a reference instead of keep calling this function?
> Source/WebCore/svg/SVGAnimationElement.cpp:414 > + float fromPercent = keyTimes()[index]; > + float toPercent = keyTimes()[index + 1];
Ditto.
> Source/WebCore/svg/SVGAnimationElement.cpp:432 > + if (calcMode() == CalcMode::Discrete && keyTimes().size() == 2)
Ditto.
> Source/WebCore/svg/SVGAnimationElement.cpp:489 > + fromPercent = keyTimes()[index]; > + toPercent = keyTimes()[index + 1];
Ditto.
> Source/WebCore/svg/SVGAnimationElement.cpp:537 > + && (hasAttributeWithoutSynchronization(SVGNames::keyPointsAttr) && hasAttributeWithoutSynchronization(SVGNames::keyTimesAttr) && (keyTimes().size() < 2 || keyTimes().size() != m_keyPoints.size())))
Ditto.
> Source/WebCore/svg/SVGAnimationElement.cpp:552 > + && (calcMode == CalcMode::Discrete || !keyTimes().size() || keyTimes().last() == 1)
Ditto.
> Source/WebCore/svg/SVGAnimationElement.cpp:554 > + && (!hasAttributeWithoutSynchronization(SVGNames::keyPointsAttr) || (keyTimes().size() > 1 && keyTimes().size() == m_keyPoints.size()));
Ditto.
> Source/WebCore/svg/SVGAnimationElement.cpp:560 > + m_animationValid = calcMode == CalcMode::Paced || !hasAttributeWithoutSynchronization(SVGNames::keyPointsAttr) || (keyTimes().size() > 1 && keyTimes().size() == m_keyPoints.size());
Ditto.
Ryosuke Niwa
Comment 3
2021-04-12 18:42:47 PDT
***
Bug 222715
has been marked as a duplicate of this bug. ***
Said Abou-Hallawa
Comment 4
2021-04-12 20:12:33 PDT
Created
attachment 425824
[details]
Patch
Said Abou-Hallawa
Comment 5
2021-04-13 00:34:07 PDT
Comment on
attachment 425821
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=425821&action=review
> Source/WebCore/svg/SVGAnimationElement.cpp:-352 > - Vector<float> keyTimesForPaced;
This is the reason of the assertions in some svg layout tests. Appending times directly into m_keyTimesForPaced allowed partial calculation. If one of the distances is zero this function will return with incomplete m_keyTimesForPaced. To fix these assertions we need to either set m_keyTimesForPaced to a complete list or an empty list.
> LayoutTests/svg/animations/animate-calcMode-paced-overwrite-key-times.html:10 > + setTimeout(function() {
This test was failing on the EWS because of this setTimeout(). We need to add waitUntilDone()/notifyDone() to properly synchronize the test.
EWS
Comment 6
2021-04-13 01:05:33 PDT
Committed
r275868
(
236433@main
): <
https://commits.webkit.org/236433@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 425824
[details]
.
Radar WebKit Bug Importer
Comment 7
2021-04-13 01:06:15 PDT
<
rdar://problem/76580027
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug