Bug 342093. Use GetPositionIgnoringScrolling where we can, now that it exists. r+sr=bzbarsky

This commit is contained in:
roc+%cs.cmu.edu 2006-06-20 21:13:05 +00:00
parent f56a5cbd3a
commit deaf468704

View File

@ -1007,13 +1007,10 @@ nsHTMLReflowState::CalculateHypotheticalBox(nsPresContext* aPresContext,
// everything is scrolled to (0,0).
cbOffset.MoveTo(0, 0);
do {
nsPoint curOffset = aContainingBlock->GetPosition();
aContainingBlock = aContainingBlock->GetParent();
NS_ASSERTION(aContainingBlock,
"Should hit cbrs->frame before we run off the frame tree!");
if (aContainingBlock->GetType() != nsLayoutAtoms::scrollFrame) {
cbOffset += curOffset;
}
cbOffset += aContainingBlock->GetPositionIgnoringScrolling();
aContainingBlock = aContainingBlock->GetParent();
} while (aContainingBlock != cbrs->frame);
} else {
cbOffset = aContainingBlock->GetOffsetTo(cbrs->frame);