Changes to support window.open in AppRunner.

This commit is contained in:
hyatt%netscape.com 1999-05-04 23:29:06 +00:00
Родитель 41a9f754f1
Коммит 42da7d31a2
4 изменённых файлов: 26 добавлений и 70 удалений

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

@ -1385,16 +1385,16 @@ PresShell::CantRenderReplacedElement(nsIPresContext* aPresContext,
kIEventQueueServiceIID,
(nsISupports **)&eventService);
if (NS_SUCCEEDED(rv)) {
PLEventQueue* eventQueue;
nsCOMPtr<nsIEventQueue> eventQueue;
rv = eventService->GetThreadEventQueue(PR_GetCurrentThread(),
&eventQueue);
getter_AddRefs(eventQueue));
nsServiceManager::ReleaseService(kEventQueueServiceCID, eventService);
if (NS_SUCCEEDED(rv) && (nsnull != eventQueue)) {
if (NS_SUCCEEDED(rv) && eventQueue) {
CantRenderReplacedElementEvent* ev;
ev = new CantRenderReplacedElementEvent(this, aFrame);
PL_PostEvent(eventQueue, ev);
eventQueue->PostEvent(ev);
}
}
return rv;

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

@ -671,37 +671,13 @@ nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext,
nsIContent* content;
GetParentContent(content);
mWebShell = nsnull;
#ifdef INCLUDE_XUL
nsCOMPtr<nsISupports> presContainer;
aPresContext.GetContainer(getter_AddRefs(presContainer));
if (presContainer) {
nsCOMPtr<nsIWebShell> parentShell;
parentShell = do_QueryInterface(presContainer);
if (parentShell) {
nsWebShellType shellType;
parentShell->GetWebShellType(shellType);
if (shellType == nsWebShellChrome) {
nsCOMPtr<nsIWebShellContainer> parentContainer;
parentContainer = do_QueryInterface(presContainer);
if (parentContainer) {
parentContainer->ChildShellAdded(&mWebShell, content);
}
}
}
rv = nsComponentManager::CreateInstance(kWebShellCID, nsnull, kIWebShellIID,
(void**)&mWebShell);
if (NS_OK != rv) {
NS_ASSERTION(0, "could not create web widget");
return rv;
}
#endif // INCLUDE_XUL
if (mWebShell == nsnull) {
rv = nsComponentManager::CreateInstance(kWebShellCID, nsnull, kIWebShellIID,
(void**)&mWebShell);
if (NS_OK != rv) {
NS_ASSERTION(0, "could not create web widget");
return rv;
}
}
// pass along marginwidth, marginheight, scrolling so sub document can use it
mWebShell->SetMarginWidth(GetMarginWidth(&aPresContext, content));
mWebShell->SetMarginHeight(GetMarginHeight(&aPresContext, content));
@ -743,7 +719,9 @@ nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext,
if (value.EqualsIgnoreCase("content")) {
// The web shell's type is content.
mWebShell->SetWebShellType(nsWebShellContent);
//mWebShell->SetName(value.GetUnicode());
nsCOMPtr<nsIWebShellContainer> shellAsContainer;
shellAsContainer = do_QueryInterface(mWebShell);
shellAsContainer->ContentShellAdded(mWebShell, content);
}
else {
// Inherit our type from our parent webshell. If it is

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

@ -1385,16 +1385,16 @@ PresShell::CantRenderReplacedElement(nsIPresContext* aPresContext,
kIEventQueueServiceIID,
(nsISupports **)&eventService);
if (NS_SUCCEEDED(rv)) {
PLEventQueue* eventQueue;
nsCOMPtr<nsIEventQueue> eventQueue;
rv = eventService->GetThreadEventQueue(PR_GetCurrentThread(),
&eventQueue);
getter_AddRefs(eventQueue));
nsServiceManager::ReleaseService(kEventQueueServiceCID, eventService);
if (NS_SUCCEEDED(rv) && (nsnull != eventQueue)) {
if (NS_SUCCEEDED(rv) && eventQueue) {
CantRenderReplacedElementEvent* ev;
ev = new CantRenderReplacedElementEvent(this, aFrame);
PL_PostEvent(eventQueue, ev);
eventQueue->PostEvent(ev);
}
}
return rv;

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

@ -671,37 +671,13 @@ nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext,
nsIContent* content;
GetParentContent(content);
mWebShell = nsnull;
#ifdef INCLUDE_XUL
nsCOMPtr<nsISupports> presContainer;
aPresContext.GetContainer(getter_AddRefs(presContainer));
if (presContainer) {
nsCOMPtr<nsIWebShell> parentShell;
parentShell = do_QueryInterface(presContainer);
if (parentShell) {
nsWebShellType shellType;
parentShell->GetWebShellType(shellType);
if (shellType == nsWebShellChrome) {
nsCOMPtr<nsIWebShellContainer> parentContainer;
parentContainer = do_QueryInterface(presContainer);
if (parentContainer) {
parentContainer->ChildShellAdded(&mWebShell, content);
}
}
}
rv = nsComponentManager::CreateInstance(kWebShellCID, nsnull, kIWebShellIID,
(void**)&mWebShell);
if (NS_OK != rv) {
NS_ASSERTION(0, "could not create web widget");
return rv;
}
#endif // INCLUDE_XUL
if (mWebShell == nsnull) {
rv = nsComponentManager::CreateInstance(kWebShellCID, nsnull, kIWebShellIID,
(void**)&mWebShell);
if (NS_OK != rv) {
NS_ASSERTION(0, "could not create web widget");
return rv;
}
}
// pass along marginwidth, marginheight, scrolling so sub document can use it
mWebShell->SetMarginWidth(GetMarginWidth(&aPresContext, content));
mWebShell->SetMarginHeight(GetMarginHeight(&aPresContext, content));
@ -743,7 +719,9 @@ nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext,
if (value.EqualsIgnoreCase("content")) {
// The web shell's type is content.
mWebShell->SetWebShellType(nsWebShellContent);
//mWebShell->SetName(value.GetUnicode());
nsCOMPtr<nsIWebShellContainer> shellAsContainer;
shellAsContainer = do_QueryInterface(mWebShell);
shellAsContainer->ContentShellAdded(mWebShell, content);
}
else {
// Inherit our type from our parent webshell. If it is