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

  Changed paths:
    M Source/WebCore/rendering/RenderElement.cpp
    M Source/WebCore/rendering/style/RenderStyle.cpp

  Log Message:
  -----------
  [Scroll anchoring] Optimize scrollAnchoringSuppressionStyleDidChange()
https://bugs.webkit.org/show_bug.cgi?id=307729
rdar://170277397

Reviewed by Alan Baradlay.

`scrollAnchoringSuppressionStyleDidChange()` shows up in some MotionMark tests.

Fix an erroneous `&&` to instead test pointer inequality, as we do everywhere 
else,
since his pointer is usually the same.

Check for `diff >= Style::DifferenceResult::Layout` because, by definition, 
things
that invalidate scroll anchoring affect layout.

Optimize the testing for the various transform properties; `transform` is 
stored in
`miscData`, and the others are stored in `rareData`. Also just test for 
`transform`,
`translate`, `scale`, and `rotate`. The spec only mentions the first [1] but it 
makes
sense to test the others as well. I purposefully removed testing for offset path
and perspective.

[1] https://drafts.csswg.org/css-scroll-anchoring/#suppression-trigger
[2] https://github.com/w3c/csswg-drafts/issues/13489

* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::styleDidChange):
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::scrollAnchoringSuppressionStyleDidChange const):

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



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

Reply via email to