Closed
Bug 359598
Opened 18 years ago
Closed 18 years ago
svg:script not working since 343730 checkin
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: tor, Assigned: sicking)
References
()
Details
(Keywords: regression)
Attachments
(2 files)
199 bytes,
image/svg+xml
|
Details | |
10.22 KB,
patch
|
bzbarsky
:
review+
romaxa
:
review-
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
Backing out the script changes in bug 343730 makes this SVG app work again.
*** Bug 359798 has been marked as a duplicate of this bug. ***
Updated•18 years ago
|
Keywords: regression
Assignee | ||
Comment 3•18 years ago
|
||
The main problem here is that nsSVGScriptElement doesn't implement DoneAddingChildren. However I also noticed that svg uses xlink:href to point to the url, not src as some of the new code assumes. I've got a patch in the works that takes care of this and some other things.
Assignee | ||
Comment 4•18 years ago
|
||
There we two major problems.
1. nsSVGScriptElement didn't override DoneAddingChildren so we never even got
in to nsScriptElement::MaybeProcessScript
2. A couple of places assumed that the attribute name was src (rather than
xlink:href for <svg:script>s)
I fixed this and also improved the code that checks if a script element is "empty" (i.e. doesn't link to a script or contain inline script). This finally makes it possible to first give a script a text-child and then set that textchilds .nodeValue without the script executing too early.
Assignee: general → bugmail
Status: NEW → ASSIGNED
Attachment #244965 -
Flags: superreview?(bzbarsky)
Attachment #244965 -
Flags: review?(bzbarsky)
Comment 5•18 years ago
|
||
Comment on attachment 244965 [details] [diff] [review]
Patch to fix
>Index: content/base/public/nsContentUtils.h
>+ * NOTE! This method does not descend recursivly into elements.
"recursively"
>Index: content/svg/content/src/nsSVGScriptElement.cpp
>+nsSVGScriptElement::HasScriptContent()
>+{
>+ nsAutoString src;
>+ mHref->GetAnimVal(src);
Why use the animval instead of just HasAttr()
Assignee | ||
Comment 6•18 years ago
|
||
It's what GetScriptURI does. Not sure if it's possible to use animation elements to get an animated value without actually setting the attribute.
Comment 7•18 years ago
|
||
Comment on attachment 244965 [details] [diff] [review]
Patch to fix
Ah, ok. r+sr=bzbarsky with the spelling fix.
Attachment #244965 -
Flags: superreview?(bzbarsky)
Attachment #244965 -
Flags: superreview+
Attachment #244965 -
Flags: review?(bzbarsky)
Attachment #244965 -
Flags: review+
Updated•18 years ago
|
Flags: in-testsuite?
Comment 8•18 years ago
|
||
Comment on attachment 244965 [details] [diff] [review]
Patch to fix
> }
May be here should be PRBool type?
>+nsHTMLScriptElement::HasScriptContent()
>+{
>+ return
Attachment #244965 -
Flags: review-
Comment 9•18 years ago
|
||
> May be here should be PRBool type?
> >+nsHTMLScriptElement::HasScriptContent()
Same for nsSVGScriptElement.cpp
Assignee | ||
Comment 10•18 years ago
|
||
Checked in about a day ago with the return-types fixed.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 11•18 years ago
|
||
Oh. Somehow I missed the mail about this getting fixed (seem to be doing that a lot). Thanks guys!
You need to log in
before you can comment on or make changes to this bug.
Description
•