(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:
hyatt%netscape.com 1999-05-27 21:04:52 +00:00
Родитель 989a98a5b9
Коммит 25c31fd9a3
4 изменённых файлов: 40 добавлений и 2 удалений

Просмотреть файл

@ -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