зеркало из https://github.com/mozilla/gecko-dev.git
Bug 256436 - Backing out the patch from bug 255584 due to a regression.
Requested by roc.
This commit is contained in:
Родитель
d9c605bed1
Коммит
55dab83c6b
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче