Backed out 11 changesets (bug 1656802) for async-scrolling reftests failures CLOSED TREE

Backed out changeset 941ee8aa9735 (bug 1656802)
Backed out changeset c5b1b38d1d35 (bug 1656802)
Backed out changeset fe2dd5de83ef (bug 1656802)
Backed out changeset 8e217fc1c6d4 (bug 1656802)
Backed out changeset 21f574f6acb4 (bug 1656802)
Backed out changeset 753f93dffe07 (bug 1656802)
Backed out changeset 386554110008 (bug 1656802)
Backed out changeset 2d3576ace2f1 (bug 1656802)
Backed out changeset 06a47c35c531 (bug 1656802)
Backed out changeset 57fa48542435 (bug 1656802)
Backed out changeset b1517bc33eff (bug 1656802)
This commit is contained in:
Bogdan Tara 2020-08-07 14:36:21 +03:00
Родитель b6387305a4
Коммит 06a9a6d13f
7 изменённых файлов: 59 добавлений и 244 удалений

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

@ -558,10 +558,8 @@ nsDOMWindowUtils::GetScrollbarSizes(Element* aElement,
return NS_ERROR_INVALID_ARG;
}
CSSIntMargin scrollbarSizes =
RoundedToInt(CSSMargin::FromAppUnits(scrollFrame->GetActualScrollbarSizes(
nsIScrollableFrame::ScrollbarSizesOptions::
INCLUDE_VISUAL_VIEWPORT_SCROLLBARS)));
CSSIntMargin scrollbarSizes = RoundedToInt(
CSSMargin::FromAppUnits(scrollFrame->GetActualScrollbarSizes()));
*aOutVerticalScrollbarWidth = scrollbarSizes.LeftRight();
*aOutHorizontalScrollbarHeight = scrollbarSizes.TopBottom();

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

@ -205,11 +205,6 @@ interface nsIDOMWindowUtils : nsISupports {
* Note that on some platforms, scrollbars don't take up layout space
* ("overlay scrollbars"). On such platforms, the returned sizes are
* always zero.
*
* Layout scrollbars that normally take up space but were only shown to
* scroll the visual viewport inside the layout viewport (the layout viewport
* cannot be scrolled) do not take up space but they still return their size
* from this function.
*/
void getScrollbarSizes(in Element aElement,
out uint32_t aVerticalScrollbarWidth,

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

@ -3207,7 +3207,6 @@ uint32_t gfxPlatform::TargetFrameRate() {
/* static */
bool gfxPlatform::UseDesktopZoomingScrollbars() {
// bug 1657822 to enable this by default
return StaticPrefs::apz_allow_zooming() &&
!StaticPrefs::apz_force_disable_desktop_zooming_scrollbars();
}

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

@ -8798,9 +8798,7 @@ nsMargin nsLayoutUtils::ScrollbarAreaToExcludeFromCompositionBoundsFor(
if (!scrollableFrame) {
return nsMargin();
}
return scrollableFrame->GetActualScrollbarSizes(
nsIScrollableFrame::ScrollbarSizesOptions::
INCLUDE_VISUAL_VIEWPORT_SCROLLBARS);
return scrollableFrame->GetActualScrollbarSizes();
}
/* static */

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

@ -273,10 +273,6 @@ namespace mozilla {
enum class ShowScrollbar : uint8_t {
Auto,
Always,
// Never is a misnomer. We can still get a scrollbar if we need to scroll the
// visual viewport inside the layout viewport. Thus this enum is best thought
// of as value used by layout, which does not know about the visual viewport.
// The visual viewport does not affect any layout sizes, so this is sound.
Never,
};
@ -296,15 +292,7 @@ struct MOZ_STACK_CLASS ScrollReflowInput {
const ReflowInput& mReflowInput;
nsBoxLayoutState mBoxState;
ShowScrollbar mHScrollbar;
// If the horizontal scrollbar is allowed (even if mHScrollbar ==
// ShowScrollbar::Never) provided that it is for scrolling the visual viewport
// inside the layout viewport only.
bool mHScrollbarAllowedForScrollingVVInsideLV = true;
ShowScrollbar mVScrollbar;
// If the vertical scrollbar is allowed (even if mVScrollbar ==
// ShowScrollbar::Never) provided that it is for scrolling the visual viewport
// inside the layout viewport only.
bool mVScrollbarAllowedForScrollingVVInsideLV = true;
nsMargin mComputedBorder;
// === Filled in by ReflowScrolledFrame ===
@ -323,13 +311,6 @@ struct MOZ_STACK_CLASS ScrollReflowInput {
// Whether we decided to show the vertical scrollbar
MOZ_INIT_OUTSIDE_CTOR
bool mShowVScrollbar;
// If mShow(H|V)Scrollbar is true then
// mOnlyNeed(V|H)ScrollbarToScrollVVInsideLV indicates if the only reason we
// need that scrollbar is to scroll the visual viewport inside the layout
// viewport. These scrollbars are special in that even if they are layout
// scrollbars they do not take up any layout space.
bool mOnlyNeedHScrollbarToScrollVVInsideLV = false;
bool mOnlyNeedVScrollbarToScrollVVInsideLV = false;
ScrollReflowInput(nsIScrollableFrame* aFrame, const ReflowInput& aReflowInput)
: mReflowInput(aReflowInput),
@ -445,7 +426,8 @@ bool nsHTMLScrollFrame::TryLayout(ScrollReflowInput* aState,
nsSize vScrollbarPrefSize(0, 0);
if (mHelper.mVScrollbarBox) {
GetScrollbarMetrics(aState->mBoxState, mHelper.mVScrollbarBox,
&vScrollbarMinSize, &vScrollbarPrefSize);
&vScrollbarMinSize,
aAssumeVScroll ? &vScrollbarPrefSize : nullptr);
nsScrollbarFrame* scrollbar = do_QueryFrame(mHelper.mVScrollbarBox);
scrollbar->SetScrollbarMediatorContent(mContent);
}
@ -456,7 +438,8 @@ bool nsHTMLScrollFrame::TryLayout(ScrollReflowInput* aState,
nsSize hScrollbarPrefSize(0, 0);
if (mHelper.mHScrollbarBox) {
GetScrollbarMetrics(aState->mBoxState, mHelper.mHScrollbarBox,
&hScrollbarMinSize, &hScrollbarPrefSize);
&hScrollbarMinSize,
aAssumeHScroll ? &hScrollbarPrefSize : nullptr);
nsScrollbarFrame* scrollbar = do_QueryFrame(mHelper.mHScrollbarBox);
scrollbar->SetScrollbarMediatorContent(mContent);
}
@ -538,16 +521,11 @@ bool nsHTMLScrollFrame::TryLayout(ScrollReflowInput* aState,
nscoord oneDevPixel = aState->mBoxState.PresContext()->DevPixelsToAppUnits(1);
if (!aForce) {
nsSize sizeToCompare = visualViewportSize;
if (gfxPlatform::UseDesktopZoomingScrollbars()) {
sizeToCompare = scrollPortSize;
}
// If the style is HIDDEN then we already know that aAssumeHScroll is false
if (aState->mHScrollbar != ShowScrollbar::Never) {
bool wantHScrollbar =
aState->mHScrollbar == ShowScrollbar::Always ||
scrolledRect.XMost() >= sizeToCompare.width + oneDevPixel ||
scrolledRect.XMost() >= visualViewportSize.width + oneDevPixel ||
scrolledRect.x <= -oneDevPixel;
// TODO(emilio): This should probably check this scrollbar's minimum size
// in both axes, for consistency?
@ -566,7 +544,7 @@ bool nsHTMLScrollFrame::TryLayout(ScrollReflowInput* aState,
if (aState->mVScrollbar != ShowScrollbar::Never) {
bool wantVScrollbar =
aState->mVScrollbar == ShowScrollbar::Always ||
scrolledRect.YMost() >= sizeToCompare.height + oneDevPixel ||
scrolledRect.YMost() >= visualViewportSize.height + oneDevPixel ||
scrolledRect.y <= -oneDevPixel;
// TODO(emilio): This should probably check this scrollbar's minimum size
// in both axes, for consistency?
@ -591,46 +569,6 @@ bool nsHTMLScrollFrame::TryLayout(ScrollReflowInput* aState,
scrollPortOrigin.x += vScrollbarActualWidth;
}
mHelper.mScrollPort = nsRect(scrollPortOrigin, scrollPortSize);
if (mHelper.mIsRoot && gfxPlatform::UseDesktopZoomingScrollbars()) {
bool vvChanged = true;
// This loop can run at most twice since we can only add a scrollbar once.
// At this point we've already decided that this layout is consistent so we
// will return true. Scrollbars added here never take up layout space even
// if they are layout scrollbars so any changes made here will not make us
// return false.
while (vvChanged) {
vvChanged = false;
if (!aState->mShowHScrollbar &&
aState->mHScrollbarAllowedForScrollingVVInsideLV) {
if (mHelper.mScrollPort.width >=
visualViewportSize.width + oneDevPixel &&
visualViewportSize.width >= hScrollbarMinSize.width) {
vvChanged = true;
visualViewportSize.height -= hScrollbarPrefSize.height;
aState->mShowHScrollbar = true;
aState->mOnlyNeedHScrollbarToScrollVVInsideLV = true;
ROOT_SCROLLBAR_LOG("TryLayout added H scrollbar for VV, VV now %s\n",
Stringify(visualViewportSize).c_str());
}
}
if (!aState->mShowVScrollbar &&
aState->mVScrollbarAllowedForScrollingVVInsideLV) {
if (mHelper.mScrollPort.height >=
visualViewportSize.height + oneDevPixel &&
visualViewportSize.height >= vScrollbarMinSize.height) {
vvChanged = true;
visualViewportSize.width -= vScrollbarPrefSize.width;
aState->mShowVScrollbar = true;
aState->mOnlyNeedVScrollbarToScrollVVInsideLV = true;
ROOT_SCROLLBAR_LOG("TryLayout added V scrollbar for VV, VV now %s\n",
Stringify(visualViewportSize).c_str());
}
}
}
}
return true;
}
@ -810,12 +748,7 @@ bool nsHTMLScrollFrame::GuessHScrollbarNeeded(const ScrollReflowInput& aState) {
// no guessing required
return aState.mHScrollbar == ShowScrollbar::Always;
}
// We only care about scrollbars that might take up space when trying to guess
// if we need a scrollbar, so we ignore scrollbars only created to scroll the
// visual viewport inside the layout viewport because they take up no layout
// space.
return mHelper.mHasHorizontalScrollbar &&
!mHelper.mOnlyNeedHScrollbarToScrollVVInsideLV;
return mHelper.mHasHorizontalScrollbar;
}
bool nsHTMLScrollFrame::GuessVScrollbarNeeded(const ScrollReflowInput& aState) {
@ -828,12 +761,7 @@ bool nsHTMLScrollFrame::GuessVScrollbarNeeded(const ScrollReflowInput& aState) {
// the state of the vertical scrollbar will be what we determined
// last time.
if (mHelper.mHadNonInitialReflow) {
// We only care about scrollbars that might take up space when trying to
// guess if we need a scrollbar, so we ignore scrollbars only created to
// scroll the visual viewport inside the layout viewport because they take
// up no layout space.
return mHelper.mHasVerticalScrollbar &&
!mHelper.mOnlyNeedVScrollbarToScrollVVInsideLV;
return mHelper.mHasVerticalScrollbar;
}
// If this is the initial reflow, guess false because usually
@ -1223,11 +1151,9 @@ void nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
// sanity check: ensure that if we have no scrollbar, we treat it
// as hidden.
if (!mHelper.mVScrollbarBox || mHelper.mNeverHasVerticalScrollbar) {
state.mVScrollbarAllowedForScrollingVVInsideLV = false;
state.mVScrollbar = ShowScrollbar::Never;
}
if (!mHelper.mHScrollbarBox || mHelper.mNeverHasHorizontalScrollbar) {
state.mHScrollbarAllowedForScrollingVVInsideLV = false;
state.mHScrollbar = ShowScrollbar::Never;
}
@ -1257,8 +1183,6 @@ void nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
ComputedStyle* scrollbarStyle = nsLayoutUtils::StyleForScrollbar(this);
auto scrollbarWidth = scrollbarStyle->StyleUIReset()->mScrollbarWidth;
if (scrollbarWidth == StyleScrollbarWidth::None) {
state.mVScrollbarAllowedForScrollingVVInsideLV = false;
state.mHScrollbarAllowedForScrollingVVInsideLV = false;
state.mVScrollbar = ShowScrollbar::Never;
state.mHScrollbar = ShowScrollbar::Never;
}
@ -1296,13 +1220,6 @@ void nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
mHelper.mPostedReflowCallback = true;
}
bool didOnlyHScrollbar = mHelper.mOnlyNeedHScrollbarToScrollVVInsideLV;
bool didOnlyVScrollbar = mHelper.mOnlyNeedVScrollbarToScrollVVInsideLV;
mHelper.mOnlyNeedHScrollbarToScrollVVInsideLV =
state.mOnlyNeedHScrollbarToScrollVVInsideLV;
mHelper.mOnlyNeedVScrollbarToScrollVVInsideLV =
state.mOnlyNeedVScrollbarToScrollVVInsideLV;
bool didHaveHScrollbar = mHelper.mHasHorizontalScrollbar;
bool didHaveVScrollbar = mHelper.mHasVerticalScrollbar;
mHelper.mHasHorizontalScrollbar = state.mShowHScrollbar;
@ -1314,8 +1231,6 @@ void nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
reflowScrollCorner || HasAnyStateBits(NS_FRAME_IS_DIRTY) ||
didHaveHScrollbar != state.mShowHScrollbar ||
didHaveVScrollbar != state.mShowVScrollbar ||
didOnlyHScrollbar != mHelper.mOnlyNeedHScrollbarToScrollVVInsideLV ||
didOnlyVScrollbar != mHelper.mOnlyNeedVScrollbarToScrollVVInsideLV ||
!oldScrollAreaBounds.IsEqualEdges(newScrollAreaBounds) ||
!oldScrolledAreaBounds.IsEqualEdges(newScrolledAreaBounds)) {
if (!mHelper.mSuppressScrollbarUpdate) {
@ -2242,8 +2157,6 @@ ScrollFrameHelper::ScrollFrameHelper(nsContainerFrame* aOuter, bool aIsRoot)
mNeverHasHorizontalScrollbar(false),
mHasVerticalScrollbar(false),
mHasHorizontalScrollbar(false),
mOnlyNeedVScrollbarToScrollVVInsideLV(false),
mOnlyNeedHScrollbarToScrollVVInsideLV(false),
mFrameIsUpdatingScrollbar(false),
mDidHistoryRestore(false),
mIsRoot(aIsRoot),
@ -6519,73 +6432,6 @@ void ScrollFrameHelper::LayoutScrollbars(nsBoxLayoutState& aState,
mOuter, false, &compositionSize);
}
nsPresContext* presContext = mScrolledFrame->PresContext();
nsRect vRect;
if (mVScrollbarBox) {
MOZ_ASSERT(mVScrollbarBox->IsXULBoxFrame(), "Must be a box frame!");
vRect = mScrollPort;
if (overlayScrollBarsOnRoot) {
vRect.height = compositionSize.height;
}
vRect.width = aContentArea.width - mScrollPort.width;
vRect.x = scrollbarOnLeft ? aContentArea.x
: mScrollPort.x + compositionSize.width;
if (mHasVerticalScrollbar) {
if (UsesOverlayScrollbars() || mOnlyNeedVScrollbarToScrollVVInsideLV) {
// No layout space is reserved for overlay scrollbars and visual
// viewport only scrollbars (whether they are layout or overlay), so at
// this point they are both positioned just outside the scrollport (and
// hence not visible). We need to move them to just inside the
// scrollport so they are visible.
nsMargin margin;
nsSize vScrollbarPrefSize;
GetScrollbarMetrics(aState, mVScrollbarBox, nullptr,
&vScrollbarPrefSize);
if (scrollbarOnLeft) {
margin.right -= vScrollbarPrefSize.width;
} else {
margin.left -= vScrollbarPrefSize.width;
}
vRect.Deflate(margin);
}
}
AdjustScrollbarRectForResizer(mOuter, presContext, vRect, hasResizer,
ScrollDirection::eVertical);
}
bool hasVisualOnlyScrollbarsOnBothDirections =
!UsesOverlayScrollbars() && mHScrollbarBox && mHasHorizontalScrollbar &&
mOnlyNeedHScrollbarToScrollVVInsideLV && mVScrollbarBox &&
mHasVerticalScrollbar && mOnlyNeedVScrollbarToScrollVVInsideLV;
nsRect hRect;
if (mHScrollbarBox) {
MOZ_ASSERT(mHScrollbarBox->IsXULBoxFrame(), "Must be a box frame!");
hRect = mScrollPort;
if (overlayScrollBarsOnRoot) {
hRect.width = compositionSize.width;
}
hRect.height = aContentArea.height - mScrollPort.height;
hRect.y = mScrollPort.y + compositionSize.height;
if (mHasHorizontalScrollbar) {
if (UsesOverlayScrollbars() || mOnlyNeedVScrollbarToScrollVVInsideLV) {
// No layout space is reserved for overlay scrollbars and visual
// viewport only scrollbars (whether they are layout or overlay), so at
// this point they are both positioned just outside the scrollport (and
// hence not visible). We need to move them to just inside the
// scrollport so they are visible.
nsMargin margin;
nsSize hScrollbarPrefSize;
GetScrollbarMetrics(aState, mHScrollbarBox, nullptr,
&hScrollbarPrefSize);
margin.top -= hScrollbarPrefSize.height;
hRect.Deflate(margin);
}
}
AdjustScrollbarRectForResizer(mOuter, presContext, hRect, hasResizer,
ScrollDirection::eHorizontal);
}
// place the scrollcorner
if (mScrollCornerBox || mResizerBox) {
MOZ_ASSERT(!mScrollCornerBox || mScrollCornerBox->IsXULBoxFrame(),
@ -6612,16 +6458,6 @@ void ScrollFrameHelper::LayoutScrollbars(nsBoxLayoutState& aState,
NS_ASSERTION(r.height >= 0, "Scroll area should be inside client rect");
}
// If we have layout scrollbars and both scrollbars are present and both are
// only needed to scroll the VV inside the LV then we need a scrollcorner
// but the above calculation will result in an empty rect, so adjust it.
if (r.IsEmpty() && hasVisualOnlyScrollbarsOnBothDirections) {
r.width = vRect.width;
r.height = hRect.height;
r.x = scrollbarOnLeft ? mScrollPort.x : mScrollPort.XMost() - r.width;
r.y = mScrollPort.YMost() - r.height;
}
if (mScrollCornerBox) {
nsBoxFrame::LayoutChildAt(aState, mScrollCornerBox, r);
}
@ -6657,10 +6493,45 @@ void ScrollFrameHelper::LayoutScrollbars(nsBoxLayoutState& aState,
}
}
// Layout scrollbars can overlap at this point if they are both present and
// both only needed to scroll the VV inside the LV.
if (!LookAndFeel::GetInt(LookAndFeel::IntID::AllowOverlayScrollbarsOverlap) ||
hasVisualOnlyScrollbarsOnBothDirections) {
nsPresContext* presContext = mScrolledFrame->PresContext();
nsRect vRect;
if (mVScrollbarBox) {
MOZ_ASSERT(mVScrollbarBox->IsXULBoxFrame(), "Must be a box frame!");
vRect = mScrollPort;
if (overlayScrollBarsOnRoot) {
vRect.height = compositionSize.height;
}
vRect.width = aContentArea.width - mScrollPort.width;
vRect.x = scrollbarOnLeft ? aContentArea.x
: mScrollPort.x + compositionSize.width;
if (mHasVerticalScrollbar) {
nsMargin margin;
mVScrollbarBox->GetXULMargin(margin);
vRect.Deflate(margin);
}
AdjustScrollbarRectForResizer(mOuter, presContext, vRect, hasResizer,
ScrollDirection::eVertical);
}
nsRect hRect;
if (mHScrollbarBox) {
MOZ_ASSERT(mHScrollbarBox->IsXULBoxFrame(), "Must be a box frame!");
hRect = mScrollPort;
if (overlayScrollBarsOnRoot) {
hRect.width = compositionSize.width;
}
hRect.height = aContentArea.height - mScrollPort.height;
hRect.y = mScrollPort.y + compositionSize.height;
if (mHasHorizontalScrollbar) {
nsMargin margin;
mHScrollbarBox->GetXULMargin(margin);
hRect.Deflate(margin);
}
AdjustScrollbarRectForResizer(mOuter, presContext, hRect, hasResizer,
ScrollDirection::eHorizontal);
}
if (!LookAndFeel::GetInt(LookAndFeel::IntID::AllowOverlayScrollbarsOverlap)) {
AdjustOverlappingScrollbars(vRect, hRect);
}
if (mVScrollbarBox) {
@ -6905,38 +6776,11 @@ nsRect ScrollFrameHelper::GetUnsnappedScrolledRectInternal(
aScrollPortSize, GetScrolledFrameDir());
}
nsMargin ScrollFrameHelper::GetActualScrollbarSizes(
nsIScrollableFrame::ScrollbarSizesOptions
aOptions /* = nsIScrollableFrame::ScrollbarSizesOptions::NONE */)
const {
nsMargin ScrollFrameHelper::GetActualScrollbarSizes() const {
nsRect r = mOuter->GetPaddingRectRelativeToSelf();
nsMargin m(mScrollPort.y - r.y, r.XMost() - mScrollPort.XMost(),
r.YMost() - mScrollPort.YMost(), mScrollPort.x - r.x);
if (aOptions == nsIScrollableFrame::ScrollbarSizesOptions::
INCLUDE_VISUAL_VIEWPORT_SCROLLBARS &&
!UsesOverlayScrollbars()) {
// If we are using layout scrollbars and they only exist to scroll the
// visual viewport then they do not take up any layout space (so the
// scrollport is the same as the padding rect) but they do cover everything
// below them so some callers may want to include this special type of
// scrollbars in the returned value.
if (mHScrollbarBox && mHasHorizontalScrollbar &&
mOnlyNeedHScrollbarToScrollVVInsideLV) {
m.bottom += mHScrollbarBox->GetRect().height;
}
if (mVScrollbarBox && mHasVerticalScrollbar &&
mOnlyNeedVScrollbarToScrollVVInsideLV) {
if (IsScrollbarOnRight()) {
m.right += mVScrollbarBox->GetRect().width;
} else {
m.left += mVScrollbarBox->GetRect().width;
}
}
}
return m;
return nsMargin(mScrollPort.y - r.y, r.XMost() - mScrollPort.XMost(),
r.YMost() - mScrollPort.YMost(), mScrollPort.x - r.x);
}
void ScrollFrameHelper::SetScrollbarVisibility(nsIFrame* aScrollbar,

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

@ -344,9 +344,7 @@ class ScrollFrameHelper : public nsIReflowCallback {
return (mHasVerticalScrollbar ? nsIScrollableFrame::VERTICAL : 0) |
(mHasHorizontalScrollbar ? nsIScrollableFrame::HORIZONTAL : 0);
}
nsMargin GetActualScrollbarSizes(
nsIScrollableFrame::ScrollbarSizesOptions aOptions =
nsIScrollableFrame::ScrollbarSizesOptions::NONE) const;
nsMargin GetActualScrollbarSizes() const;
nsMargin GetDesiredScrollbarSizes(nsBoxLayoutState* aState);
nscoord GetNondisappearingScrollbarWidth(nsBoxLayoutState* aState,
mozilla::WritingMode aVerticalWM);
@ -632,13 +630,6 @@ class ScrollFrameHelper : public nsIReflowCallback {
bool mNeverHasHorizontalScrollbar : 1;
bool mHasVerticalScrollbar : 1;
bool mHasHorizontalScrollbar : 1;
// If mHas(Vertical|Horizontal)Scrollbar is true then
// mOnlyNeed(V|H)ScrollbarToScrollVVInsideLV indicates if the only reason we
// need that scrollbar is to scroll the visual viewport inside the layout
// viewport. These scrollbars are special in that even if they are layout
// scrollbars they do not take up any layout space.
bool mOnlyNeedVScrollbarToScrollVVInsideLV : 1;
bool mOnlyNeedHScrollbarToScrollVVInsideLV : 1;
bool mFrameIsUpdatingScrollbar : 1;
bool mDidHistoryRestore : 1;
// Is this the scrollframe for the document's viewport?
@ -907,10 +898,8 @@ class nsHTMLScrollFrame : public nsContainerFrame,
uint32_t GetScrollbarVisibility() const final {
return mHelper.GetScrollbarVisibility();
}
nsMargin GetActualScrollbarSizes(
nsIScrollableFrame::ScrollbarSizesOptions aOptions =
nsIScrollableFrame::ScrollbarSizesOptions::NONE) const final {
return mHelper.GetActualScrollbarSizes(aOptions);
nsMargin GetActualScrollbarSizes() const final {
return mHelper.GetActualScrollbarSizes();
}
nsMargin GetDesiredScrollbarSizes(nsBoxLayoutState* aState) final {
return mHelper.GetDesiredScrollbarSizes(aState);
@ -1389,10 +1378,8 @@ class nsXULScrollFrame final : public nsBoxFrame,
uint32_t GetScrollbarVisibility() const final {
return mHelper.GetScrollbarVisibility();
}
nsMargin GetActualScrollbarSizes(
nsIScrollableFrame::ScrollbarSizesOptions aOptions =
nsIScrollableFrame::ScrollbarSizesOptions::NONE) const final {
return mHelper.GetActualScrollbarSizes(aOptions);
nsMargin GetActualScrollbarSizes() const final {
return mHelper.GetActualScrollbarSizes();
}
nsMargin GetDesiredScrollbarSizes(nsBoxLayoutState* aState) final {
return mHelper.GetDesiredScrollbarSizes(aState);

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

@ -114,14 +114,8 @@ class nsIScrollableFrame : public nsIScrollbarMediator {
* positions that don't have a scrollbar or where the scrollbar is not
* visible. Do not call this while this frame's descendants are being
* reflowed, it won't be accurate.
* INCLUDE_VISUAL_VIEWPORT_SCROLLBARS means we include the size of layout
* scrollbars that are only visible to scroll the visual viewport inside the
* layout viewport (ie the layout viewport cannot be scrolled) even though
* there is no layout space set aside for these scrollbars.
*/
enum class ScrollbarSizesOptions { NONE, INCLUDE_VISUAL_VIEWPORT_SCROLLBARS };
virtual nsMargin GetActualScrollbarSizes(
ScrollbarSizesOptions aOptions = ScrollbarSizesOptions::NONE) const = 0;
virtual nsMargin GetActualScrollbarSizes() const = 0;
/**
* Return the sizes of all scrollbars assuming that any scrollbars that could
* be visible due to overflowing content, are. This can be called during