| Summary: | Removing an item from rect (SVGTransformList) prevents attribute removal | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> | ||||
| Component: | SVG | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | NEW --- | ||||||
| Severity: | Normal | CC: | ashvayka, cdumez, karlcow, sabouhallawa, webkit-bug-importer, zimmermann | ||||
| Priority: | P2 | Keywords: | BrowserCompat, InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=232128 | ||||||
| Attachments: |
|
||||||
|
Description
Ahmad Saleem
2023-10-26 01:55:47 PDT
Created attachment 468670 [details] steps in devtools of safari and firefox These are the steps in both browsers for the script. var elem = document.createElementNS('http://www.w3.org/2000/svg', 'rect'); elem.setAttribute('transform', 'matrix(1,0,0,1,0,0)'); elem.transform.baseVal.removeItem(0); elem.removeAttribute('transform'); console.log(elem.hasAttribute('transform')); The interesting differences are starting once the following has been applied. "elem.transform.baseVal.removeItem(0)" Firefox: <rect transform=""></rect> Safari: <rect transform="matrix(1,0,0,1,0,0)"></rect> then applying "elem.removeAttribute('transform')" gives the same result Firefox: <rect></rect> Safari: <rect></rect> BUT doing "elem.hasAttribute('transform')" Firefox: false Safari: true which is not logical with the previous result. it seems like there is not a complete synchronization of the element state. Good catch Karl. Indeed this is the „lazy SVG attribute synchronization“ that apparently exposes this bug. We probably fail to unmap properly.. |