зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1656802. Add a comment explaining how overlay scrollbars work with their negative margin. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85703
This commit is contained in:
Родитель
0a37053b5b
Коммит
a7100c9def
|
@ -6593,6 +6593,10 @@ void ScrollFrameHelper::LayoutScrollbars(nsBoxLayoutState& aState,
|
|||
: mScrollPort.x + compositionSize.width;
|
||||
if (mHasVerticalScrollbar) {
|
||||
nsMargin margin;
|
||||
// For overlay scrollbars the margin returned from this GetXULMargin call
|
||||
// is a negative margin that moves the scrollbar from just outside the
|
||||
// scrollport (and hence not visible) to just inside the scrollport (and
|
||||
// hence visible). For non-overlay scrollbars it is a 0 margin.
|
||||
mVScrollbarBox->GetXULMargin(margin);
|
||||
vRect.Deflate(margin);
|
||||
}
|
||||
|
@ -6611,6 +6615,10 @@ void ScrollFrameHelper::LayoutScrollbars(nsBoxLayoutState& aState,
|
|||
hRect.y = mScrollPort.y + compositionSize.height;
|
||||
if (mHasHorizontalScrollbar) {
|
||||
nsMargin margin;
|
||||
// For overlay scrollbars the margin returned from this GetXULMargin call
|
||||
// is a negative margin that moves the scrollbar from just outside the
|
||||
// scrollport (and hence not visible) to just inside the scrollport (and
|
||||
// hence visible). For non-overlay scrollbars it is a 0 margin.
|
||||
mHScrollbarBox->GetXULMargin(margin);
|
||||
hRect.Deflate(margin);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче