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

  Changed paths:
    M LayoutTests/platform/ios/TestExpectations
    M LayoutTests/platform/mac-wk2/TestExpectations
    M Source/WebCore/page/scrolling/ScrollAnchoringController.cpp
    M Source/WebCore/page/scrolling/ScrollAnchoringController.h
    M Source/WebCore/platform/ScrollView.cpp
    M Source/WebCore/platform/ScrollView.h
    M Source/WebCore/platform/ScrollableArea.cpp
    M Source/WebCore/platform/ScrollableArea.h

  Log Message:
  -----------
  REGRESSION(307364@main): [macOS iOS] 
editing/execCommand/insert-line-break-no-scroll.html is a constant text failure
https://bugs.webkit.org/show_bug.cgi?id=307682
rdar://170242709

Reviewed by Wenson Hsieh.

We need to suppress scroll anchoring during editing operations to avoid 
unexpected jumping, as revealed by
`editing/execCommand/insert-line-break-no-scroll.html`.

Do this by piggy-backing on top of 
`ScrollView::ProhibitScrollingWhenChangingContentSizeForScope`, adding
a `ScrollAnchoringSuppressionScope` data member; that class maintains a "no 
scroll anchoring" scope,
implemented via a counter on ScrollAnchoringController.

This only fixes things for document scrolling. webkit.org/b/307695 tracks 
fixing this more generally
for subscrollers.

* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WebCore/page/scrolling/ScrollAnchoringController.cpp:
(WebCore::ScrollAnchoringController::adjustScrollPositionForAnchoring):
(WebCore::ScrollAnchoringController::startSuppressingScrollAnchoring):
(WebCore::ScrollAnchoringController::stopSuppressingScrollAnchoring):
* Source/WebCore/page/scrolling/ScrollAnchoringController.h:
* Source/WebCore/platform/ScrollView.cpp:
(WebCore::ScrollView::ProhibitScrollingWhenChangingContentSizeForScope::ProhibitScrollingWhenChangingContentSizeForScope):
* Source/WebCore/platform/ScrollView.h:
* Source/WebCore/platform/ScrollableArea.cpp:
(WebCore::ScrollAnchoringSuppressionScope::ScrollAnchoringSuppressionScope):
(WebCore::ScrollAnchoringSuppressionScope::~ScrollAnchoringSuppressionScope):
* Source/WebCore/platform/ScrollableArea.h:

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



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

Reply via email to