зеркало из https://github.com/mozilla/pjs.git
(1) The document now checks the window for capture.
(2) Frames and iframes now know their nearest enclosing chrome shells.
This commit is contained in:
Родитель
989a98a5b9
Коммит
25c31fd9a3
|
@ -2267,7 +2267,11 @@ nsresult nsDocument::HandleDOMEvent(nsIPresContext& aPresContext,
|
|||
|
||||
//Capturing stage
|
||||
if (NS_EVENT_FLAG_BUBBLE != aFlags) {
|
||||
//XXX Check window capture here
|
||||
nsIScriptGlobalObject* mGlobal;
|
||||
if (NS_OK == mScriptContextOwner->GetScriptGlobalObject(&mGlobal)) {
|
||||
mGlobal->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, NS_EVENT_FLAG_CAPTURE, aEventStatus);
|
||||
NS_RELEASE(mGlobal);
|
||||
}
|
||||
}
|
||||
|
||||
//Local handling stage
|
||||
|
|
|
@ -2267,7 +2267,11 @@ nsresult nsDocument::HandleDOMEvent(nsIPresContext& aPresContext,
|
|||
|
||||
//Capturing stage
|
||||
if (NS_EVENT_FLAG_BUBBLE != aFlags) {
|
||||
//XXX Check window capture here
|
||||
nsIScriptGlobalObject* mGlobal;
|
||||
if (NS_OK == mScriptContextOwner->GetScriptGlobalObject(&mGlobal)) {
|
||||
mGlobal->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, NS_EVENT_FLAG_CAPTURE, aEventStatus);
|
||||
NS_RELEASE(mGlobal);
|
||||
}
|
||||
}
|
||||
|
||||
//Local handling stage
|
||||
|
|
|
@ -790,6 +790,21 @@ nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext,
|
|||
// content.
|
||||
mWebShell->SetWebShellType(parentType);
|
||||
}
|
||||
|
||||
// Make sure all shells have links back to the outermost chrome
|
||||
// shell.
|
||||
nsCOMPtr<nsIWebShell> chromeShell;
|
||||
outerShell->GetContainingChromeShell(getter_AddRefs(chromeShell));
|
||||
if (!chromeShell)
|
||||
chromeShell = dont_QueryInterface(outerShell);
|
||||
|
||||
// Make sure the outermost shell is chrome, and only set up
|
||||
// this link if it is.
|
||||
nsWebShellType chromeShellType;
|
||||
chromeShell->GetWebShellType(chromeShellType);
|
||||
if (chromeShellType == nsWebShellChrome)
|
||||
mWebShell->SetContainingChromeShell(chromeShell);
|
||||
|
||||
#endif // INCLUDE_XUL
|
||||
|
||||
nsIPref* outerPrefs = nsnull; // connect the prefs
|
||||
|
|
|
@ -790,6 +790,21 @@ nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext,
|
|||
// content.
|
||||
mWebShell->SetWebShellType(parentType);
|
||||
}
|
||||
|
||||
// Make sure all shells have links back to the outermost chrome
|
||||
// shell.
|
||||
nsCOMPtr<nsIWebShell> chromeShell;
|
||||
outerShell->GetContainingChromeShell(getter_AddRefs(chromeShell));
|
||||
if (!chromeShell)
|
||||
chromeShell = dont_QueryInterface(outerShell);
|
||||
|
||||
// Make sure the outermost shell is chrome, and only set up
|
||||
// this link if it is.
|
||||
nsWebShellType chromeShellType;
|
||||
chromeShell->GetWebShellType(chromeShellType);
|
||||
if (chromeShellType == nsWebShellChrome)
|
||||
mWebShell->SetContainingChromeShell(chromeShell);
|
||||
|
||||
#endif // INCLUDE_XUL
|
||||
|
||||
nsIPref* outerPrefs = nsnull; // connect the prefs
|
||||
|
|
Загрузка…
Ссылка в новой задаче