WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
Bug 201918
A dynamic change in a CSS property of an SVGElement does not get reflected in the instances of the SVGElement
https://bugs.webkit.org/show_bug.cgi?id=201918
Summary
A dynamic change in a CSS property of an SVGElement does not get reflected in...
Said Abou-Hallawa
Reported
2019-09-18 09:18:52 PDT
Created
attachment 379043
[details]
change-fill-property-dynamic Open the attached test case. Result: Two rectangles one green and the other is red. Expected: Two green rectangles. The test case has a <rect> element with the CSS property fill="red". There is also a <use> element which references the <rect> element. When the document is loaded, the value of CSS property "fill" of the <rect> element is changed to "green". The bug is, the. shadow tree of the <use> element which includes an instances of the <rect> element does not get updated. We need to call SVGUseElement::invalidateShadowTree() after changing the CSS property the same way we do in SVGElement::svgAttributeChanged(). This works: rect.setAttribute('fill', 'green'); But this does not work: rect.style['fill'] = 'green';
Attachments
change-fill-property-dynamic
(342 bytes, image/svg+xml)
2019-09-18 09:18 PDT
,
Said Abou-Hallawa
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Said Abou-Hallawa
Comment 1
2019-09-18 16:45:51 PDT
Failed WPT test:
https://wpt.fyi/results/svg/render/reftests/change-sync-for-nested-use.html?label=experimental&label=master&aligned
Ahmad Saleem
Comment 2
2022-08-12 08:58:16 PDT
I am able to reproduce this bug in Safari 15.6 and Safari Technical Preview 151 using attached test case and Safari show one green and one red rectangles while all other browsers (Chrome Canary 106 and Firefox Nightly 105) show two green boxes. Thanks!
Radar WebKit Bug Importer
Comment 3
2022-08-12 11:05:54 PDT
<
rdar://problem/98577657
>
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