Bug 1380461 part 1: Clarify ancient code-comment about the helper-variables we use as AddRemoveScrollbar outparams. r=jfkthame

MozReview-Commit-ID: Fxzes2yuLHJ

--HG--
extra : rebase_source : 27207908b6bc703fb64e975316c68db0c4dfa1d1
This commit is contained in:
Daniel Holbert 2017-07-13 09:45:52 -07:00
Родитель ac96bfc73b
Коммит 84d56b987a
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -4832,12 +4832,14 @@ nsXULScrollFrame::AddRemoveScrollbar(nsBoxLayoutState& aState,
mHelper.SetScrollbarVisibility(mHelper.mHScrollbarBox, aAdd);
// We can't directly pass mHasHorizontalScrollbar as the bool outparam for
// AddRemoveScrollbar() because it's a bool:1 bitfield. Hence this var:
bool hasHorizontalScrollbar;
bool fit = AddRemoveScrollbar(hasHorizontalScrollbar,
mHelper.mScrollPort.y,
mHelper.mScrollPort.height,
hSize.height, aOnRightOrBottom, aAdd);
mHelper.mHasHorizontalScrollbar = hasHorizontalScrollbar; // because mHasHorizontalScrollbar is a bool
mHelper.mHasHorizontalScrollbar = hasHorizontalScrollbar;
if (!fit) {
mHelper.SetScrollbarVisibility(mHelper.mHScrollbarBox, !aAdd);
}
@ -4851,12 +4853,14 @@ nsXULScrollFrame::AddRemoveScrollbar(nsBoxLayoutState& aState,
mHelper.SetScrollbarVisibility(mHelper.mVScrollbarBox, aAdd);
// We can't directly pass mHasVerticalScrollbar as the bool outparam for
// AddRemoveScrollbar() because it's a bool:1 bitfield. Hence this var:
bool hasVerticalScrollbar;
bool fit = AddRemoveScrollbar(hasVerticalScrollbar,
mHelper.mScrollPort.x,
mHelper.mScrollPort.width,
vSize.width, aOnRightOrBottom, aAdd);
mHelper.mHasVerticalScrollbar = hasVerticalScrollbar; // because mHasVerticalScrollbar is a bool
mHelper.mHasVerticalScrollbar = hasVerticalScrollbar;
if (!fit) {
mHelper.SetScrollbarVisibility(mHelper.mVScrollbarBox, !aAdd);
}