Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9f6f458310da74a70a4b35a6478d1aa0667a995b
      
https://github.com/WebKit/WebKit/commit/9f6f458310da74a70a4b35a6478d1aa0667a995b
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-10-05 (Mon, 05 Oct 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-computed-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-computed.html
    M Source/WebCore/style/StyleExtractorCustom.h

  Log Message:
  -----------
  [Style] The overscroll-behavior shorthand serializes max(x, y) instead of 
both axis values in getComputedStyle
https://bugs.webkit.org/show_bug.cgi?id=325429
rdar://188534035

Reviewed by Antti Koivisto.

This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.

The PropertyExtractorAdaptor for the overscroll-behavior shorthand
serialized the value as std::max(overscrollBehaviorX(),
overscrollBehaviorY()). Because OverscrollBehavior is ordered
Auto < Contain < None, this collapsed both axes into a single
"strongest" keyword, dropping the second value entirely: e.g.
`overscroll-behavior: contain auto` reported back as `contain`.

This was carried over verbatim from the old
CSSComputedStyleDeclaration. Per the spec [1], overscroll-behavior is a
shorthand that sets overscroll-behavior-x and overscroll-behavior-y in
that order, defaulting the second value to the first when only one is
given:

[1] https://drafts.csswg.org/css-overscroll/#overscroll-shorthand

It must therefore serialize both values as "x y" in canonical order,
coalescing to a single value only when the two axes are equal, matching
the parsed-declaration path in ShorthandSerializer::serializePair.

Serialize both axes, coalescing when they match, matching the pattern
used by the neighboring shorthand adaptors.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-computed.html:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-overscroll-behavior/parsing/overscroll-behavior-computed-expected.txt:
* Source/WebCore/style/StyleExtractorCustom.h:
(WebCore::Style::PropertyExtractorAdaptor<CSSPropertyOverscrollBehavior>::computedValue
 const):

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



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

Reply via email to