mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 697230: Part 3 - Make style images block onload. r=bz
This commit is contained in:
parent
2fc3f31d0c
commit
4dcafaedea
@ -83,7 +83,6 @@ nsImageLoadingContent::nsImageLoadingContent()
|
||||
mBroken(true),
|
||||
mUserDisabled(false),
|
||||
mSuppressed(false),
|
||||
mBlockingOnload(false),
|
||||
mNewRequestsWillNeedAnimationReset(false),
|
||||
mStateChangerDepth(0),
|
||||
mCurrentRequestRegistered(false),
|
||||
|
@ -368,11 +368,6 @@ private:
|
||||
bool mUserDisabled : 1;
|
||||
bool mSuppressed : 1;
|
||||
|
||||
/**
|
||||
* Whether we're currently blocking document load.
|
||||
*/
|
||||
bool mBlockingOnload : 1;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* A hack to get animations to reset, see bug 594771. On requests
|
||||
|
@ -0,0 +1,2 @@
|
||||
<!DOCTYPE html>
|
||||
<img src="really-big-background.png" style="width: 1600px; height: 1200px; position: absolute;">
|
2
layout/reftests/backgrounds/really-big-background.html
Normal file
2
layout/reftests/backgrounds/really-big-background.html
Normal file
@ -0,0 +1,2 @@
|
||||
<!DOCTYPE html>
|
||||
<img style="background-image: url(really-big-background.png); width: 1600px; height: 1200px; position: absolute;"></img>
|
BIN
layout/reftests/backgrounds/really-big-background.png
Normal file
BIN
layout/reftests/backgrounds/really-big-background.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 184 KiB |
@ -127,4 +127,6 @@ random-if(bug685516) == fixed-bg-with-transform-outside-viewport-1.html fixed-bg
|
||||
HTTP == root-background-1.html root-background-ref.html
|
||||
HTTP != root-background-1.html about:blank
|
||||
|
||||
== really-big-background.html really-big-background-ref.html
|
||||
|
||||
== background-repeat-1-ref.html background-repeat-1.html
|
||||
|
@ -347,6 +347,7 @@ NS_IMPL_RELEASE(ImageLoader)
|
||||
NS_INTERFACE_MAP_BEGIN(ImageLoader)
|
||||
NS_INTERFACE_MAP_ENTRY(imgIDecoderObserver)
|
||||
NS_INTERFACE_MAP_ENTRY(imgIContainerObserver)
|
||||
NS_INTERFACE_MAP_ENTRY(imgIOnloadBlocker)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMETHODIMP
|
||||
@ -423,5 +424,29 @@ ImageLoader::FrameChanged(imgIRequest *aRequest,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ImageLoader::BlockOnload(imgIRequest* aRequest)
|
||||
{
|
||||
if (!mDocument) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
mDocument->BlockOnload();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ImageLoader::UnblockOnload(imgIRequest* aRequest)
|
||||
{
|
||||
if (!mDocument) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
mDocument->UnblockOnload(false);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
} // namespace css
|
||||
} // namespace mozilla
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "nsInterfaceHashtable.h"
|
||||
#include "nsCSSValue.h"
|
||||
#include "imgIRequest.h"
|
||||
#include "imgIOnloadBlocker.h"
|
||||
#include "nsStubImageDecoderObserver.h"
|
||||
|
||||
class nsIFrame;
|
||||
@ -22,7 +23,8 @@ class nsIPrincipal;
|
||||
namespace mozilla {
|
||||
namespace css {
|
||||
|
||||
class ImageLoader : public nsStubImageDecoderObserver {
|
||||
class ImageLoader : public nsStubImageDecoderObserver,
|
||||
public imgIOnloadBlocker {
|
||||
public:
|
||||
ImageLoader(nsIDocument* aDocument)
|
||||
: mDocument(aDocument),
|
||||
@ -37,6 +39,7 @@ public:
|
||||
}
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_IMGIONLOADBLOCKER
|
||||
|
||||
// imgIDecoderObserver (override nsStubImageDecoderObserver)
|
||||
NS_IMETHOD OnStartContainer(imgIRequest *aRequest, imgIContainer *aImage);
|
||||
|
Loading…
Reference in New Issue
Block a user