deCOMify nsIPresShell::GetRootFrame. Change callers inside of gklayout to use FrameManager()->GetRootFrame() instead so that the call can be inlined. Bug 253889, r+sr=roc.
git-svn-id: svn://10.0.0.236/trunk@161637 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
16f0a79561
commit
ae9e02402a
@ -1700,7 +1700,7 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
|
||||
NS_ASSERTION(newAcc, "No root/doc accessible created");
|
||||
}
|
||||
|
||||
aPresShell->GetRootFrame(aFrameHint);
|
||||
*aFrameHint = aPresShell->GetRootFrame();
|
||||
NS_ADDREF(*aAccessible = newAcc );
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -418,7 +418,7 @@ nsIFrame* nsDocAccessible::GetFrame()
|
||||
|
||||
nsIFrame* root = nsnull;
|
||||
if (shell)
|
||||
shell->GetRootFrame(&root);
|
||||
root = shell->GetRootFrame();
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
@ -83,10 +83,9 @@ NS_IMETHODIMP nsHTMLTextAccessible::GetState(PRUint32 *aState)
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
|
||||
nsIFrame *frame = nsnull;
|
||||
// The root frame and all text frames in the document share the same
|
||||
// selection controller.
|
||||
shell->GetRootFrame(&frame);
|
||||
nsIFrame *frame = shell->GetRootFrame();
|
||||
if (frame) {
|
||||
nsCOMPtr<nsISelectionController> selCon;
|
||||
frame->GetSelectionController(shell->GetPresContext(),
|
||||
|
||||
@ -495,9 +495,8 @@ nsPrintEngine::GetSeqFrameAndCountPagesInternal(nsPrintObject* aPO,
|
||||
|
||||
// Finds the SimplePageSequencer frame
|
||||
// in PP mPrtPreview->mPrintObject->mSeqFrame is null
|
||||
nsIFrame* curFrame;
|
||||
aSeqFrame = nsnull;
|
||||
aPO->mPresShell->GetRootFrame(&curFrame);
|
||||
nsIFrame *curFrame = aPO->mPresShell->FrameManager()->GetRootFrame();
|
||||
while (curFrame != nsnull) {
|
||||
nsIPageSequenceFrame * sqf = nsnull;
|
||||
if (NS_SUCCEEDED(CallQueryInterface(curFrame, &sqf)) && sqf) {
|
||||
@ -2041,8 +2040,7 @@ void nsPrintEngine::CheckForHiddenFrameSetFrames()
|
||||
for (PRInt32 i=0;i<mPrt->mPrintDocList->Count();i++) {
|
||||
nsPrintObject* po = (nsPrintObject*)mPrt->mPrintDocList->ElementAt(i);
|
||||
NS_ASSERTION(po, "nsPrintObject can't be null!");
|
||||
nsIFrame* frame;
|
||||
po->mDisplayPresShell->GetRootFrame(&frame);
|
||||
nsIFrame* frame = po->mDisplayPresShell->FrameManager()->GetRootFrame();
|
||||
if (frame && frame->GetSize().height == 0) {
|
||||
// set this PO and its children to not print and be hidden
|
||||
SetPrintPO(po, PR_FALSE, PR_TRUE, eSetPrintFlag | eSetHiddenFlag);
|
||||
@ -2806,8 +2804,8 @@ nsPrintEngine::ReflowPrintObject(nsPrintObject * aPO, PRBool aDoCalcShrink)
|
||||
// Dump all the frames and view to a a file
|
||||
FILE * fd = fopen(filename, "w");
|
||||
if (fd) {
|
||||
nsIFrame *theRootFrame;
|
||||
aPO->mPresShell->GetRootFrame(&theRootFrame);
|
||||
nsIFrame *theRootFrame =
|
||||
aPO->mPresShell->FrameManager()->GetRootFrame();
|
||||
fprintf(fd, "Title: %s\n", docStr?docStr:"");
|
||||
fprintf(fd, "URL: %s\n", urlStr?urlStr:"");
|
||||
fprintf(fd, "--------------- Frames ----------------\n");
|
||||
@ -3208,8 +3206,7 @@ nsPrintEngine::DoPrint(nsPrintObject * aPO, PRBool aDoSyncPrinting, PRBool& aDon
|
||||
#ifdef NS_DEBUG
|
||||
// output the regression test
|
||||
nsIFrameDebug* fdbg;
|
||||
nsIFrame* root;
|
||||
poPresShell->GetRootFrame(&root);
|
||||
nsIFrame* root = poPresShell->FrameManager()->GetRootFrame();
|
||||
|
||||
if (NS_SUCCEEDED(CallQueryInterface(root, &fdbg))) {
|
||||
fdbg->DumpRegressionData(poPresContext, mPrt->mDebugFilePtr, 0, PR_TRUE);
|
||||
@ -3217,8 +3214,7 @@ nsPrintEngine::DoPrint(nsPrintObject * aPO, PRBool aDoSyncPrinting, PRBool& aDon
|
||||
fclose(mPrt->mDebugFilePtr);
|
||||
#endif
|
||||
} else {
|
||||
nsIFrame* rootFrame;
|
||||
poPresShell->GetRootFrame(&rootFrame);
|
||||
nsIFrame* rootFrame = poPresShell->FrameManager()->GetRootFrame();
|
||||
|
||||
#ifdef EXTENDED_DEBUG_PRINTING
|
||||
if (aPO->IsPrintable()) {
|
||||
@ -4666,8 +4662,7 @@ static void RootFrameList(nsPresContext* aPresContext, FILE* out, PRInt32 aInden
|
||||
|
||||
nsIPresShell *shell = aPresContext->GetPresShell();
|
||||
if (shell) {
|
||||
nsIFrame* frame;
|
||||
shell->GetRootFrame(&frame);
|
||||
nsIFrame* frame = shell->FrameManager()->GetRootFrame();
|
||||
if (frame) {
|
||||
nsIFrameDebug* debugFrame;
|
||||
nsresult rv = CallQueryInterface(frame, &debugFrame);
|
||||
@ -4833,7 +4828,7 @@ static void DumpPrintObjectsList(nsVoidArray * aDocList)
|
||||
NS_ASSERTION(po, "nsPrintObject can't be null!");
|
||||
nsIFrame* rootFrame = nsnull;
|
||||
if (po->mPresShell) {
|
||||
po->mPresShell->GetRootFrame(&rootFrame);
|
||||
rootFrame = po->mPresShell->FrameManager()->GetRootFrame();
|
||||
while (rootFrame != nsnull) {
|
||||
nsIPageSequenceFrame * sqf = nsnull;
|
||||
if (NS_SUCCEEDED(CallQueryInterface(rootFrame, &sqf))) {
|
||||
@ -4925,7 +4920,7 @@ static void DumpPrintObjectsTreeLayout(nsPrintObject * aPO,
|
||||
if (fd) {
|
||||
nsIFrame* rootFrame = nsnull;
|
||||
if (aPO->mPresShell) {
|
||||
aPO->mPresShell->GetRootFrame(&rootFrame);
|
||||
rootFrame = aPO->mPresShell->FrameManager()->GetRootFrame();
|
||||
}
|
||||
for (PRInt32 k=0;k<aLevel;k++) fprintf(fd, " ");
|
||||
fprintf(fd, "%s %p %p %p %p %d %d,%d,%d,%d\n", types[aPO->mFrameType], aPO, aPO->mWebShell.get(), aPO->mSeqFrame,
|
||||
|
||||
@ -107,8 +107,7 @@ void DebugList(nsIDOMHTMLTableElement* aTable) {
|
||||
}
|
||||
nsIPresShell *shell = doc->GetShellAt(0);
|
||||
if (shell) {
|
||||
nsIFrame* rootFrame;
|
||||
shell->GetRootFrame(rootFrame);
|
||||
nsIFrame* rootFrame = shell->FrameManager()->GetRootFrame();
|
||||
if (rootFrame) {
|
||||
rootFrame->List(stdout, 0);
|
||||
}
|
||||
|
||||
@ -426,8 +426,7 @@ DumpFramesRecur(nsIDocShell* aDocShell, FILE* out)
|
||||
fprintf(out, "webshell=%p \n", NS_STATIC_CAST(void*, aDocShell));
|
||||
nsCOMPtr<nsIPresShell> shell(pres_shell(aDocShell));
|
||||
if (shell) {
|
||||
nsIFrame* root;
|
||||
shell->GetRootFrame(&root);
|
||||
nsIFrame* root = shell->GetRootFrame();
|
||||
if (root) {
|
||||
nsIFrameDebug* fdbg;
|
||||
if (NS_SUCCEEDED(CallQueryInterface(root, &fdbg))) {
|
||||
@ -524,8 +523,7 @@ nsLayoutDebuggingTools::DumpStyleContexts()
|
||||
FILE *out = stdout;
|
||||
nsCOMPtr<nsIPresShell> shell(pres_shell(mDocShell));
|
||||
if (shell) {
|
||||
nsIFrame* root;
|
||||
shell->GetRootFrame(&root);
|
||||
nsIFrame* root = shell->GetRootFrame();
|
||||
if (!root) {
|
||||
fputs("null root frame\n", out);
|
||||
} else {
|
||||
|
||||
@ -108,8 +108,7 @@ nsRegressionTester::DumpFrameModel(nsIDOMWindow *aWindowToDump, nsILocalFile *aD
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
docShell->GetPresShell(getter_AddRefs(presShell));
|
||||
|
||||
nsIFrame* root;
|
||||
presShell->GetRootFrame(&root);
|
||||
nsIFrame* root = presShell->GetRootFrame();
|
||||
|
||||
nsIFrameDebug* fdbg;
|
||||
rv = CallQueryInterface(root, &fdbg);
|
||||
|
||||
@ -2509,8 +2509,7 @@ nsTypeAheadFind::GetSelection(nsIPresShell *aPresShell,
|
||||
|
||||
nsPresContext *presContext = aPresShell->GetPresContext();
|
||||
|
||||
nsIFrame *frame = nsnull;
|
||||
aPresShell->GetRootFrame(&frame);
|
||||
nsIFrame *frame = aPresShell->GetRootFrame();
|
||||
|
||||
if (presContext && frame) {
|
||||
frame->GetSelectionController(presContext, aSelCon);
|
||||
|
||||
@ -10139,8 +10139,7 @@ nsCSSFrameConstructor::AttributeChanged(nsPresContext* aPresContext,
|
||||
if (aAttribute == nsXULAtoms::tooltiptext ||
|
||||
aAttribute == nsXULAtoms::tooltip)
|
||||
{
|
||||
nsIFrame* rootFrame = nsnull;
|
||||
shell->GetRootFrame(&rootFrame);
|
||||
nsIFrame* rootFrame = shell->FrameManager()->GetRootFrame();
|
||||
if (rootFrame)
|
||||
rootFrame = rootFrame->GetFirstChild(nsnull);
|
||||
nsCOMPtr<nsIRootBox> rootBox(do_QueryInterface(rootFrame));
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
#include "nsRect.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsFrameManager.h"
|
||||
#include "nsStyleContext.h"
|
||||
#include "nsIScrollableView.h"
|
||||
#include "nsLayoutAtoms.h"
|
||||
@ -2978,8 +2979,8 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext,
|
||||
nsIView* viewportView = nsnull;
|
||||
nsRect viewportArea;
|
||||
|
||||
nsIFrame* rootFrame;
|
||||
aPresContext->PresShell()->GetRootFrame(&rootFrame);
|
||||
nsIFrame* rootFrame =
|
||||
aPresContext->PresShell()->FrameManager()->GetRootFrame();
|
||||
NS_ASSERTION(rootFrame, "no root frame");
|
||||
|
||||
if (aPresContext->IsPaginated()) {
|
||||
|
||||
@ -274,7 +274,12 @@ public:
|
||||
*/
|
||||
NS_IMETHOD StyleChangeReflow() = 0;
|
||||
|
||||
NS_IMETHOD GetRootFrame(nsIFrame** aFrame) const = 0;
|
||||
/**
|
||||
* This calls through to the frame manager to get the root frame.
|
||||
* Callers inside of gklayout should use FrameManager()->GetRootFrame()
|
||||
* instead, as it's more efficient.
|
||||
*/
|
||||
virtual NS_HIDDEN_(nsIFrame*) GetRootFrame() const;
|
||||
|
||||
/**
|
||||
* Returns the page sequence frame associated with the frame hierarchy.
|
||||
|
||||
@ -877,8 +877,7 @@ IncrementalReflow::Dispatch(nsPresContext *aPresContext,
|
||||
nsReflowPath *path = NS_STATIC_CAST(nsReflowPath *, mRoots[i]);
|
||||
nsIFrame *first = path->mFrame;
|
||||
|
||||
nsIFrame* root;
|
||||
aPresContext->PresShell()->GetRootFrame(&root);
|
||||
nsIFrame* root = aPresContext->PresShell()->FrameManager()->GetRootFrame();
|
||||
|
||||
first->WillReflow(aPresContext);
|
||||
nsContainerFrame::PositionFrameView(aPresContext, first);
|
||||
@ -1102,7 +1101,6 @@ public:
|
||||
NS_IMETHOD InitialReflow(nscoord aWidth, nscoord aHeight);
|
||||
NS_IMETHOD ResizeReflow(nscoord aWidth, nscoord aHeight);
|
||||
NS_IMETHOD StyleChangeReflow();
|
||||
NS_IMETHOD GetRootFrame(nsIFrame** aFrame) const;
|
||||
NS_IMETHOD GetPageSequenceFrame(nsIPageSequenceFrame** aResult) const;
|
||||
NS_IMETHOD GetPrimaryFrameFor(nsIContent* aContent,
|
||||
nsIFrame** aPrimaryFrame) const;
|
||||
@ -3401,11 +3399,10 @@ PresShell::StyleChangeReflow()
|
||||
return NS_OK; //XXX this needs to be real. MMP
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PresShell::GetRootFrame(nsIFrame** aResult) const
|
||||
nsIFrame*
|
||||
nsIPresShell::GetRootFrame() const
|
||||
{
|
||||
*aResult = FrameManager()->GetRootFrame();
|
||||
return NS_OK;
|
||||
return FrameManager()->GetRootFrame();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@ -6533,8 +6530,7 @@ PresShell::Observe(nsISupports* aSubject,
|
||||
{
|
||||
#ifdef MOZ_XUL
|
||||
if (!nsCRT::strcmp(aTopic, "chrome-flush-skin-caches")) {
|
||||
nsIFrame *rootFrame;
|
||||
GetRootFrame(&rootFrame);
|
||||
nsIFrame *rootFrame = FrameManager()->GetRootFrame();
|
||||
// Need to null-check because "chrome-flush-skin-caches" can happen
|
||||
// at interesting times during startup.
|
||||
if (rootFrame) {
|
||||
@ -7028,8 +7024,7 @@ PresShell::VerifyIncrementalReflow()
|
||||
// Now that the document has been reflowed, use its frame tree to
|
||||
// compare against our frame tree.
|
||||
nsIFrame* root1 = FrameManager()->GetRootFrame();
|
||||
nsIFrame* root2;
|
||||
sh->GetRootFrame(&root2);
|
||||
nsIFrame* root2 = sh->FrameManager()->GetRootFrame();
|
||||
PRBool ok = CompareTrees(mPresContext, root1, cx, root2);
|
||||
if (!ok && (VERIFY_REFLOW_NOISY & gVerifyReflowFlags)) {
|
||||
printf("Verify reflow failed, primary tree:\n");
|
||||
@ -7640,8 +7635,7 @@ void ReflowCountMgr::DoIndiTotalsTree()
|
||||
printf("------------------------------------------------\n");
|
||||
|
||||
if (mPresShell) {
|
||||
nsIFrame * rootFrame;
|
||||
mPresShell->GetRootFrame(&rootFrame);
|
||||
nsIFrame * rootFrame = mPresShell->FrameManager()->GetRootFrame();
|
||||
RecurseIndiTotals(mPresContext, mIndiFrameCounts, rootFrame, 0);
|
||||
printf("------------------------------------------------\n");
|
||||
printf("-- Individual Counts of Frames not in Root Tree\n");
|
||||
|
||||
@ -274,7 +274,12 @@ public:
|
||||
*/
|
||||
NS_IMETHOD StyleChangeReflow() = 0;
|
||||
|
||||
NS_IMETHOD GetRootFrame(nsIFrame** aFrame) const = 0;
|
||||
/**
|
||||
* This calls through to the frame manager to get the root frame.
|
||||
* Callers inside of gklayout should use FrameManager()->GetRootFrame()
|
||||
* instead, as it's more efficient.
|
||||
*/
|
||||
virtual NS_HIDDEN_(nsIFrame*) GetRootFrame() const;
|
||||
|
||||
/**
|
||||
* Returns the page sequence frame associated with the frame hierarchy.
|
||||
|
||||
@ -222,8 +222,7 @@ nsIFrameDebug::RootFrameList(nsPresContext* aPresContext, FILE* out, PRInt32 aIn
|
||||
|
||||
nsIPresShell *shell = aPresContext->GetPresShell();
|
||||
if (nsnull != shell) {
|
||||
nsIFrame* frame;
|
||||
shell->GetRootFrame(&frame);
|
||||
nsIFrame* frame = shell->FrameManager()->GetRootFrame();
|
||||
if(nsnull != frame) {
|
||||
nsIFrameDebug* debugFrame;
|
||||
nsresult rv;
|
||||
|
||||
@ -222,8 +222,7 @@ nsIFrameDebug::RootFrameList(nsPresContext* aPresContext, FILE* out, PRInt32 aIn
|
||||
|
||||
nsIPresShell *shell = aPresContext->GetPresShell();
|
||||
if (nsnull != shell) {
|
||||
nsIFrame* frame;
|
||||
shell->GetRootFrame(&frame);
|
||||
nsIFrame* frame = shell->FrameManager()->GetRootFrame();
|
||||
if(nsnull != frame) {
|
||||
nsIFrameDebug* debugFrame;
|
||||
nsresult rv;
|
||||
|
||||
@ -877,8 +877,7 @@ IncrementalReflow::Dispatch(nsPresContext *aPresContext,
|
||||
nsReflowPath *path = NS_STATIC_CAST(nsReflowPath *, mRoots[i]);
|
||||
nsIFrame *first = path->mFrame;
|
||||
|
||||
nsIFrame* root;
|
||||
aPresContext->PresShell()->GetRootFrame(&root);
|
||||
nsIFrame* root = aPresContext->PresShell()->FrameManager()->GetRootFrame();
|
||||
|
||||
first->WillReflow(aPresContext);
|
||||
nsContainerFrame::PositionFrameView(aPresContext, first);
|
||||
@ -1102,7 +1101,6 @@ public:
|
||||
NS_IMETHOD InitialReflow(nscoord aWidth, nscoord aHeight);
|
||||
NS_IMETHOD ResizeReflow(nscoord aWidth, nscoord aHeight);
|
||||
NS_IMETHOD StyleChangeReflow();
|
||||
NS_IMETHOD GetRootFrame(nsIFrame** aFrame) const;
|
||||
NS_IMETHOD GetPageSequenceFrame(nsIPageSequenceFrame** aResult) const;
|
||||
NS_IMETHOD GetPrimaryFrameFor(nsIContent* aContent,
|
||||
nsIFrame** aPrimaryFrame) const;
|
||||
@ -3401,11 +3399,10 @@ PresShell::StyleChangeReflow()
|
||||
return NS_OK; //XXX this needs to be real. MMP
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PresShell::GetRootFrame(nsIFrame** aResult) const
|
||||
nsIFrame*
|
||||
nsIPresShell::GetRootFrame() const
|
||||
{
|
||||
*aResult = FrameManager()->GetRootFrame();
|
||||
return NS_OK;
|
||||
return FrameManager()->GetRootFrame();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@ -6533,8 +6530,7 @@ PresShell::Observe(nsISupports* aSubject,
|
||||
{
|
||||
#ifdef MOZ_XUL
|
||||
if (!nsCRT::strcmp(aTopic, "chrome-flush-skin-caches")) {
|
||||
nsIFrame *rootFrame;
|
||||
GetRootFrame(&rootFrame);
|
||||
nsIFrame *rootFrame = FrameManager()->GetRootFrame();
|
||||
// Need to null-check because "chrome-flush-skin-caches" can happen
|
||||
// at interesting times during startup.
|
||||
if (rootFrame) {
|
||||
@ -7028,8 +7024,7 @@ PresShell::VerifyIncrementalReflow()
|
||||
// Now that the document has been reflowed, use its frame tree to
|
||||
// compare against our frame tree.
|
||||
nsIFrame* root1 = FrameManager()->GetRootFrame();
|
||||
nsIFrame* root2;
|
||||
sh->GetRootFrame(&root2);
|
||||
nsIFrame* root2 = sh->FrameManager()->GetRootFrame();
|
||||
PRBool ok = CompareTrees(mPresContext, root1, cx, root2);
|
||||
if (!ok && (VERIFY_REFLOW_NOISY & gVerifyReflowFlags)) {
|
||||
printf("Verify reflow failed, primary tree:\n");
|
||||
@ -7640,8 +7635,7 @@ void ReflowCountMgr::DoIndiTotalsTree()
|
||||
printf("------------------------------------------------\n");
|
||||
|
||||
if (mPresShell) {
|
||||
nsIFrame * rootFrame;
|
||||
mPresShell->GetRootFrame(&rootFrame);
|
||||
nsIFrame * rootFrame = mPresShell->FrameManager()->GetRootFrame();
|
||||
RecurseIndiTotals(mPresContext, mIndiFrameCounts, rootFrame, 0);
|
||||
printf("------------------------------------------------\n");
|
||||
printf("-- Individual Counts of Frames not in Root Tree\n");
|
||||
|
||||
@ -10139,8 +10139,7 @@ nsCSSFrameConstructor::AttributeChanged(nsPresContext* aPresContext,
|
||||
if (aAttribute == nsXULAtoms::tooltiptext ||
|
||||
aAttribute == nsXULAtoms::tooltip)
|
||||
{
|
||||
nsIFrame* rootFrame = nsnull;
|
||||
shell->GetRootFrame(&rootFrame);
|
||||
nsIFrame* rootFrame = shell->FrameManager()->GetRootFrame();
|
||||
if (rootFrame)
|
||||
rootFrame = rootFrame->GetFirstChild(nsnull);
|
||||
nsCOMPtr<nsIRootBox> rootBox(do_QueryInterface(rootFrame));
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
#include "nsRect.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsFrameManager.h"
|
||||
#include "nsStyleContext.h"
|
||||
#include "nsIScrollableView.h"
|
||||
#include "nsLayoutAtoms.h"
|
||||
@ -2978,8 +2979,8 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext,
|
||||
nsIView* viewportView = nsnull;
|
||||
nsRect viewportArea;
|
||||
|
||||
nsIFrame* rootFrame;
|
||||
aPresContext->PresShell()->GetRootFrame(&rootFrame);
|
||||
nsIFrame* rootFrame =
|
||||
aPresContext->PresShell()->FrameManager()->GetRootFrame();
|
||||
NS_ASSERTION(rootFrame, "no root frame");
|
||||
|
||||
if (aPresContext->IsPaginated()) {
|
||||
|
||||
@ -495,9 +495,8 @@ nsPrintEngine::GetSeqFrameAndCountPagesInternal(nsPrintObject* aPO,
|
||||
|
||||
// Finds the SimplePageSequencer frame
|
||||
// in PP mPrtPreview->mPrintObject->mSeqFrame is null
|
||||
nsIFrame* curFrame;
|
||||
aSeqFrame = nsnull;
|
||||
aPO->mPresShell->GetRootFrame(&curFrame);
|
||||
nsIFrame *curFrame = aPO->mPresShell->FrameManager()->GetRootFrame();
|
||||
while (curFrame != nsnull) {
|
||||
nsIPageSequenceFrame * sqf = nsnull;
|
||||
if (NS_SUCCEEDED(CallQueryInterface(curFrame, &sqf)) && sqf) {
|
||||
@ -2041,8 +2040,7 @@ void nsPrintEngine::CheckForHiddenFrameSetFrames()
|
||||
for (PRInt32 i=0;i<mPrt->mPrintDocList->Count();i++) {
|
||||
nsPrintObject* po = (nsPrintObject*)mPrt->mPrintDocList->ElementAt(i);
|
||||
NS_ASSERTION(po, "nsPrintObject can't be null!");
|
||||
nsIFrame* frame;
|
||||
po->mDisplayPresShell->GetRootFrame(&frame);
|
||||
nsIFrame* frame = po->mDisplayPresShell->FrameManager()->GetRootFrame();
|
||||
if (frame && frame->GetSize().height == 0) {
|
||||
// set this PO and its children to not print and be hidden
|
||||
SetPrintPO(po, PR_FALSE, PR_TRUE, eSetPrintFlag | eSetHiddenFlag);
|
||||
@ -2806,8 +2804,8 @@ nsPrintEngine::ReflowPrintObject(nsPrintObject * aPO, PRBool aDoCalcShrink)
|
||||
// Dump all the frames and view to a a file
|
||||
FILE * fd = fopen(filename, "w");
|
||||
if (fd) {
|
||||
nsIFrame *theRootFrame;
|
||||
aPO->mPresShell->GetRootFrame(&theRootFrame);
|
||||
nsIFrame *theRootFrame =
|
||||
aPO->mPresShell->FrameManager()->GetRootFrame();
|
||||
fprintf(fd, "Title: %s\n", docStr?docStr:"");
|
||||
fprintf(fd, "URL: %s\n", urlStr?urlStr:"");
|
||||
fprintf(fd, "--------------- Frames ----------------\n");
|
||||
@ -3208,8 +3206,7 @@ nsPrintEngine::DoPrint(nsPrintObject * aPO, PRBool aDoSyncPrinting, PRBool& aDon
|
||||
#ifdef NS_DEBUG
|
||||
// output the regression test
|
||||
nsIFrameDebug* fdbg;
|
||||
nsIFrame* root;
|
||||
poPresShell->GetRootFrame(&root);
|
||||
nsIFrame* root = poPresShell->FrameManager()->GetRootFrame();
|
||||
|
||||
if (NS_SUCCEEDED(CallQueryInterface(root, &fdbg))) {
|
||||
fdbg->DumpRegressionData(poPresContext, mPrt->mDebugFilePtr, 0, PR_TRUE);
|
||||
@ -3217,8 +3214,7 @@ nsPrintEngine::DoPrint(nsPrintObject * aPO, PRBool aDoSyncPrinting, PRBool& aDon
|
||||
fclose(mPrt->mDebugFilePtr);
|
||||
#endif
|
||||
} else {
|
||||
nsIFrame* rootFrame;
|
||||
poPresShell->GetRootFrame(&rootFrame);
|
||||
nsIFrame* rootFrame = poPresShell->FrameManager()->GetRootFrame();
|
||||
|
||||
#ifdef EXTENDED_DEBUG_PRINTING
|
||||
if (aPO->IsPrintable()) {
|
||||
@ -4666,8 +4662,7 @@ static void RootFrameList(nsPresContext* aPresContext, FILE* out, PRInt32 aInden
|
||||
|
||||
nsIPresShell *shell = aPresContext->GetPresShell();
|
||||
if (shell) {
|
||||
nsIFrame* frame;
|
||||
shell->GetRootFrame(&frame);
|
||||
nsIFrame* frame = shell->FrameManager()->GetRootFrame();
|
||||
if (frame) {
|
||||
nsIFrameDebug* debugFrame;
|
||||
nsresult rv = CallQueryInterface(frame, &debugFrame);
|
||||
@ -4833,7 +4828,7 @@ static void DumpPrintObjectsList(nsVoidArray * aDocList)
|
||||
NS_ASSERTION(po, "nsPrintObject can't be null!");
|
||||
nsIFrame* rootFrame = nsnull;
|
||||
if (po->mPresShell) {
|
||||
po->mPresShell->GetRootFrame(&rootFrame);
|
||||
rootFrame = po->mPresShell->FrameManager()->GetRootFrame();
|
||||
while (rootFrame != nsnull) {
|
||||
nsIPageSequenceFrame * sqf = nsnull;
|
||||
if (NS_SUCCEEDED(CallQueryInterface(rootFrame, &sqf))) {
|
||||
@ -4925,7 +4920,7 @@ static void DumpPrintObjectsTreeLayout(nsPrintObject * aPO,
|
||||
if (fd) {
|
||||
nsIFrame* rootFrame = nsnull;
|
||||
if (aPO->mPresShell) {
|
||||
aPO->mPresShell->GetRootFrame(&rootFrame);
|
||||
rootFrame = aPO->mPresShell->FrameManager()->GetRootFrame();
|
||||
}
|
||||
for (PRInt32 k=0;k<aLevel;k++) fprintf(fd, " ");
|
||||
fprintf(fd, "%s %p %p %p %p %d %d,%d,%d,%d\n", types[aPO->mFrameType], aPO, aPO->mWebShell.get(), aPO->mSeqFrame,
|
||||
|
||||
@ -58,6 +58,7 @@
|
||||
#include "nsIDOMScreen.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsFrameManager.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDeviceContext.h"
|
||||
#include "nsRect.h"
|
||||
@ -83,8 +84,8 @@ const PRInt32 kMaxZ = 0x7fffffff; //XXX: Shouldn't there be a define somewhere f
|
||||
static nsIPopupSetFrame*
|
||||
GetPopupSetFrame(nsPresContext* aPresContext)
|
||||
{
|
||||
nsIFrame* rootFrame;
|
||||
aPresContext->PresShell()->GetRootFrame(&rootFrame);
|
||||
nsIFrame* rootFrame =
|
||||
aPresContext->PresShell()->FrameManager()->GetRootFrame();
|
||||
if (!rootFrame)
|
||||
return nsnull;
|
||||
|
||||
|
||||
@ -42,6 +42,7 @@
|
||||
#include "nsIRootBox.h"
|
||||
#include "nsBoxObject.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsFrameManager.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
@ -103,8 +104,7 @@ nsPopupBoxObject::HidePopup()
|
||||
if (!ourFrame)
|
||||
return NS_OK;
|
||||
|
||||
nsIFrame* rootFrame;
|
||||
mPresShell->GetRootFrame(&rootFrame);
|
||||
nsIFrame* rootFrame = mPresShell->FrameManager()->GetRootFrame();
|
||||
if (!rootFrame)
|
||||
return NS_OK;
|
||||
|
||||
@ -138,8 +138,7 @@ nsPopupBoxObject::ShowPopup(nsIDOMElement* aSrcContent,
|
||||
const PRUnichar *aPopupType, const PRUnichar *anAnchorAlignment,
|
||||
const PRUnichar *aPopupAlignment)
|
||||
{
|
||||
nsIFrame* rootFrame;
|
||||
mPresShell->GetRootFrame(&rootFrame);
|
||||
nsIFrame* rootFrame = mPresShell->FrameManager()->GetRootFrame();
|
||||
if (!rootFrame)
|
||||
return NS_OK;
|
||||
|
||||
|
||||
@ -2432,8 +2432,7 @@ DumpFramesRecurse(nsIDocShell* aDocShell, FILE* out, nsString *aFilterName)
|
||||
fprintf(out, "webshell=%p \n", aDocShell);
|
||||
nsIPresShell* shell = GetPresShellFor(aDocShell);
|
||||
if (nsnull != shell) {
|
||||
nsIFrame* root;
|
||||
shell->GetRootFrame(&root);
|
||||
nsIFrame* root = shell->GetRootFrame();
|
||||
if (nsnull != root) {
|
||||
nsIFrameDebug* fdbg;
|
||||
if (NS_SUCCEEDED(CallQueryInterface(root, &fdbg))) {
|
||||
@ -2530,8 +2529,7 @@ nsBrowserWindow::DumpStyleContexts(FILE* out)
|
||||
{
|
||||
nsCOMPtr<nsIPresShell> shell = dont_AddRef(GetPresShell());
|
||||
if (shell) {
|
||||
nsIFrame* root;
|
||||
shell->GetRootFrame(&root);
|
||||
nsIFrame* root = shell->GetRootFrame();
|
||||
shell->ListStyleContexts(root, out);
|
||||
} else {
|
||||
fputs("null pres shell\n", out);
|
||||
|
||||
@ -286,8 +286,7 @@ nsWebCrawler::DumpRegressionData()
|
||||
}
|
||||
}
|
||||
else {
|
||||
nsIFrame* root;
|
||||
shell->GetRootFrame(&root);
|
||||
nsIFrame* root = shell->GetRootFrame();
|
||||
if (nsnull != root) {
|
||||
nsPresContext *presContext = shell->GetPresContext();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user