Bug 500882 part 4. Switch content module to using the new GetPrimaryFrame API. r=smaug, sr=roc

This commit is contained in:
Boris Zbarsky
2009-12-24 16:20:05 -05:00
parent 2bcca10546
commit 5a874cb49b
19 changed files with 166 additions and 321 deletions

View File

@@ -747,8 +747,8 @@ nsFrameLoader::SwapWithOtherLoader(nsFrameLoader* aOther,
FirePageHideEvent(ourTreeItem, ourChromeEventHandler);
FirePageHideEvent(otherTreeItem, otherChromeEventHandler);
nsIFrame* ourFrame = ourShell->GetPrimaryFrameFor(ourContent);
nsIFrame* otherFrame = otherShell->GetPrimaryFrameFor(otherContent);
nsIFrame* ourFrame = ourContent->GetPrimaryFrame();
nsIFrame* otherFrame = otherContent->GetPrimaryFrame();
if (!ourFrame || !otherFrame) {
mInSwap = aOther->mInSwap = PR_FALSE;
FirePageShowEvent(ourTreeItem, ourChromeEventHandler, PR_TRUE);
@@ -826,8 +826,8 @@ nsFrameLoader::SwapWithOtherLoader(nsFrameLoader* aOther,
}
// We shouldn't have changed frames, but be really careful about it
if (ourFrame == ourShell->GetPrimaryFrameFor(ourContent) &&
otherFrame == otherShell->GetPrimaryFrameFor(otherContent)) {
if (ourFrame == ourContent->GetPrimaryFrame() &&
otherFrame == otherContent->GetPrimaryFrame()) {
ourFrameFrame->EndSwapDocShells(otherFrame);
}