Reduce the number of reflow for scrolled frame if scrollbar-gutter is not auto
Categories
(Core :: Layout: Scrolling and Overflow, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox97 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
References
Details
Attachments
(1 file)
Bug 1746098 - Reflow scrolled inner frame in TryLayout() only when sizes of scrollbar gutter change.
48 bytes,
text/x-phabricator-request
|
Details | Review |
Bug 1715112 focused on the correctness of scrollbar-gutter layout. This bug is a follow-up to think about the opportunity to reduce the number of calls of ReflowScrolledFrame()
.
Assume the scroll frame has the following style:
writing-mode: horizontal-tb;
direction: ltr;
overflow: auto;
scrollbar-gutter: stable
Then it has a vertical scrollbar gutter occupied the space at inline-end during the first reflow of the inner scrolled frame. So even if the inner scrolled frame overflows the scrollport's height and requires showing the vertical scrollbar, it doesn't an require extra reflow due to the change of the vertical scrollbar visibility.
Assignee | ||
Comment 1•3 years ago
|
||
We now support scrollbar-gutter property. So for example, assume the scroll
container has "scrollbar-gutter:stable". When toggling the visibility of
inline-end scrollbar, we can skip the reflow for the scroll inner frame because
the available inline-size for it cannot change.
This patch teaches TryLayout() to consider the sizes of scrollbar gutter rather
than the (assumed) visibility of scrollbars when deciding the need to call
ReflowScrolledFrame().
Also, TryLayout() doesn't need to report an inconsistent layout unless
the (showHScrollbar, showVScrollbar) pair changes the sizes of scrollbar
gutters.
Updated•3 years ago
|
Comment 3•3 years ago
|
||
bugherder |
Description
•