Bug 1858798 - Ignore any target snap points in the case of empty snapport. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D226574
This commit is contained in:
@@ -7607,6 +7607,11 @@ ScrollSnapInfo ScrollContainerFrame::ComputeScrollSnapInfo() {
|
||||
result.InitializeScrollSnapStrictness(writingMode, disp);
|
||||
|
||||
result.mSnapportSize = GetSnapportSize();
|
||||
if (result.mSnapportSize.IsEmpty()) {
|
||||
// Ignore any target snap points if the snapport is empty.
|
||||
return result;
|
||||
}
|
||||
|
||||
CollectScrollPositionsForSnap(
|
||||
mScrolledFrame, mScrolledFrame, GetScrolledRect(), GetScrollPadding(),
|
||||
GetLayoutScrollRange(), writingMode, result, &mSnapTargets);
|
||||
|
||||
Reference in New Issue
Block a user