Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4ccbdab29e67826e6b314f09a9399c9157203982
      
https://github.com/WebKit/WebKit/commit/4ccbdab29e67826e6b314f09a9399c9157203982
  Author: Ahmad Saleem <[email protected]>
  Date:   2025-09-17 (Wed, 17 Sep 2025)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-display/display-first-letter-001-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-display/display-first-letter-001.html
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-display/display-first-line-001-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-display/display-first-line-001.html
    M Source/WebCore/style/StyleAdjuster.cpp
    M Source/WebCore/style/StyleAdjuster.h

  Log Message:
  -----------
  Adjust display type of ::first-letter pseudo-element
https://bugs.webkit.org/show_bug.cgi?id=298972
rdar://160710650

Reviewed by Antti Koivisto.

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

According to web specification [1]. we cannot set the display on first-letter
pseudo element and we should force display type inline except in case of
float. This patch adds this case.

Additonally, we segregate test case from combined of ::first-letter and
::first-line into separate to show progression and make it more clear.

[1] https://www.w3.org/TR/css-display-3/#placement

* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjustFirstLetterStyle):
(WebCore::Style::Adjuster::adjust const):
* Source/WebCore/style/StyleAdjuster.h:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-display/display-first-letter-001-expected.txt:
 Added + Progression.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-display/display-first-letter-001.html:
 Copied from 
LayoutTests/imported/w3c/web-platform-tests/css/css-display/display-first-line-001.html.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-display/display-first-line-001.html:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-display/display-first-line-001-expected.txt:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to