[webkit-reviews] review granted: [Bug 226538] [css-scroll-snap] Snap offsets and active index are duplicated in ScrollController and ScrollableArea : [Attachment 430558] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 4 10:41:02 PDT 2021


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Martin Robinson
<mrobinson at webkit.org>'s request for review:
Bug 226538: [css-scroll-snap] Snap offsets and active index are duplicated in
ScrollController and ScrollableArea
https://bugs.webkit.org/show_bug.cgi?id=226538

Attachment 430558: Patch

https://bugs.webkit.org/attachment.cgi?id=430558&action=review




--- Comment #6 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 430558
  --> https://bugs.webkit.org/attachment.cgi?id=430558
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=430558&action=review

> Source/WebCore/platform/ScrollableArea.cpp:489
> +    if (ScrollAnimator* scrollAnimator = existingScrollAnimator())

auto

> Source/WebCore/platform/ScrollableArea.cpp:495
> +    if (ScrollAnimator* scrollAnimator = existingScrollAnimator())

auto

> Source/WebCore/platform/ScrollableArea.cpp:502
> +    if (ScrollAnimator* scrollAnimator = existingScrollAnimator())

auto

> Source/WebCore/platform/ScrollableArea.cpp:504
> +    return 0; // FIXME: This should really be invalidSnapOffsetIndex.

Or a std::optional<>

> Source/WebCore/platform/ScrollableArea.cpp:531
> +    size_t activeHorizontalIndex = currentHorizontalSnapPointIndex();

auto

> Source/WebCore/platform/ScrollableArea.cpp:536
> +    size_t activeVerticalIndex = currentVerticalSnapPointIndex();

auto

> Source/WebCore/platform/ScrollableArea.cpp:548
> +    ScrollAnimator* scrollAnimator = existingScrollAnimator();

auto


More information about the webkit-reviews mailing list