diff options
author | Moonchild <moonchild@palemoon.org> | 2021-01-06 16:31:36 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-01-06 16:31:36 +0000 |
commit | 0e6a9cc60aeb754e00e466ce20052d2fa9ccb7f9 (patch) | |
tree | ec4cb347e7cb522e098115abf09e7d2652366148 /layout/base/nsLayoutUtils.cpp | |
parent | 4681e04dc5263a6cbb3f76ae20b0e44509bfee7b (diff) | |
download | UXP-0e6a9cc60aeb754e00e466ce20052d2fa9ccb7f9.tar UXP-0e6a9cc60aeb754e00e466ce20052d2fa9ccb7f9.tar.gz UXP-0e6a9cc60aeb754e00e466ce20052d2fa9ccb7f9.tar.lz UXP-0e6a9cc60aeb754e00e466ce20052d2fa9ccb7f9.tar.xz UXP-0e6a9cc60aeb754e00e466ce20052d2fa9ccb7f9.zip |
Issue #1705 - Part 3: Rename ScrollbarStyles to ScrollStyles.
ScrollbarStyles contains values of overflow, (over)scroll-behavior, etc.
The only one which is marginally related to scroll _bars_ is overflow, which can
be used to hide scrollbar (by making an element not scrollable) or enforce the
scrollbar to display.
It makes more sense to be called ScrollStyles as it's mainly concerning behavior
of scrolling, not scrollbars. Also, with the addition of scrollbar width
properties, the current name can be confusing.
Diffstat (limited to 'layout/base/nsLayoutUtils.cpp')
-rw-r--r-- | layout/base/nsLayoutUtils.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 86a11bce9..ccdc5503f 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -2023,7 +2023,7 @@ nsLayoutUtils::GetNearestScrollableFrameForDirection(nsIFrame* aFrame, for (nsIFrame* f = aFrame; f; f = nsLayoutUtils::GetCrossDocParentFrame(f)) { nsIScrollableFrame* scrollableFrame = do_QueryFrame(f); if (scrollableFrame) { - ScrollbarStyles ss = scrollableFrame->GetScrollbarStyles(); + ScrollStyles ss = scrollableFrame->GetScrollStyles(); uint32_t directions = scrollableFrame->GetPerceivedScrollingDirections(); if (aDirection == eVertical ? (ss.mVertical != NS_STYLE_OVERFLOW_HIDDEN && @@ -2050,7 +2050,7 @@ nsLayoutUtils::GetNearestScrollableFrame(nsIFrame* aFrame, uint32_t aFlags) return scrollableFrame; } } else { - ScrollbarStyles ss = scrollableFrame->GetScrollbarStyles(); + ScrollStyles ss = scrollableFrame->GetScrollStyles(); if ((aFlags & SCROLLABLE_INCLUDE_HIDDEN) || ss.mVertical != NS_STYLE_OVERFLOW_HIDDEN || ss.mHorizontal != NS_STYLE_OVERFLOW_HIDDEN) { @@ -8255,11 +8255,11 @@ nsLayoutUtils::CalculateScrollableRectForFrame(nsIScrollableFrame* aScrollableFr contentBounds = aScrollableFrame->GetScrollRange(); nsPoint scrollPosition = aScrollableFrame->GetScrollPosition(); - if (aScrollableFrame->GetScrollbarStyles().mVertical == NS_STYLE_OVERFLOW_HIDDEN) { + if (aScrollableFrame->GetScrollStyles().mVertical == NS_STYLE_OVERFLOW_HIDDEN) { contentBounds.y = scrollPosition.y; contentBounds.height = 0; } - if (aScrollableFrame->GetScrollbarStyles().mHorizontal == NS_STYLE_OVERFLOW_HIDDEN) { + if (aScrollableFrame->GetScrollStyles().mHorizontal == NS_STYLE_OVERFLOW_HIDDEN) { contentBounds.x = scrollPosition.x; contentBounds.width = 0; } |