Bug 193647 - Dynamic changes in the style attributes of an SVGElement do no affect the <use> instances
Summary: Dynamic changes in the style attributes of an SVGElement do no affect the <us...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2019-01-21 00:34 PST by kari.pihkala
Modified: 2019-01-22 16:13 PST (History)
7 users (show)

See Also:


Attachments
test case (980 bytes, image/svg+xml)
2019-01-21 00:34 PST, kari.pihkala
no flags Details
Patch (4.19 KB, patch)
2019-01-22 12:48 PST, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-highsierra (2.79 MB, application/zip)
2019-01-22 13:41 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews114 for mac-highsierra (2.07 MB, application/zip)
2019-01-22 14:28 PST, EWS Watchlist
no flags Details
Patch (4.27 KB, patch)
2019-01-22 14:47 PST, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description kari.pihkala 2019-01-21 00:34:29 PST
Created attachment 359675 [details]
test case

SVG symbols are not repainted correctly if an element inside them has its stroke or fill style changed by JavaScript setTimeout() or requestAnimationFrame().

See the attached test case, which shows a rectangle outside and inside a symbol. The rectangle inside the symbol doesn't show changes in the fill style.

However, changing the x or y property seem to force a repaint for the entire symbol. So, setting the "x" attribute of the rectangle makes also the fill style visible.

Tested on Safari 10, 12.0.2 (14606.3.4) and Safari Technology Preview Release 73 (Safari 12.1, WebKit 14607.1.18.3).

The test case works as expected on Firefox and Chrome.

Here's the same test case as a CodePen: https://codepen.io/anon/pen/ZwzebM?editors=1000
Comment 1 Radar WebKit Bug Importer 2019-01-22 08:32:27 PST
<rdar://problem/47446843>
Comment 2 Said Abou-Hallawa 2019-01-22 12:48:21 PST
Created attachment 359766 [details]
Patch
Comment 3 EWS Watchlist 2019-01-22 13:41:20 PST
Comment on attachment 359766 [details]
Patch

Attachment 359766 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/10843999

New failing tests:
svg/custom/svg-use-style-dynamic-change-invalidate.svg
Comment 4 EWS Watchlist 2019-01-22 13:41:21 PST
Created attachment 359770 [details]
Archive of layout-test-results from ews101 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 5 EWS Watchlist 2019-01-22 14:28:08 PST
Comment on attachment 359766 [details]
Patch

Attachment 359766 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/10844242

New failing tests:
svg/custom/svg-use-style-dynamic-change-invalidate.svg
Comment 6 EWS Watchlist 2019-01-22 14:28:09 PST
Created attachment 359773 [details]
Archive of layout-test-results from ews114 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 7 Said Abou-Hallawa 2019-01-22 14:47:20 PST
Created attachment 359778 [details]
Patch
Comment 8 WebKit Commit Bot 2019-01-22 16:13:48 PST
Comment on attachment 359778 [details]
Patch

Clearing flags on attachment: 359778

Committed r240305: <https://trac.webkit.org/changeset/240305>
Comment 9 WebKit Commit Bot 2019-01-22 16:13:49 PST
All reviewed patches have been landed.  Closing bug.