Closed
Bug 307322
Opened 19 years ago
Closed 19 years ago
Hang with <svg:use> loop
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: tor)
References
Details
(Keywords: hang, testcase, verified1.8, Whiteboard: [patch])
Attachments
(2 files, 2 obsolete files)
183 bytes,
text/xml
|
Details | |
6.31 KB,
patch
|
bzbarsky
:
review+
asa
:
approval1.8b5+
|
Details | Diff | Splinter Review |
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20050906 Firefox/1.6a1 Induced crashes with kill -8: TB9107256G, TB9107305W.
Reporter | ||
Updated•19 years ago
|
Reporter | ||
Comment 1•19 years ago
|
||
Reporter | ||
Comment 2•19 years ago
|
||
Another induced crash: TB9107420K
Reporter | ||
Updated•19 years ago
|
Summary: Highly recursive hang with <svg:symbol> and <svg:use> → Hang with <svg:use> loop
![]() |
||
Comment 4•19 years ago
|
||
I'm not sure I follow this patch. Why is the descendant test no longer needed? Why does this testcase give us a loop the descendant test doesn't catch?
The existing test, which caught things like <g id=bar><use href=bar/></g>, doesn't catch this new testcase because after we've cloned the <use> content once we have this structure: <svg> <symbol id=foo> <use href=foo/> </symbol> <use> <svg> (substituted for <symbol> in clone) <use href=foo/> (*) </svg> </use> </svg> When we do the second expansion (*), we look up the id and get the original <symbol>, which isn't in the parent chain of (*) - so the old test would pass and let us clone and get into a loop.
![]() |
||
Comment 6•19 years ago
|
||
So what we really want to be testing is that neither we nor the original use we were cloned off of are kids of the thing we're referencing, right? Except what happens if I use the DOM to clone a <use>, change the href on the clone, then insert it into the DOM?
Maybe clearing the mOriginal tracking on a href change would be enough to handle that situation?
![]() |
||
Comment 8•19 years ago
|
||
Possibly, yes.
Reporter | ||
Updated•19 years ago
|
Whiteboard: [patch]
Attachment #195184 -
Attachment is obsolete: true
Attachment #196232 -
Flags: review?(bzbarsky)
![]() |
||
Comment 10•19 years ago
|
||
So how does this prevent the loops we _used_ to prevent? The ones not involving cloned stuff? I don't see that it does.
Assignee | ||
Comment 11•19 years ago
|
||
It will prevent that, but allows one clone before catching the loop. I can add back the old test as additional insurance if you'd like.
![]() |
||
Updated•19 years ago
|
Attachment #195184 -
Flags: review?(bzbarsky) → review-
![]() |
||
Comment 12•19 years ago
|
||
Oh, I see. Yeah, I think we want to separately check two things: 1) We're not referencing our own ancestor. 2) If we're cloned off something, we're not referencing an ancestor of our clone.
Attachment #196232 -
Attachment is obsolete: true
Attachment #196232 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 13•19 years ago
|
||
Attachment #196683 -
Flags: review?(bzbarsky)
![]() |
||
Updated•19 years ago
|
Attachment #196683 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 14•19 years ago
|
||
Checked in on trunk.
Attachment #196683 -
Flags: approval1.8b5?
Comment 15•19 years ago
|
||
The spec says "a set of references that directly or indirectly reference a element to create a circular dependency is an error" (SVG 1.1, sections 5.6 and 5.3.1) and then lists specific behaviour for handling such errors (SVG 1.1, section F.2). Even if we want to ignore these conformance requirements (what exactly do we do instead? Just ignore the erroneous attribute?), IMHO we should still be at least reporting these errors to the JS console.
Comment 16•19 years ago
|
||
(In reply to comment #15) > Even if we want to ignore these conformance requirements (what > exactly do we do instead? Just ignore the erroneous attribute?), IMHO we should > still be at least reporting these errors to the JS console. I am convinced that the best way is exactly this!! I.e. *tolerate* non-fatal bugs in SVG code and *report* *warnings* at console! BTW. This is good example of such problem: Bad SVG code: <feColorMatrix type="saturate" in="SourceGraphic" values="30%"/> See also: http://issues.apache.org/bugzilla/show_bug.cgi?id=36743
Updated•19 years ago
|
Attachment #196683 -
Flags: approval1.8b5? → approval1.8b5+
Assignee | ||
Comment 17•19 years ago
|
||
Checked in on branch.
Reporter | ||
Updated•18 years ago
|
Keywords: fixed1.8 → verified1.8
You need to log in
before you can comment on or make changes to this bug.
Description
•