[Webkit-unassigned] [Bug 263712] Removing an item from rect (SVGTransformList) prevents attribute removal

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Nov 19 23:31:08 PST 2023


https://bugs.webkit.org/show_bug.cgi?id=263712

Karl Dubost <karlcow at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |karlcow at apple.com

--- Comment #2 from Karl Dubost <karlcow at apple.com> ---
Created attachment 468670

  --> https://bugs.webkit.org/attachment.cgi?id=468670&action=review

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20231120/ad6555d3/attachment.htm>


More information about the webkit-unassigned mailing list