WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
220971
REGRESSION (
r243266
): SVGStopElement does not react upon 'offset' attribute changes
https://bugs.webkit.org/show_bug.cgi?id=220971
Summary
REGRESSION (r243266): SVGStopElement does not react upon 'offset' attribute c...
Nikolas Zimmermann
Reported
2021-01-26 05:03:57 PST
REGRESSION (
r243266
): SVGStopElement does not react upon 'offset' attribute changes
Attachments
Patch
(80.61 KB, patch)
2021-01-26 05:04 PST
,
Nikolas Zimmermann
no flags
Details
Formatted Diff
Diff
Patch, v2
(80.53 KB, patch)
2021-01-27 01:14 PST
,
Nikolas Zimmermann
sabouhallawa
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Nikolas Zimmermann
Comment 1
2021-01-26 05:04:37 PST
Created
attachment 418398
[details]
Patch
Nikolas Zimmermann
Comment 2
2021-01-26 05:07:09 PST
Comment on
attachment 418398
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=418398&action=review
I wanted to convert these to use text-based-repaint.js from fast/repaint/resources, however this is flaky for SVG in general, unrelible results and a topic on its own. SVG layout tests are in bad shape :-(
> LayoutTests/svg/custom/deep-dynamic-updates.svg:3 > +<svg width="450" height="450" xmlns="
http://www.w3.org/2000/svg
" xmlns:xlink="
http://www.w3.org/1999/xlink
" onload="setTimeout(runTest, 0)">
This delay setTimeout(runTest, 0) is crucial. Otherwise we change the stop offset before the first rendering, and thus don't test the "dynamic updates" of offsetAttr code path at all...
Said Abou-Hallawa
Comment 3
2021-01-26 07:42:45 PST
Comment on
attachment 418398
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=418398&action=review
> LayoutTests/svg/custom/deep-dynamic-updates-expected.svg:3 > +<svg width="450" height="450" xmlns="
http://www.w3.org/2000/svg
" xmlns:xlink="
http://www.w3.org/1999/xlink
">
xlink namespace was removed in SVG2. The plan is keep it in old tests but not to use it in new tests.
> LayoutTests/svg/custom/deep-dynamic-updates-expected.svg:19 > +<use x="25" y="25" width="400" height="400" xlink:href="#symbol"/>
XLink URL reference attribute was deprecated in SVG2.
>> LayoutTests/svg/custom/deep-dynamic-updates.svg:3 >> +<svg width="450" height="450" xmlns="
http://www.w3.org/2000/svg
" xmlns:xlink="
http://www.w3.org/1999/xlink
" onload="setTimeout(runTest, 0)"> > > This delay setTimeout(runTest, 0) is crucial. Otherwise we change the stop offset before the first rendering, and thus don't test the "dynamic updates" of offsetAttr code path at all...
Alternatively, requestAnimationFrame() could be used to call runTest(). I think it is even more reliable than setTimeout(). requestAnimationFrame(() => { document.getElementById("stop1").offset.baseVal = 0.3; if (window.testRunnner) window.testRunner.notifyDone(); });
> LayoutTests/svg/custom/deep-dynamic-updates.svg:19 > <script>
Please make the <script> tag be the last element in the SVG document.
Nikolas Zimmermann
Comment 4
2021-01-27 00:24:45 PST
(In reply to Said Abou-Hallawa from
comment #3
)
> > +<svg width="450" height="450" xmlns="
http://www.w3.org/2000/svg
" xmlns:xlink="
http://www.w3.org/1999/xlink
"> > xlink namespace was removed in SVG2. The plan is keep it in old tests but > not to use it in new tests.
Indeed, good point, let's get rid of it.
> > +<use x="25" y="25" width="400" height="400" xlink:href="#symbol"/> > XLink URL reference attribute was deprecated in SVG2.
Switched to href only.
> > >> LayoutTests/svg/custom/deep-dynamic-updates.svg:3 > >> +<svg width="450" height="450" xmlns="
http://www.w3.org/2000/svg
" xmlns:xlink="
http://www.w3.org/1999/xlink
" onload="setTimeout(runTest, 0)"> > > > > This delay setTimeout(runTest, 0) is crucial. Otherwise we change the stop offset before the first rendering, and thus don't test the "dynamic updates" of offsetAttr code path at all... > > Alternatively, requestAnimationFrame() could be used to call runTest(). I > think it is even more reliable than setTimeout().
Good suggestion, will use rAF() instead -- hopefully fixes the flakiness seen on EWS.
> > <script> > Please make the <script> tag be the last element in the SVG document.
Ok. Will upload a new version, want to see green bots first, before landing.
Nikolas Zimmermann
Comment 5
2021-01-27 01:14:03 PST
Created
attachment 418514
[details]
Patch, v2
Said Abou-Hallawa
Comment 6
2021-01-27 11:53:27 PST
Comment on
attachment 418514
[details]
Patch, v2 View in context:
https://bugs.webkit.org/attachment.cgi?id=418514&action=review
> LayoutTests/svg/custom/deep-dynamic-updates.svg:28 > + requestAnimationFrame(() => testRunner.notifyDone());
I think this rAF is not needed. WTR and DRT both make sure the page is updated before getting the result image. But I think it is okay to keep it.
Nikolas Zimmermann
Comment 7
2021-01-27 12:51:08 PST
(In reply to Said Abou-Hallawa from
comment #6
)
> Comment on
attachment 418514
[details]
> Patch, v2 > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=418514&action=review
> > > LayoutTests/svg/custom/deep-dynamic-updates.svg:28 > > + requestAnimationFrame(() => testRunner.notifyDone()); > > I think this rAF is not needed. WTR and DRT both make sure the page is > updated before getting the result image. But I think it is okay to keep it.
I removed it before landing.
Nikolas Zimmermann
Comment 8
2021-01-27 12:51:15 PST
Committed
r271975
: <
https://trac.webkit.org/changeset/r271975
>
Radar WebKit Bug Importer
Comment 9
2021-01-27 12:52:14 PST
<
rdar://problem/73675372
>
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