зеркало из https://github.com/mozilla/gecko-dev.git
nsXULDocument now uses the nsIBaseWindow interface for windowing stuff on webshell instead of nsIWebShell. This paves the way for the new docshell object to move in.
This commit is contained in:
Родитель
88639c509e
Коммит
85b5334721
|
@ -94,6 +94,7 @@
|
||||||
#include "nsITimer.h"
|
#include "nsITimer.h"
|
||||||
#include "nsIURL.h"
|
#include "nsIURL.h"
|
||||||
#include "nsIWebShell.h"
|
#include "nsIWebShell.h"
|
||||||
|
#include "nsIBaseWindow.h"
|
||||||
#include "nsIXMLContent.h"
|
#include "nsIXMLContent.h"
|
||||||
#include "nsIXMLElementFactory.h"
|
#include "nsIXMLElementFactory.h"
|
||||||
#include "nsIXULCommandDispatcher.h"
|
#include "nsIXULCommandDispatcher.h"
|
||||||
|
@ -2992,11 +2993,11 @@ nsXULDocument::SetProperty(JSContext *aContext, jsval aID, jsval *aVp)
|
||||||
|
|
||||||
if (! container) continue;
|
if (! container) continue;
|
||||||
|
|
||||||
nsCOMPtr<nsIWebShell> webshell = do_QueryInterface(container);
|
nsCOMPtr<nsIBaseWindow> webShellWin = do_QueryInterface(container);
|
||||||
if (! webshell) continue;
|
if(!webShellWin) continue;
|
||||||
|
|
||||||
rv = webshell->SetTitle(title.GetUnicode());
|
NS_ENSURE_SUCCESS(webShellWin->SetTitle(title.GetUnicode()),
|
||||||
if (NS_FAILED(rv)) return PR_FALSE;
|
PR_FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (PL_strcmp("location", s) == 0) {
|
else if (PL_strcmp("location", s) == 0) {
|
||||||
|
@ -3396,7 +3397,10 @@ nsXULDocument::StartLayout(void)
|
||||||
|
|
||||||
// Perform the resize
|
// Perform the resize
|
||||||
PRInt32 chromeX,chromeY,chromeWidth,chromeHeight;
|
PRInt32 chromeX,chromeY,chromeWidth,chromeHeight;
|
||||||
webShell->GetBounds(chromeX,chromeY,chromeWidth,chromeHeight);
|
nsCOMPtr<nsIBaseWindow> webShellWin(do_QueryInterface(webShell));
|
||||||
|
NS_ABORT_IF_FALSE(webShellWin, "QI Failed!!!!");
|
||||||
|
webShellWin->GetPositionAndSize(&chromeX, &chromeY, &chromeWidth,
|
||||||
|
&chromeHeight);
|
||||||
|
|
||||||
float t2p;
|
float t2p;
|
||||||
cx->GetTwipsToPixels(&t2p);
|
cx->GetTwipsToPixels(&t2p);
|
||||||
|
|
|
@ -94,6 +94,7 @@
|
||||||
#include "nsITimer.h"
|
#include "nsITimer.h"
|
||||||
#include "nsIURL.h"
|
#include "nsIURL.h"
|
||||||
#include "nsIWebShell.h"
|
#include "nsIWebShell.h"
|
||||||
|
#include "nsIBaseWindow.h"
|
||||||
#include "nsIXMLContent.h"
|
#include "nsIXMLContent.h"
|
||||||
#include "nsIXMLElementFactory.h"
|
#include "nsIXMLElementFactory.h"
|
||||||
#include "nsIXULCommandDispatcher.h"
|
#include "nsIXULCommandDispatcher.h"
|
||||||
|
@ -2992,11 +2993,11 @@ nsXULDocument::SetProperty(JSContext *aContext, jsval aID, jsval *aVp)
|
||||||
|
|
||||||
if (! container) continue;
|
if (! container) continue;
|
||||||
|
|
||||||
nsCOMPtr<nsIWebShell> webshell = do_QueryInterface(container);
|
nsCOMPtr<nsIBaseWindow> webShellWin = do_QueryInterface(container);
|
||||||
if (! webshell) continue;
|
if(!webShellWin) continue;
|
||||||
|
|
||||||
rv = webshell->SetTitle(title.GetUnicode());
|
NS_ENSURE_SUCCESS(webShellWin->SetTitle(title.GetUnicode()),
|
||||||
if (NS_FAILED(rv)) return PR_FALSE;
|
PR_FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (PL_strcmp("location", s) == 0) {
|
else if (PL_strcmp("location", s) == 0) {
|
||||||
|
@ -3396,7 +3397,10 @@ nsXULDocument::StartLayout(void)
|
||||||
|
|
||||||
// Perform the resize
|
// Perform the resize
|
||||||
PRInt32 chromeX,chromeY,chromeWidth,chromeHeight;
|
PRInt32 chromeX,chromeY,chromeWidth,chromeHeight;
|
||||||
webShell->GetBounds(chromeX,chromeY,chromeWidth,chromeHeight);
|
nsCOMPtr<nsIBaseWindow> webShellWin(do_QueryInterface(webShell));
|
||||||
|
NS_ABORT_IF_FALSE(webShellWin, "QI Failed!!!!");
|
||||||
|
webShellWin->GetPositionAndSize(&chromeX, &chromeY, &chromeWidth,
|
||||||
|
&chromeHeight);
|
||||||
|
|
||||||
float t2p;
|
float t2p;
|
||||||
cx->GetTwipsToPixels(&t2p);
|
cx->GetTwipsToPixels(&t2p);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче