mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 466084. Fix reframing of plugin documents to reinstantiate the plugin correctly. r+sr=jst
This commit is contained in:
parent
f9902ed4f3
commit
b99f5c612c
@ -71,7 +71,7 @@ public:
|
||||
const nsCString& GetType() const { return mMimeType; }
|
||||
nsIContent* GetPluginContent() { return mPluginContent; }
|
||||
|
||||
void SkippedInstantiation() {
|
||||
void AllowNormalInstantiation() {
|
||||
mWillHandleInstantiation = PR_FALSE;
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ nsPluginStreamListener::OnStartRequest(nsIRequest* request, nsISupports *ctxt)
|
||||
nsIPresShell* shell = mDocument->GetPrimaryShell();
|
||||
if (!shell) {
|
||||
// Can't instantiate w/o a shell
|
||||
mPluginDoc->SkippedInstantiation();
|
||||
mPluginDoc->AllowNormalInstantiation();
|
||||
return NS_BINDING_ABORTED;
|
||||
}
|
||||
|
||||
@ -125,14 +125,14 @@ nsPluginStreamListener::OnStartRequest(nsIRequest* request, nsISupports *ctxt)
|
||||
|
||||
nsIFrame* frame = shell->GetPrimaryFrameFor(embed);
|
||||
if (!frame) {
|
||||
mPluginDoc->SkippedInstantiation();
|
||||
mPluginDoc->AllowNormalInstantiation();
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsIObjectFrame* objFrame;
|
||||
CallQueryInterface(frame, &objFrame);
|
||||
if (!objFrame) {
|
||||
mPluginDoc->SkippedInstantiation();
|
||||
mPluginDoc->AllowNormalInstantiation();
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
@ -142,6 +142,10 @@ nsPluginStreamListener::OnStartRequest(nsIRequest* request, nsISupports *ctxt)
|
||||
return rv;
|
||||
}
|
||||
|
||||
// Now that we're done, allow normal instantiation in the future
|
||||
// (say if there's a reframe of this entire presentation).
|
||||
mPluginDoc->AllowNormalInstantiation();
|
||||
|
||||
NS_ASSERTION(mNextStream, "We should have a listener by now");
|
||||
return mNextStream->OnStartRequest(request, ctxt);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user