From 55dab83c6b8f2faffe1d836ddddb54a801f1f351 Mon Sep 17 00:00:00 2001 From: "kjh-5727%comcast.net" Date: Sun, 22 Aug 2004 20:24:16 +0000 Subject: [PATCH] Bug 256436 - Backing out the patch from bug 255584 due to a regression. Requested by roc. --- layout/generic/nsGfxScrollFrame.cpp | 5 +---- layout/html/base/src/nsGfxScrollFrame.cpp | 5 +---- layout/xul/base/src/nsBoxToBlockAdaptor.cpp | 14 +++++--------- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index e4ccfcdcf551..c33f6f3272c1 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -2132,14 +2132,11 @@ nsGfxScrollFrameInner::GetScrolledSize(nsPresContext* aPresContext, mScrollAreaBox->GetChildBox(&child); nsIFrame* frame; child->GetFrame(&frame); - nsIView* view = frame->GetView(); NS_ASSERTION(view,"Scrolled frame must have a view!!!"); nsRect rect = view->GetBounds(); - // forget about the stuff above or to the left of the origin, since - // we can't currently scroll there anyway. - nsSize size(rect.XMost(), rect.YMost()); + nsSize size(rect.width, rect.height); nsBox::AddMargin(child, size); nsBox::AddBorderAndPadding(mScrollAreaBox, size); diff --git a/layout/html/base/src/nsGfxScrollFrame.cpp b/layout/html/base/src/nsGfxScrollFrame.cpp index e4ccfcdcf551..c33f6f3272c1 100644 --- a/layout/html/base/src/nsGfxScrollFrame.cpp +++ b/layout/html/base/src/nsGfxScrollFrame.cpp @@ -2132,14 +2132,11 @@ nsGfxScrollFrameInner::GetScrolledSize(nsPresContext* aPresContext, mScrollAreaBox->GetChildBox(&child); nsIFrame* frame; child->GetFrame(&frame); - nsIView* view = frame->GetView(); NS_ASSERTION(view,"Scrolled frame must have a view!!!"); nsRect rect = view->GetBounds(); - // forget about the stuff above or to the left of the origin, since - // we can't currently scroll there anyway. - nsSize size(rect.XMost(), rect.YMost()); + nsSize size(rect.width, rect.height); nsBox::AddMargin(child, size); nsBox::AddBorderAndPadding(mScrollAreaBox, size); diff --git a/layout/xul/base/src/nsBoxToBlockAdaptor.cpp b/layout/xul/base/src/nsBoxToBlockAdaptor.cpp index 743b1c9f0a7c..2901f4c7eb18 100644 --- a/layout/xul/base/src/nsBoxToBlockAdaptor.cpp +++ b/layout/xul/base/src/nsBoxToBlockAdaptor.cpp @@ -897,19 +897,15 @@ nsBoxToBlockAdaptor::Reflow(nsBoxLayoutState& aState, // we will set the child's rect to include the overflow size. if (mFrame->GetStateBits() & NS_FRAME_OUTSIDE_CHILDREN) { // make sure we store the overflow size - - // This kinda sucks. We should be able to handle the case - // where there's overflow above or to the left of the - // origin. But for now just chop that stuff off. - mOverflow.width = aDesiredSize.mOverflowArea.XMost(); - mOverflow.height = aDesiredSize.mOverflowArea.YMost(); + mOverflow.width = aDesiredSize.mOverflowArea.width; + mOverflow.height = aDesiredSize.mOverflowArea.height; // include the overflow size in our child's rect? if (mIncludeOverflow) { //printf("OutsideChildren width=%d, height=%d\n", aDesiredSize.mOverflowArea.width, aDesiredSize.mOverflowArea.height); - aDesiredSize.width = aDesiredSize.mOverflowArea.XMost(); + aDesiredSize.width = aDesiredSize.mOverflowArea.width; if (aDesiredSize.width <= aWidth) - aDesiredSize.height = aDesiredSize.mOverflowArea.YMost(); + aDesiredSize.height = aDesiredSize.mOverflowArea.height; else { if (aDesiredSize.width > aWidth) { @@ -926,7 +922,7 @@ nsBoxToBlockAdaptor::Reflow(nsBoxLayoutState& aState, mFrame->WillReflow(aPresContext); mFrame->Reflow(aPresContext, aDesiredSize, reflowState, aStatus); if (mFrame->GetStateBits() & NS_FRAME_OUTSIDE_CHILDREN) - aDesiredSize.height = aDesiredSize.mOverflowArea.YMost(); + aDesiredSize.height = aDesiredSize.mOverflowArea.height; } }