Closed
Bug 380417
Opened 17 years ago
Closed 17 years ago
[FIX]SVG Load Event Doesn't Always Fire, Recent Regression
Categories
(Core :: SVG, defect, P1)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha5
People
(Reporter: duncan.loveday, Assigned: bzbarsky)
References
Details
(Keywords: regression)
Attachments
(5 files, 2 obsolete files)
353 bytes,
image/svg+xml
|
Details | |
101 bytes,
application/x-javascript
|
Details | |
200 bytes,
text/html
|
Details | |
772 bytes,
application/zip
|
Details | |
2.07 KB,
patch
|
jwatt
:
review+
smaug
:
review+
tor
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a5pre) Gecko/20070510 Minefield/3.0a5pre Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a5pre) Gecko/20070510 Minefield/3.0a5pre In the attached test case, most of the time the SVG load event doesn't fire. The SVG is imported into the HTML by means of an EMBED written using javascript document.write(). The problem may be timing dependent since removing the alert message from the test case makes it work correctly. Reproducible: Sometimes Steps to Reproduce: 1. Open the attached test.html 2. Click the reload button and/or click in the location field and hit enter. 3. Actual Results: In most cases, the following alerts are displayed: Loading doc HTML load handler Occasionally, the following alerts are displayed: Loading doc SVG load handler HTML load handler Expected Results: The correct behaviour is to consistently display Loading doc SVG load handler HTML load handler This works correctly on FF2 and on recent trunk builds, no more than a couple of weeks old.
Reporter | ||
Comment 1•17 years ago
|
||
Reporter | ||
Comment 2•17 years ago
|
||
Reporter | ||
Comment 3•17 years ago
|
||
Reporter | ||
Comment 4•17 years ago
|
||
Unfortunately, I can't recreate the fault with files that work live in the bug, possibly because of time dependency. Reattaching files with relative URLs. Save the three files test.html, test.js, test.svg in a directory and open test.html.
Attachment #264488 -
Attachment is obsolete: true
Reporter | ||
Comment 5•17 years ago
|
||
Attachment #264489 -
Attachment is obsolete: true
Reporter | ||
Comment 6•17 years ago
|
||
The latest three attachments recreate the bug consistently for me when saved in a directory. Comment out the "loading doc" alert from test.html and it starts working.
Keywords: regression
Comment 7•17 years ago
|
||
Comment 8•17 years ago
|
||
Regression range for this is http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&date=explicit&mindate=1178137320&maxdate=1178139779
Assignee | ||
Comment 9•17 years ago
|
||
Ah, yes. So SVG fires onload events for its elements only if there is already a presentation set up for the document by the time the close tag for the element is parsed. Bug 379485 changed things so that in fact there is no presshell in this case, because the frame for the <embed> hasn't been created yet. The question I have is whether SVG should fire the events independently of presentation existence...
Assignee | ||
Comment 10•17 years ago
|
||
I assume that SVG frames do not listen for SVG load events, right?
Attachment #264524 -
Flags: superreview?(tor)
Attachment #264524 -
Flags: review?(jwatt)
Assignee | ||
Updated•17 years ago
|
Attachment #264524 -
Flags: review?(Olli.Pettay)
Assignee | ||
Updated•17 years ago
|
Assignee: general → bzbarsky
OS: Windows XP → All
Priority: -- → P1
Hardware: PC → All
Summary: SVG Load Event Doesn't Always Fire, Recent Regression → [FIX]SVG Load Event Doesn't Always Fire, Recent Regression
Target Milestone: --- → mozilla1.9alpha5
Comment 11•17 years ago
|
||
I *think* SVGLoad doesn't need prescontext at all.
Updated•17 years ago
|
Flags: in-testsuite?
Comment 12•17 years ago
|
||
Comment on attachment 264524 [details] [diff] [review] Proposed fix Though, this is ok too, works like normal DOM event dispatching where context is used if there is one.
Attachment #264524 -
Flags: review?(Olli.Pettay) → review+
Comment 13•17 years ago
|
||
If we're using the event dispatcher, do we want to set the NS_EVENT_FLAG_CANT_BUBBLE flag? http://www.w3.org/2003/01/REC-SVG11-20030114-errata.html#SVGLoad%20does%20not%20bubble
Comment 14•17 years ago
|
||
yes.
Comment 15•17 years ago
|
||
Oh, that is just proposed errata. Does that mean that we should wait until it has been somehow accepted or ?
Comment 16•17 years ago
|
||
It seems the errata is just to simplify the language, not to change the actual behavior.
Assignee | ||
Comment 17•17 years ago
|
||
I can add that, sure. Do you want to see an updated patch?
Comment 18•17 years ago
|
||
Comment on attachment 264524 [details] [diff] [review] Proposed fix sr=tor with bubble flag added.
Attachment #264524 -
Flags: superreview?(tor) → superreview+
Comment 19•17 years ago
|
||
Comment on attachment 264524 [details] [diff] [review] Proposed fix Sorry for the delayed review! r=jwatt, but please do add the NS_EVENT_FLAG_CANT_BUBBLE flag.
Attachment #264524 -
Flags: review?(jwatt) → review+
Assignee | ||
Comment 20•17 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•