[webkit-changes] [WebKit/WebKit] 439b3f: Ignore snap offsets with an identifier of zero

JC Alvarado noreply at github.com
Mon May 22 13:24:17 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 439b3f7091afcdcb29c02821fd8ead3b24d90d60
      https://github.com/WebKit/WebKit/commit/439b3f7091afcdcb29c02821fd8ead3b24d90d60
  Author: JC Alvarado <joncarlo at apple.com>
  Date:   2023-05-22 (Mon, 22 May 2023)

  Changed paths:
    A LayoutTests/fast/scrolling/scroll-snap-crash-expected.txt
    A LayoutTests/fast/scrolling/scroll-snap-crash.html
    M Source/WebCore/platform/ScrollSnapAnimatorState.cpp

  Log Message:
  -----------
  Ignore snap offsets with an identifier of zero
https://bugs.webkit.org/show_bug.cgi?id=254383
rdar://107130316

Reviewed by Simon Fraser.

When updating snap offsets, if there is no element for a RenderBox,
then a snap offset with an identifier of 0 is created. This can lead
to issues when we add that offset identifier to a HashSet so we should
ignore them in ScrollSnapAnimatorState::currentlySnappedBoxes().

* LayoutTests/fast/animation/scroll-snap-crash-expected.txt: Added.
* LayoutTests/fast/animation/scroll-snap-crash.html: Added.
* Source/WebCore/platform/ScrollSnapAnimatorState.cpp:
(WebCore::ScrollSnapAnimatorState::currentlySnappedBoxes const):

Originally-landed-as: 259548.525 at safari-7615-branch (3d4fc69bfad2). rdar://107130316
Canonical link: https://commits.webkit.org/264359@main




More information about the webkit-changes mailing list