Closed
Bug 290967
Opened 20 years ago
Closed 18 years ago
removeAttribute doesn't effect the underlying DOM properties
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
DUPLICATE
of bug 320622
People
(Reporter: harald.albrecht, Unassigned)
References
Details
Attachments
(2 files, 1 obsolete file)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050415 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050415 Firefox/1.0+
When removing the transform attribute, for instance, of a rectangle element, the
element's corresponding transformation matrix should be reset to the identity
matrix. However, with the current implementation, the matrix remains unchanged
when the transform attribute is removed.
Reproducible: Always
Steps to Reproduce:
1. Load attached testcase
2. click on the black rectangle
Actual Results:
The black rectangle stays at its offset at (50,50).
Expected Results:
The black rectangle should have been moved to the origin at (0,0).
Reporter | ||
Comment 1•20 years ago
|
||
Reporter | ||
Updated•20 years ago
|
Attachment #181140 -
Attachment mime type: text/html → text/xml
![]() |
||
Comment 2•20 years ago
|
||
Eek! We aren't going to do much for any SVG attributes (unless they're
intrinsic event attributes). See UnsetAttr for nsSVGElement:
http://lxr.mozilla.org/seamonkey/source/content/svg/content/src/nsSVGElement.cpp#242
Here's another testcase that shows removeAttribute has no affect on the 'fill'
or 'transform' attributes.
Attachment #181140 -
Attachment is obsolete: true
![]() |
||
Comment 3•20 years ago
|
||
Harald, for now just use setAttribute("") as well as removeAttribute. I think
that should have the desired effect, at least most of the time.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Hardware: PC → All
![]() |
||
Comment 4•20 years ago
|
||
*** Bug 302762 has been marked as a duplicate of this bug. ***
![]() |
||
Comment 5•20 years ago
|
||
We should probably make UnsetAttr first call SetAttr and pass it an empty string
until we figure out something better.
Summary: removing the transform attribute does not reset transformations → removeAttribute doesn't effect the underlying DOM properties
Comment 6•20 years ago
|
||
unfortunatly the solution from comment #3 does not work in the case of bug#302702
![]() |
||
Comment 7•20 years ago
|
||
Yeah, and nsSVGViewBox isn't designed to be "unset". If you find any other
attributes that have the same problem, please note them here. Thanks Holger.
Comment 8•20 years ago
|
||
Comment 10•18 years ago
|
||
The attachment from comment #8:
https://bugzilla.mozilla.org/attachment.cgi?id=196132
seems to be working now in the latest nightly but the attachment:
https://bugzilla.mozilla.org/attachment.cgi?id=269416
from the duplicate bug 385499 shows that removeAttributeNS(null,"transform") doesn't work.
Sorry about the duplicate bug!
You need to log in
before you can comment on or make changes to this bug.
Description
•