Closed
Bug 851755
Opened 12 years ago
Closed 12 years ago
Make nsImageBoxFrame block onload when images are loading/decoding
Categories
(Core :: XUL, defect)
Tracking
()
RESOLVED
FIXED
mozilla22
People
(Reporter: joe, Assigned: joe)
References
Details
Attachments
(1 file)
5.84 KB,
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
nsImageBoxFrame currently doesn't block its document's onload when the image starts decoding, but it should. It should also do similarly to nsImageLoadingContent (bug 841579) and not fire its load events before decode happens, just in case images run into errors.
Try: https://tbpl.mozilla.org/?tree=Try&rev=3b1512e650b2
Assignee | ||
Comment 1•12 years ago
|
||
Did I just dream about getting feedback about this patch? I swear I already got review on it. Or at least attached it to a bug.
Attachment #726498 -
Flags: review?(tnikkel)
Comment 2•12 years ago
|
||
Were there some tests failing because of this?
Assignee | ||
Comment 3•12 years ago
|
||
Yep - one or two.
Comment 4•12 years ago
|
||
Comment on attachment 726498 [details] [diff] [review]
wait for decode
Review of attachment 726498 [details] [diff] [review]:
-----------------------------------------------------------------
What happens if BlockOnload is called and then this frame gets destroyed? I think we should unblock onload in that case.
::: layout/xul/base/src/nsImageBoxFrame.cpp
@@ +725,5 @@
> +/* void blockOnload (in imgIRequest aRequest); */
> +NS_IMETHODIMP
> +nsImageBoxListener::BlockOnload(imgIRequest *aRequest)
> +{
> + if (mFrame && mFrame->GetContent() && mFrame->GetContent()->GetDocument()) {
I think you want GetCurrentDoc here.
Assignee | ||
Comment 5•12 years ago
|
||
[8:41 PM] <joe> tn: well anyways I think we're actually OK here
[8:41 PM] <joe> that is, if destroying frames calls DestroyFrom
[8:42 PM] <joe> because CancelAndForgetObserver, from within DestroyFrom, will call unblockonload if necessary
[8:43 PM] <tn> joe, oh, okay, then that should be good
Updated•12 years ago
|
Attachment #726498 -
Flags: review?(tnikkel) → review+
Assignee | ||
Comment 6•12 years ago
|
||
Target Milestone: --- → mozilla22
Comment 7•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•