зеркало из https://github.com/mozilla/gecko-dev.git
backout Bug 568975
This commit is contained in:
Родитель
7bfa0ed84c
Коммит
b6b16050a6
|
@ -943,7 +943,6 @@ nsGlobalWindow::CleanUp(PRBool aIgnoreModalDialog)
|
|||
mContext = nsnull; // Forces Release
|
||||
}
|
||||
mChromeEventHandler = nsnull; // Forces Release
|
||||
mParentTarget = nsnull;
|
||||
|
||||
nsGlobalWindow *inner = GetCurrentInnerWindowInternal();
|
||||
|
||||
|
@ -1198,7 +1197,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsGlobalWindow)
|
|||
|
||||
// Traverse stuff from nsPIDOMWindow
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mChromeEventHandler)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mParentTarget)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mDocument)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mFrameElement)
|
||||
|
||||
|
@ -1232,7 +1230,6 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsGlobalWindow)
|
|||
|
||||
// Unlink stuff from nsPIDOMWindow
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mChromeEventHandler)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mParentTarget)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mDocument)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mFrameElement)
|
||||
|
||||
|
@ -2402,19 +2399,16 @@ nsGlobalWindow::PreHandleEvent(nsEventChainPreVisitor& aVisitor)
|
|||
}
|
||||
}
|
||||
|
||||
if (!mParentTarget) {
|
||||
nsCOMPtr<nsIFrameLoaderOwner> flo = do_QueryInterface(mChromeEventHandler);
|
||||
if (flo) {
|
||||
nsRefPtr<nsFrameLoader> fl = flo->GetFrameLoader();
|
||||
if (fl) {
|
||||
mParentTarget = fl->GetTabChildGlobalAsEventTarget();
|
||||
}
|
||||
}
|
||||
if (!mParentTarget) {
|
||||
mParentTarget = mChromeEventHandler;
|
||||
nsPIDOMEventTarget* chromeTarget = mChromeEventHandler;
|
||||
nsCOMPtr<nsIFrameLoaderOwner> flo = do_QueryInterface(mChromeEventHandler);
|
||||
if (flo) {
|
||||
nsRefPtr<nsFrameLoader> fl = flo->GetFrameLoader();
|
||||
if (fl) {
|
||||
nsPIDOMEventTarget* t = fl->GetTabChildGlobalAsEventTarget();
|
||||
chromeTarget = t ? t : chromeTarget;
|
||||
}
|
||||
}
|
||||
aVisitor.mParentTarget = mParentTarget;
|
||||
aVisitor.mParentTarget = chromeTarget;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -524,8 +524,6 @@ protected:
|
|||
|
||||
void SetChromeEventHandlerInternal(nsPIDOMEventTarget* aChromeEventHandler) {
|
||||
mChromeEventHandler = aChromeEventHandler;
|
||||
// mParentTarget will be set when the next event is dispatched.
|
||||
mParentTarget = nsnull;
|
||||
}
|
||||
|
||||
// These two variables are special in that they're set to the same
|
||||
|
@ -534,8 +532,6 @@ protected:
|
|||
nsCOMPtr<nsPIDOMEventTarget> mChromeEventHandler; // strong
|
||||
nsCOMPtr<nsIDOMDocument> mDocument; // strong
|
||||
|
||||
nsCOMPtr<nsPIDOMEventTarget> mParentTarget; // strong
|
||||
|
||||
// These members are only used on outer windows.
|
||||
nsCOMPtr<nsIDOMElement> mFrameElement;
|
||||
nsIDocShell *mDocShell; // Weak Reference
|
||||
|
|
Загрузка…
Ссылка в новой задаче