Refactor ScrollFrameHelper::LayoutScrollbars
Categories
(Core :: Layout: Scrolling and Overflow, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox97 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
References
Details
Attachments
(4 files)
This is the last refactor preparation before implementing scrollbar-gutter. The goal of this bug is:
- Adjust the logic in
ScrollFrameHelper::LayoutScrollbars()
so that no behavior is changed of the current m-c. - After adding scrollbar-gutter,
ScrollFrameHelper::LayoutScrollbars()
just works, and no need to do addition change to it.
Assignee | ||
Comment 1•3 years ago
|
||
Compute the actual vertical & horizontal scrollbars' rects (vRect & hRect) only
when we decide to show the scrollbars. The rationale is that after introducing
scrollbar-gutter in bug 1715112, mScrollPort
is no longer equal to
aInsideBorderArea
even if we don't show scrollbars, and we want scrollbar
rects remaining empty to avoid showing them.
Simplify hasVisualOnlyScrollbarsOnBothDirections
and move it closer to its
first usage.
Assignee | ||
Comment 2•3 years ago
|
||
Revise vRect & hRect computation because the scrollbar gutter can be at both
inline start and inline end sides. For example, we can no longer use
aInsideBorderArea.width - mScrollPort.width
to get the actual width of the
vertical scrollbar. We want to compute them in different ways.
Depends on D133691
Assignee | ||
Comment 3•3 years ago
|
||
HasResizer() is equivalent to mResizerBox and is used only within
ScrollFrameHelper, so no need to expose it. Also, remove some unreachable
if-branches.
Depends on D133692
Assignee | ||
Comment 4•3 years ago
|
||
This patch makes mResizerBox's rect computation independent of mScrollCornerBox
because we can show resizer without showing scroll corner (due to no scrollbar).
Depends on D133693
Comment 6•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/cee242d9dbb3
https://hg.mozilla.org/mozilla-central/rev/b6e73faa67cc
https://hg.mozilla.org/mozilla-central/rev/23ec642d3879
https://hg.mozilla.org/mozilla-central/rev/c812809957b9
Description
•