Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 410b33056dcffd92fb681b18259c9b48efc3fa3a
      
https://github.com/WebKit/WebKit/commit/410b33056dcffd92fb681b18259c9b48efc3fa3a
  Author: Simon Fraser <[email protected]>
  Date:   2026-04-23 (Thu, 23 Apr 2026)

  Changed paths:
    M Source/WebCore/page/scrolling/ScrollSnapOffsetsInfo.cpp
    M Source/WebCore/page/scrolling/ScrollSnapOffsetsInfo.h
    M Source/WebCore/rendering/RenderLayerScrollableArea.cpp
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  -----------
  [Scroll snap] Do some minor cleanup around updateSnapOffsetsForScrollableArea
rdar://175395737
https://bugs.webkit.org/show_bug.cgi?id=313099

Reviewed by Aditya Keerthi.

`updateSnapOffsetsForScrollableArea()` was rather dense, so insert some blank 
lines
and do a bit of cleanup.

Re-order members of `SnapOffset` to reduce padding, and give `snapAreaIndices`
inline capacity of 1 since this is by far the most common capacity.

Rename `hasScrollSnappedBoxes()` to `mayHaveScrollSnappedBoxes()` since
it does not give a definitive answer; the document may have snapped
boxes in other scrollers, but not this one.

No behavior change.

* Source/WebCore/page/scrolling/ScrollSnapOffsetsInfo.cpp:
(WebCore::mayHaveScrollSnappedBoxes):
(WebCore::updateSnapOffsetsForScrollableArea):
(WebCore::convertOffsetInfo):
(WebCore::hasScrollSnappedBoxes): Deleted.
* Source/WebCore/page/scrolling/ScrollSnapOffsetsInfo.h:
(WebCore::operator<<):
* Source/WebCore/rendering/RenderLayerScrollableArea.cpp:
(WebCore::RenderLayerScrollableArea::updateSnapOffsets):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

Canonical link: https://commits.webkit.org/311861@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to