Bug 376662. Make nsIFrame::GetOffsetTo not explicitly use views. r+sr=bzbarsky

This commit is contained in:
Robert O'Callahan
2008-09-04 09:35:52 +12:00
parent ac2fe824c8
commit e87222a463
17 changed files with 68 additions and 127 deletions

View File

@@ -990,7 +990,8 @@ nsGenericElement::GetOffsetRect(nsRect& aRect, nsIContent** aOffsetParent)
// It doesn't really matter what we use as aRelativeTo here, since
// we only care about the size. Using 'parent' might make things
// a bit faster by speeding up the internal GetOffsetTo operations.
nsRect rcFrame = nsLayoutUtils::GetAllInFlowRectsUnion(frame, nsnull);
nsIFrame* parent = frame->GetParent() ? frame->GetParent() : frame;
nsRect rcFrame = nsLayoutUtils::GetAllInFlowRectsUnion(frame, parent);
aRect.width = nsPresContext::AppUnitsToIntCSSPixels(rcFrame.width);
aRect.height = nsPresContext::AppUnitsToIntCSSPixels(rcFrame.height);
}