Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 06981629dcc2ba98e324a410b29624ec59380f94
      
https://github.com/WebKit/WebKit/commit/06981629dcc2ba98e324a410b29624ec59380f94
  Author: Simon Fraser <[email protected]>
  Date:   2026-02-16 (Mon, 16 Feb 2026)

  Changed paths:
    M Source/WebCore/page/LocalFrameView.cpp

  Log Message:
  -----------
  [iOS] [Scroll anchoring] Scroll anchoring when zoomed is janky
https://bugs.webkit.org/show_bug.cgi?id=307861
rdar://170351334

Reviewed by Abrar Rahman Protyasha.

On a page with constant scroll anchoring (attached to the bug), after zooming
iOS could get into a state where it flip-flopped between two scroll positions.

This happened when `LocalFrameView::setLayoutViewportOverrideRect()` cleared
the scroll anchor, but only because of slight rounding differences between
the old and new layout viewports.

However, we don't need to clear the anchor here at all, since anchoring
is based on the visual viewport, changes of which are (currently) reflected
in the scroll position. So the fix is to just remove the clearing.

I tried to write a test, but was unable to replicate the scenario in one.

* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::setLayoutViewportOverrideRect):

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



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

Reply via email to