зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1642869. Check if the visual viewport differs from the layout viewport in ScrollFrameHelper::GetPageScrollAmount. r=kats
So we can preserve the scrolling behaviour that takes into account fixed "headers" and "footers". Differential Revision: https://phabricator.services.mozilla.com/D77985
This commit is contained in:
Родитель
e9698866a7
Коммит
3d8f182b50
|
@ -4569,13 +4569,12 @@ static nsSize GetScrollPortSizeExcludingHeadersAndFooters(
|
|||
nsSize ScrollFrameHelper::GetPageScrollAmount() const {
|
||||
nsSize effectiveScrollPortSize;
|
||||
|
||||
PresShell* presShell = mOuter->PresShell();
|
||||
if (mIsRoot && presShell->IsVisualViewportSizeSet()) {
|
||||
if (GetVisualViewportSize() != mScrollPort.Size()) {
|
||||
// We want to use the visual viewport size if one is set.
|
||||
// The headers/footers adjustment is too complicated to do if there is a
|
||||
// visual viewport that differs from the layout viewport, this is probably
|
||||
// okay.
|
||||
effectiveScrollPortSize = presShell->GetVisualViewportSize();
|
||||
effectiveScrollPortSize = GetVisualViewportSize();
|
||||
} else {
|
||||
// Reduce effective scrollport height by the height of any
|
||||
// fixed-pos/sticky-pos headers or footers
|
||||
|
|
Загрузка…
Ссылка в новой задаче