Permalink
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] only preserve a target if we have targets for both …
…axes https://bugs.webkit.org/show_bug.cgi?id=245989 <rdar://100737724> Reviewed by Simon Fraser. The preserving of a particular snap target was intended to follow this line of the spec: "If multiple boxes were snapped before and their snap positions no longer coincide, then if one of them is focused or targeted, the scroll container must re-snap to that one and otherwise which one to re-snap to is UA-defined". Since it is specified that this is for the case of mulitple boxes being snapped, change the logic so that we only preserve a target if we are snapped to multiple boxes. * LayoutTests/TestExpectations: * Source/WebCore/platform/ScrollSnapAnimatorState.cpp: (WebCore::ScrollSnapAnimatorState::setFocusedElementForAxis): (WebCore::ScrollSnapAnimatorState::preserveCurrentTargetForAxis): (WebCore::ScrollSnapAnimatorState::resnapAfterLayout): Canonical link: https://commits.webkit.org/255493@main
- Loading branch information