From 69ab7f44050b090cf5b8841c6f7742b53565a165 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Fri, 10 Oct 2014 17:11:13 -0400 Subject: [PATCH] Back out cset 3d9ce7853452 (bug 1078373) for mochitest failures. r=me on a CLOSED TREE --- layout/generic/nsGfxScrollFrame.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 8caef627210..0a34ac21b13 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -351,7 +351,6 @@ nsHTMLScrollFrame::TryLayout(ScrollReflowState* aState, ComputeInsideBorderSize(aState, desiredInsideBorderSize); nsSize scrollPortSize = nsSize(std::max(0, aState->mInsideBorderSize.width - vScrollbarDesiredWidth), std::max(0, aState->mInsideBorderSize.height - hScrollbarDesiredHeight)); - nsSize visualScrollPortSize = mHelper.GetScrollPositionClampingScrollPortSize(); if (!aForce) { nsRect scrolledRect = @@ -363,7 +362,7 @@ nsHTMLScrollFrame::TryLayout(ScrollReflowState* aState, if (aState->mStyles.mHorizontal != NS_STYLE_OVERFLOW_HIDDEN) { bool wantHScrollbar = aState->mStyles.mHorizontal == NS_STYLE_OVERFLOW_SCROLL || - scrolledRect.XMost() >= visualScrollPortSize.width + oneDevPixel || + scrolledRect.XMost() >= scrollPortSize.width + oneDevPixel || scrolledRect.x <= -oneDevPixel; if (scrollPortSize.width < hScrollbarMinSize.width) wantHScrollbar = false; @@ -375,7 +374,7 @@ nsHTMLScrollFrame::TryLayout(ScrollReflowState* aState, if (aState->mStyles.mVertical != NS_STYLE_OVERFLOW_HIDDEN) { bool wantVScrollbar = aState->mStyles.mVertical == NS_STYLE_OVERFLOW_SCROLL || - scrolledRect.YMost() >= visualScrollPortSize.height + oneDevPixel || + scrolledRect.YMost() >= scrollPortSize.height + oneDevPixel || scrolledRect.y <= -oneDevPixel; if (scrollPortSize.height < vScrollbarMinSize.height) wantVScrollbar = false;