[webkit-changes] [WebKit/WebKit] 501296: [css-scroll-snap] only preserve a target if we hav...

Nikos Mouchtaris noreply at github.com
Thu Oct 13 11:21:13 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 501296a3e648f26c2612145395269563725fed2b
      https://github.com/WebKit/WebKit/commit/501296a3e648f26c2612145395269563725fed2b
  Author: Nikolaos Mouchtaris <nmouchtaris at apple.com>
  Date:   2022-10-13 (Thu, 13 Oct 2022)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WebCore/platform/ScrollSnapAnimatorState.cpp

  Log Message:
  -----------
  [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




More information about the webkit-changes mailing list