Introduce a GetPrimaryShell() API on nsIDocument. Convert existing callers of

GetShellAt(0) to using this API.  Bug 378780.  API introduction part by me,
r+sr=jst.  Mass-changes done by taras using squash, r+sr=me


git-svn-id: svn://10.0.0.236/trunk@225416 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2007-05-01 22:24:25 +00:00
parent a14d456f30
commit d2d337437c
71 changed files with 129 additions and 120 deletions

View File

@@ -651,7 +651,7 @@ nsSpatialNavigation::handleMove(int direction)
if (!doc)
return NS_ERROR_FAILURE;
/* nsIPresShell *presShell = doc->GetShellAt(0);
/* nsIPresShell *presShell = doc->GetPrimaryShell();
nsIFrame* cframe = presShell->GetPrimaryFrameFor(c);
@@ -679,7 +679,7 @@ nsSpatialNavigation::handleMove(int direction)
contentWindow->GetDocument(getter_AddRefs(domDoc));
nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc);
nsIPresShell *shell = doc->GetShellAt(0);
nsIPresShell *shell = doc->GetPrimaryShell();
if (!shell) return NS_OK;
presContext = shell->GetPresContext();
@@ -706,7 +706,7 @@ nsSpatialNavigation::handleMove(int direction)
subdocWindow->GetDocument(getter_AddRefs(subdomdoc));
if (!subdoc) return NS_OK;
nsIPresShell *subdocShell = subdoc->GetShellAt(0);
nsIPresShell *subdocShell = subdoc->GetPrimaryShell();
if (!subdocShell) return NS_OK;
nsPresContext *subdocPresContext = subdocShell->GetPresContext();
@@ -856,7 +856,7 @@ nsSpatialNavigation::getPresContext(nsIContent* content)
if (!doc) return nsnull;
// the only case where there could be more shells in printpreview
nsIPresShell *shell = doc->GetShellAt(0);
nsIPresShell *shell = doc->GetPrimaryShell();
if (!shell) return nsnull;
nsPresContext *presContext = shell->GetPresContext();