Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8b2e2e9fea0e4ddd61af4ddf01251c1cf93c6047
      
https://github.com/WebKit/WebKit/commit/8b2e2e9fea0e4ddd61af4ddf01251c1cf93c6047
  Author: Simon Fraser <[email protected]>
  Date:   2026-02-14 (Sat, 14 Feb 2026)

  Changed paths:
    A 
LayoutTests/fast/scrolling/scroll-anchoring-in-overflow-with-page-scale-expected.txt
    A 
LayoutTests/fast/scrolling/scroll-anchoring-in-overflow-with-page-scale.html
    A LayoutTests/fast/scrolling/scroll-anchoring-with-page-scale-expected.txt
    A LayoutTests/fast/scrolling/scroll-anchoring-with-page-scale.html
    M LayoutTests/fast/visual-viewport/zoomed-fixed-header-and-footer.html
    M LayoutTests/fast/visual-viewport/zoomed-fixed.html
    M LayoutTests/platform/ios/TestExpectations
    M Source/WebCore/page/scrolling/ScrollAnchoringController.cpp

  Log Message:
  -----------
  [Scroll anchoring] Fix scroll anchoring in scaled pages
https://bugs.webkit.org/show_bug.cgi?id=307862
rdar://170352074

Reviewed by Wenson Hsieh.

We have to account for page scale when computing scroll anchoring adjustments. 
We do so
as follow:
- use the visual viewport, so that anchor computation finds the anchor at the 
top of
  this viewport.
- compute absolute coords relative to the RenderView, which excludes page scale
- scale the computed offset by `frameScale` (which is page scale on the root
  frame, otherwise 1), but only for document scrolling, not overflow scrolling.

iOS is a little janky: webkit.org/b307861

Tests: fast/scrolling/scroll-anchoring-in-overflow-with-page-scale.html
       fast/scrolling/scroll-anchoring-with-page-scale.html

* 
LayoutTests/fast/scrolling/scroll-anchoring-in-overflow-with-page-scale-expected.txt:
 Added.
* LayoutTests/fast/scrolling/scroll-anchoring-in-overflow-with-page-scale.html: 
Added.
* LayoutTests/fast/scrolling/scroll-anchoring-with-page-scale-expected.txt: 
Added.
* LayoutTests/fast/scrolling/scroll-anchoring-with-page-scale.html: Added.
* LayoutTests/fast/visual-viewport/zoomed-fixed-header-and-footer.html:
* LayoutTests/fast/visual-viewport/zoomed-fixed.html:
* LayoutTests/platform/ios/TestExpectations:
* Source/WebCore/page/scrolling/ScrollAnchoringController.cpp:
(WebCore::ScrollAnchoringController::computeScrollerRelativeRects const):
(WebCore::ScrollAnchoringController::adjustScrollPositionForAnchoring):

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



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

Reply via email to