Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[css-scroll-snap] choose closest snap target if neither are visible
https://bugs.webkit.org/show_bug.cgi?id=245164 <rdar://99897147> Reviewed by Wenson Hsieh. When taking the closest snap target for each axes results in neither target being visible, pick the closest target to the user scroll position. * LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/snap-to-visible-areas-both-expected.txt: * Source/WebCore/page/scrolling/ScrollSnapOffsetsInfo.cpp: (WebCore::offsetHasVisibleSnapArea): (WebCore::findCompatibleSnapArea): (WebCore::adjustPreviousAndNextForOnScreenSnapAreas): (WebCore::ensureVisibleTarget): (WebCore::LayoutScrollSnapOffsetsInfo::closestSnapOffset const): (WebCore::FloatScrollSnapOffsetsInfo::closestSnapOffset const): (WebCore::hasCompatibleSnapArea): Deleted. Canonical link: https://commits.webkit.org/254982@main
- Loading branch information
Showing
3 changed files
with
52 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
|
||
FAIL Only snap to visible areas in the case where taking the closest snap point of each axis does not snap to a visible area assert_equals: expected 800 but got 0 | ||
PASS Only snap to visible areas in the case where taking the closest snap point of each axis does not snap to a visible area | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters