Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7b79e6dcb6518f8515e13a2b36068cae6972b84e
      
https://github.com/WebKit/WebKit/commit/7b79e6dcb6518f8515e13a2b36068cae6972b84e
  Author: Issac Roy <[email protected]>
  Date:   2026-07-28 (Tue, 28 Jul 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-page/page-rule-declarations-000.html
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-page/parsing/size-valid-expected.txt
    M LayoutTests/printing/page-rule-css-text-expected.txt
    M Source/WebCore/css/parser/CSSPropertyParser.cpp

  Log Message:
  -----------
  Serialization of @page {size: letter portrait;} is incorrect. WPT failure
https://bugs.webkit.org/show_bug.cgi?id=299929
rdar://162168233

Reviewed by Tim Nguyen.

The default orientation for a bare <page-size> on the `size` @page descriptor
is still unsettled on https://github.com/w3c/csswg-drafts/issues/13178,
but presumably should be portrait. Hence, `letter portrait` should normalize
to `letter`. The issue was that it was stored as a CSSValuePair and just
serialized verbatim without normalization.

This should fix the fails on
https://wpt.fyi/results/css/css-page/page-rule-declarations-000.html
and https://wpt.fyi/css/css-page/parsing/size-valid.html.

Layout is unaffected: an absent orientation is already treated as portrait.

Covered by existing WPT tests; no new tests needed.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-page/page-rule-declarations-000.html:
Corrected stale `a4 portrait`/`jis-b5 portrait` expectations to `a4`/`jis-b5`.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-page/parsing/size-valid-expected.txt:
* LayoutTests/printing/page-rule-css-text-expected.txt:
* Source/WebCore/css/parser/CSSPropertyParser.cpp:
(WebCore::consumePageDescriptor): Drop a redundant `portrait` from a page-size 
pair.

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



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

Reply via email to