зеркало из 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);
|
mScrollAreaBox->GetChildBox(&child);
|
||||||
nsIFrame* frame;
|
nsIFrame* frame;
|
||||||
child->GetFrame(&frame);
|
child->GetFrame(&frame);
|
||||||
|
|
||||||
nsIView* view = frame->GetView();
|
nsIView* view = frame->GetView();
|
||||||
NS_ASSERTION(view,"Scrolled frame must have a view!!!");
|
NS_ASSERTION(view,"Scrolled frame must have a view!!!");
|
||||||
|
|
||||||
nsRect rect = view->GetBounds();
|
nsRect rect = view->GetBounds();
|
||||||
// forget about the stuff above or to the left of the origin, since
|
nsSize size(rect.width, rect.height);
|
||||||
// we can't currently scroll there anyway.
|
|
||||||
nsSize size(rect.XMost(), rect.YMost());
|
|
||||||
|
|
||||||
nsBox::AddMargin(child, size);
|
nsBox::AddMargin(child, size);
|
||||||
nsBox::AddBorderAndPadding(mScrollAreaBox, size);
|
nsBox::AddBorderAndPadding(mScrollAreaBox, size);
|
||||||
|
|
|
@ -2132,14 +2132,11 @@ nsGfxScrollFrameInner::GetScrolledSize(nsPresContext* aPresContext,
|
||||||
mScrollAreaBox->GetChildBox(&child);
|
mScrollAreaBox->GetChildBox(&child);
|
||||||
nsIFrame* frame;
|
nsIFrame* frame;
|
||||||
child->GetFrame(&frame);
|
child->GetFrame(&frame);
|
||||||
|
|
||||||
nsIView* view = frame->GetView();
|
nsIView* view = frame->GetView();
|
||||||
NS_ASSERTION(view,"Scrolled frame must have a view!!!");
|
NS_ASSERTION(view,"Scrolled frame must have a view!!!");
|
||||||
|
|
||||||
nsRect rect = view->GetBounds();
|
nsRect rect = view->GetBounds();
|
||||||
// forget about the stuff above or to the left of the origin, since
|
nsSize size(rect.width, rect.height);
|
||||||
// we can't currently scroll there anyway.
|
|
||||||
nsSize size(rect.XMost(), rect.YMost());
|
|
||||||
|
|
||||||
nsBox::AddMargin(child, size);
|
nsBox::AddMargin(child, size);
|
||||||
nsBox::AddBorderAndPadding(mScrollAreaBox, 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.
|
// we will set the child's rect to include the overflow size.
|
||||||
if (mFrame->GetStateBits() & NS_FRAME_OUTSIDE_CHILDREN) {
|
if (mFrame->GetStateBits() & NS_FRAME_OUTSIDE_CHILDREN) {
|
||||||
// make sure we store the overflow size
|
// make sure we store the overflow size
|
||||||
|
mOverflow.width = aDesiredSize.mOverflowArea.width;
|
||||||
// This kinda sucks. We should be able to handle the case
|
mOverflow.height = aDesiredSize.mOverflowArea.height;
|
||||||
// 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();
|
|
||||||
|
|
||||||
// include the overflow size in our child's rect?
|
// include the overflow size in our child's rect?
|
||||||
if (mIncludeOverflow) {
|
if (mIncludeOverflow) {
|
||||||
//printf("OutsideChildren width=%d, height=%d\n", aDesiredSize.mOverflowArea.width, aDesiredSize.mOverflowArea.height);
|
//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)
|
if (aDesiredSize.width <= aWidth)
|
||||||
aDesiredSize.height = aDesiredSize.mOverflowArea.YMost();
|
aDesiredSize.height = aDesiredSize.mOverflowArea.height;
|
||||||
else {
|
else {
|
||||||
if (aDesiredSize.width > aWidth)
|
if (aDesiredSize.width > aWidth)
|
||||||
{
|
{
|
||||||
|
@ -926,7 +922,7 @@ nsBoxToBlockAdaptor::Reflow(nsBoxLayoutState& aState,
|
||||||
mFrame->WillReflow(aPresContext);
|
mFrame->WillReflow(aPresContext);
|
||||||
mFrame->Reflow(aPresContext, aDesiredSize, reflowState, aStatus);
|
mFrame->Reflow(aPresContext, aDesiredSize, reflowState, aStatus);
|
||||||
if (mFrame->GetStateBits() & NS_FRAME_OUTSIDE_CHILDREN)
|
if (mFrame->GetStateBits() & NS_FRAME_OUTSIDE_CHILDREN)
|
||||||
aDesiredSize.height = aDesiredSize.mOverflowArea.YMost();
|
aDesiredSize.height = aDesiredSize.mOverflowArea.height;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче