mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Bug 1163911 - Make responsive images block the document load event while the load task is queued. r=jst
This commit is contained in:
parent
ca75cada77
commit
94641da537
@ -85,7 +85,10 @@ class ImageLoadTask : public nsRunnable
|
||||
public:
|
||||
explicit ImageLoadTask(HTMLImageElement *aElement) :
|
||||
mElement(aElement)
|
||||
{}
|
||||
{
|
||||
mDocument = aElement->OwnerDoc();
|
||||
mDocument->BlockOnload();
|
||||
}
|
||||
|
||||
NS_IMETHOD Run()
|
||||
{
|
||||
@ -93,12 +96,14 @@ public:
|
||||
mElement->mPendingImageLoadTask = nullptr;
|
||||
mElement->LoadSelectedImage(true, true);
|
||||
}
|
||||
mDocument->UnblockOnload(false);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
private:
|
||||
~ImageLoadTask() {}
|
||||
nsRefPtr<HTMLImageElement> mElement;
|
||||
nsCOMPtr<nsIDocument> mDocument;
|
||||
};
|
||||
|
||||
HTMLImageElement::HTMLImageElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
|
||||
|
@ -594,5 +594,4 @@ support-files = file_bug871161-1.html file_bug871161-2.html
|
||||
[test_window_open_close.html]
|
||||
skip-if = buildapp == 'b2g' # bug 1129014
|
||||
[test_img_complete.html]
|
||||
[test_viewport_resize.html]
|
||||
skip-if = os == 'win' || os == 'mac' # bug 1163911
|
||||
[test_viewport_resize.html]
|
Loading…
Reference in New Issue
Block a user