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.InitializeScrollSnapStrictness(writingMode, disp);
|
||||||
|
|
||||||
result.mSnapportSize = GetSnapportSize();
|
result.mSnapportSize = GetSnapportSize();
|
||||||
|
if (result.mSnapportSize.IsEmpty()) {
|
||||||
|
// Ignore any target snap points if the snapport is empty.
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
CollectScrollPositionsForSnap(
|
CollectScrollPositionsForSnap(
|
||||||
mScrolledFrame, mScrolledFrame, GetScrolledRect(), GetScrollPadding(),
|
mScrolledFrame, mScrolledFrame, GetScrolledRect(), GetScrollPadding(),
|
||||||
GetLayoutScrollRange(), writingMode, result, &mSnapTargets);
|
GetLayoutScrollRange(), writingMode, result, &mSnapTargets);
|
||||||
|
|||||||
9
layout/generic/crashtests/1858798.html
Normal file
9
layout/generic/crashtests/1858798.html
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<style>
|
||||||
|
* {
|
||||||
|
scroll-snap-align: end;
|
||||||
|
margin: 90% -100em;
|
||||||
|
scroll-snap-type: block mandatory ! important;
|
||||||
|
scroll-padding-inline: 54205949.19ch ! important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<math href="" autofocus>
|
||||||
@@ -815,5 +815,6 @@ asserts(0-14) load 1816574.html # Bug 1913247
|
|||||||
load 1821603.html
|
load 1821603.html
|
||||||
load 1822118.html
|
load 1822118.html
|
||||||
load 1825434.html
|
load 1825434.html
|
||||||
|
load 1858798.html
|
||||||
load 1915006.html
|
load 1915006.html
|
||||||
asserts(0-85) load 1881375-1.html # bug 1890687 - assertions about fragmentation invariants, failing many times because the test runs in a loop
|
asserts(0-85) load 1881375-1.html # bug 1890687 - assertions about fragmentation invariants, failing many times because the test runs in a loop
|
||||||
|
|||||||
Reference in New Issue
Block a user