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

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-anchoring/suppress-for-top-change-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-anchoring/suppress-for-top-change.html
    M Source/WebCore/rendering/RenderElement.cpp

  Log Message:
  -----------
  [Scroll anchoring] learn.umgc.edu: scrolls to the bottom/top automatically
https://bugs.webkit.org/show_bug.cgi?id=311456
rdar://173885027

Reviewed by Abrar Rahman Protyasha.

This page scrolls uncontrollably because there's a sidebar item whose `top`
is set from script based on scroll position. This should not act as an anchor,
because changing `top` should suppress anchoring.

However, the code was only suppressing anchoring when the `Style::Difference`
was `> Layout`, but this is a `LayoutOutOfFlowMovementOnly` because the anchor
is positioned, so test against the diff types that can result from changes in
the suppression properties[1].

[1] https://drafts.csswg.org/css-scroll-anchoring/#suppression-triggers

Test: 
imported/w3c/web-platform-tests/css/css-scroll-anchoring/suppress-for-top-change.html

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-anchoring/suppress-for-top-change-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-anchoring/suppress-for-top-change.html:
 Added.
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::styleDidChange):

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



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

Reply via email to