Closed Bug 374442 Opened 17 years ago Closed 16 years ago

marker-end on <path> doesn't work when set by script

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: piratepenguin, Unassigned)

Details

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a3pre) Gecko/20070312 Minefield/3.0a3pre
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a3pre) Gecko/20070312 Minefield/3.0a3pre

. See test case.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Attached image test case (obsolete) —
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Attached image fixed testcase
The original testcase tries to reference the element 'p' before the element appears.  With incremental XML parsing, that obviously won't work.
Attachment #258983 - Attachment is obsolete: true
Reopening from dup because bug 372572 WFM, but I can reproduce this bug (on Mac).
Status: RESOLVED → UNCONFIRMED
OS: Linux → All
Hardware: PC → All
Resolution: DUPLICATE → ---
Use setAttributeNS see http://jwatt.org/svg/authoring/ 
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → INVALID
The namespace set by setAttribute(), null, is correct.  Twiddling the attribute in DOM Inspector makes the arrow appear, so this is clearly a bug in Gecko's SVG handling, not a bug in the testcase.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
While using the NS versions of the element functions is definitely necessary, using the NS versions of the attribute functions hasn't been (only for attributes in the null namespace of course). In fact I think it's unlikely we could ever now require the NS methods for attributes in the null namespace (even if we wanted to) given that we've supported the NS-less methods for so long, so I should probably change that page.

Anyway, as Jesse says, the use of setAttribute instead of setAttributeNS doesn't seem to be the problem here.
Attached image working version of testcase (obsolete) —
In Jesse's testcase the style system tells us that there is no marker-end attribute on the path. In this testcase the style system tells us that there is an attribute. If there is a bug it must be in the style system.
Comment on attachment 285579 [details]
working version of testcase

Ahh I see why mine works. Save Page As stuck the missing attribute on it. Oops. Mea Culpa.
Attachment #285579 - Attachment is obsolete: true
If you make a function out of the script and call it on load it works. Although we get a setAttribute call the style system seems not to be set up and returns that marker-end has no style so we don't draw it.
This seems like a good candidate for 1.9.1 (an obvious bug that should be resolved).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: wanted1.9.1?
We're using such markers as arrowheads in dynamic workflow visualizations. This bug really is a pain for our application, as we can't fall back to the initialization phase. A fix would be really nice. Meanwhile we're trying to work around this somehow.
Flags: wanted1.9.1? → wanted1.9.1+
Worksforme on latest mozilla-central nightly build.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1a2pre) Gecko/2008072902 Minefield/3.1a2pre

-> WORKSFORME
Status: NEW → RESOLVED
Closed: 17 years ago16 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: