Closed
Bug 837315
Opened 12 years ago
Closed 12 years ago
Add an event for SVGs that indicates when the SVG and all its inner resources are done loading
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla21
People
(Reporter: seth, Assigned: seth)
References
Details
Attachments
(1 file)
2.32 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
Right now there is no event that indicates that an SVG and all its inner images are done loading. We need something similar to |window.onload| for SVGs. The closest thing we have is the |SVGLoad| event, but it only indicates that the SVG DOM _itself_ is ready - that is, it behaves more like |DOMContentLoaded| than |window.onload|. We can't tell when SVG images should be considered loaded (and thus should unblock onload for the document they're embedded in) without this event. Not having this prevents us from correctly fixing bug 704059, resulting in a number of race conditions and random orange bugs, including bug 703806.
Comment 1•12 years ago
|
||
s/images/resources/ in summary -- this includes stylesheets, <use>, and any filters/gradients/etc that happen to be stored in (data-URI or blob-URI encoded) external resources. Basically, we need something like window.onload. (but there are apparently a number of places where that gets blocked by the fact that we don't have a window object)
Summary: Add an event for SVGs that indicates when the SVG and all its inner images are done loading → Add an event for SVGs that indicates when the SVG and all its inner resources are done loading
Assignee | ||
Comment 2•12 years ago
|
||
Proposed patch. Try job here: https://tbpl.mozilla.org/?tree=Try&rev=86372d515c8b
Attachment #709864 -
Flags: review?(bzbarsky)
Comment 3•12 years ago
|
||
Comment on attachment 709864 [details] [diff] [review] Add SVG document loaded event. Hmm. Is there a reason to not just call this event "load"? r=me either way, I guess.
Attachment #709864 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #3) > Hmm. Is there a reason to not just call this event "load"? Well, the thinking was that giving it a name like this would clarify that it was a private event only for our internal consumption.
Assignee | ||
Comment 5•12 years ago
|
||
Thanks for the review btw!
Comment 6•12 years ago
|
||
Ah, ok. I buy that.
Assignee | ||
Comment 7•12 years ago
|
||
OK, I'm happy with the try results. Let's get this in.
Keywords: checkin-needed
Comment 8•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/874fc2730371
Keywords: checkin-needed
Comment 9•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/874fc2730371
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in
before you can comment on or make changes to this bug.
Description
•