mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-30 21:55:31 +00:00
Fix for bug 1831 where an auto horizontal scrollbar was causing a vertical
scrollbar to be displayed even though it wasn't needed
This commit is contained in:
parent
4185de4375
commit
193529a2df
@ -397,6 +397,15 @@ nsScrollFrame::Reflow(nsIPresContext& aPresContext,
|
||||
(eHTMLFrameConstraint_FixedContent == aReflowState.heightConstraint)) {
|
||||
if (kidDesiredSize.height < scrollAreaSize.height) {
|
||||
kidDesiredSize.height = scrollAreaSize.height;
|
||||
|
||||
// If there's an auto horizontal scrollbar and the scrollbar will be
|
||||
// visible then subtract for the space taken up by the scrollbar;
|
||||
// otherwise, we'll end up with a vertical scrollbar even if we don't
|
||||
// need one...
|
||||
if ((NS_STYLE_OVERFLOW_SCROLL != display->mOverflow) &&
|
||||
(kidDesiredSize.width > scrollAreaSize.width)) {
|
||||
kidDesiredSize.height -= NSToCoordRound(sbHeight);
|
||||
}
|
||||
}
|
||||
|
||||
if (kidDesiredSize.height <= scrollAreaSize.height) {
|
||||
|
Loading…
Reference in New Issue
Block a user