[Gecko Bug 1551806] Don't try to snap if there is no valid snap positions for the scroll-snap v1 implementation. #16910
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From the spec [1];
If a valid snap position exists then the scroll container must snap at the
termination of a scroll (if none exist then no snapping occurs).
Both of test cases in this commit fail without this change.
[1] https://drafts.csswg.org/css-scroll-snap-1/#valdef-scroll-snap-type-mandatory
Differential Revision: https://phabricator.services.mozilla.com/D31409
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1551806
gecko-commit: ef3c6d8bb498bfdae4c53cc9eec12f70bb9284ed
gecko-integration-branch: autoland
gecko-reviewers: botond