From e7ac88825428461bd9134dd9f27dbb19cfa4fd94 Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Tue, 20 Jun 2006 21:13:05 +0000 Subject: [PATCH] Bug 342093. Use GetPositionIgnoringScrolling where we can, now that it exists. r+sr=bzbarsky git-svn-id: svn://10.0.0.236/trunk@200462 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsHTMLReflowState.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mozilla/layout/generic/nsHTMLReflowState.cpp b/mozilla/layout/generic/nsHTMLReflowState.cpp index f8fbd039782..8d3c1f77ec1 100644 --- a/mozilla/layout/generic/nsHTMLReflowState.cpp +++ b/mozilla/layout/generic/nsHTMLReflowState.cpp @@ -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);