Closed Bug 398105 Opened 17 years ago Closed 17 years ago

Removing xlink:href attribute from <svg:a> does not update elements influenced by :link styles

Categories

(Core :: SVG, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: longsonr)

References

Details

(Keywords: testcase)

Attachments

(4 files, 1 obsolete file)

Testcase based on layout/reftests/svg/pseudo-classes-02.svg (from bug 268135).
Attached image testcase
Attached image reference
This is invalid, you can't use removeAttribute to remove a namespaced attribute. 

If you use removeAttributeNS it works for me.

onload="setTimeout(function() { document.getElementById('r').removeAttributeNS('http://www.w3.org/1999/xlink','href'); }, 0);"
The attribute does get removed in the testcase.  Look in DOM Inspector, then delete the root element and undo.
Attached image testcase with removeAttributeNS (obsolete) —
Attachment #283020 - Attachment is obsolete: true
Looks like removeAttributeNS doesn't work either despite my previous assertion to the contrary.
bug 113310 was the html version of this.
I tried converting the patch from bug 113310 to nsSVGAElement but this did not fix it so I don't really know why this doesn't work.
Attached patch patchSplinter Review
Assignee: nobody → longsonr
Status: NEW → ASSIGNED
Attachment #287540 - Flags: superreview?(bzbarsky)
Attachment #287540 - Flags: review?(bzbarsky)
Of course I could pass the attribute namespace ID around with the attribute and perhaps that would address the what about XLink comment if made the check be based on href and an attribute xlink namespace. That would require changes to a number of files to pass that information through though.
Comment on attachment 287540 [details] [diff] [review]
patch

I guess this works, yeah.  Watch for perf regressions when you land!
Attachment #287540 - Flags: superreview?(bzbarsky)
Attachment #287540 - Flags: superreview+
Attachment #287540 - Flags: review?(bzbarsky)
Attachment #287540 - Flags: review+
Attachment #287540 - Flags: approval1.9?
Comment on attachment 287540 [details] [diff] [review]
patch

As bz said, please land this during a time when the performance can be isolated.
Attachment #287540 - Flags: approval1.9? → approval1.9+
Seemed quiet. Checked in. 
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Flags: in-testsuite?
Checked in reftest:
http://lxr.mozilla.org/seamonkey/source/layout/reftests/svg/dynamic-link-style-01.svg
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: