зеркало из https://github.com/mozilla/pjs.git
Fix fastback regression where IsZombieDocument could return false even if we are in a zombie document. Bug 301804, r=aaronl, sr+a=dbaron
This commit is contained in:
Родитель
db10260a30
Коммит
dcf71c0ed1
|
@ -5900,12 +5900,14 @@ PresShell::PopCurrentEventInfo()
|
||||||
|
|
||||||
PRBool PresShell::InZombieDocument(nsIContent *aContent)
|
PRBool PresShell::InZombieDocument(nsIContent *aContent)
|
||||||
{
|
{
|
||||||
// If a content node points to a null document, it is possibly in a
|
// If a content node points to a null document, or the document is not
|
||||||
// zombie document, about to be replaced by a newly loading document.
|
// attached to a window, then it is possibly in a zombie document,
|
||||||
|
// about to be replaced by a newly loading document.
|
||||||
// Such documents cannot handle DOM events.
|
// Such documents cannot handle DOM events.
|
||||||
// It might actually be in a node not attached to any document,
|
// It might actually be in a node not attached to any document,
|
||||||
// in which case there is not parent presshell to retarget it to.
|
// in which case there is not parent presshell to retarget it to.
|
||||||
return !aContent->GetDocument();
|
nsIDocument *doc = aContent->GetDocument();
|
||||||
|
return !doc || !doc->GetScriptGlobalObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult PresShell::RetargetEventToParent(nsIView *aView,
|
nsresult PresShell::RetargetEventToParent(nsIView *aView,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче