Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2f7d04cbae67d35d6c3f2830cb134313c9b0dde1
      
https://github.com/WebKit/WebKit/commit/2f7d04cbae67d35d6c3f2830cb134313c9b0dde1
  Author: Ahmad Saleem <ahmad.saleem792+git...@gmail.com>
  Date:   2025-03-08 (Sat, 08 Mar 2025)

  Changed paths:
    M LayoutTests/TestExpectations
    R LayoutTests/fast/html/font-weight-bold-for-b-and-strong.html
    A LayoutTests/fast/html/font-weight-bolder-for-b-and-strong-expected.html
    A LayoutTests/fast/html/font-weight-bolder-for-b-and-strong.html
    R 
LayoutTests/platform/glib/fast/html/font-weight-bold-for-b-and-strong-expected.txt
    R 
LayoutTests/platform/gtk/fast/html/font-weight-bold-for-b-and-strong-expected.png
    R 
LayoutTests/platform/ios/fast/html/font-weight-bold-for-b-and-strong-expected.txt
    R 
LayoutTests/platform/mac/fast/html/font-weight-bold-for-b-and-strong-expected.png
    R 
LayoutTests/platform/mac/fast/html/font-weight-bold-for-b-and-strong-expected.txt
    M LayoutTests/platform/win/TestExpectations
    R 
LayoutTests/platform/win/fast/html/font-weight-bold-for-b-and-strong-expected.txt
    M Source/WebCore/css/html.css
    M Source/WebCore/editing/EditingStyle.cpp

  Log Message:
  -----------
  Sync `b` and `strong` to `font-weight: bolder` as per Web Specification

https://bugs.webkit.org/show_bug.cgi?id=289297
rdar://146458131

Reviewed by Tim Nguyen.

This patch aligns WebKit with Web Specification [1]:

[1] https://html.spec.whatwg.org/multipage/rendering.html#phrasing-content-3

Our current implementation had `font-weight: bold` for `strong` and `b` and
this patch fixes it to make it `font-weight: bolder` and align with other
browser engines as well.

It also updates local test similar to below Blink Commit [2]:

[2] https://chromium-review.googlesource.com/c/chromium/src/+/6269883

>From this change, we start hitting `primitiveValue->isNumber()` assertion and
looking into `fontWeightValueIsBold` function, we were hitting this assertion 
because
in `switch` statement, we were not handling `CSSValueBolder`, so `bolder` was
hitting assertion, which is to ensure that it is `number` only.

* LayoutTests/TestExpectations:
* Source/WebCore/css/html.css:
(strong, b):
* Source/WebCore/editing/EditingStyle.cpp:
(fontWeightValueIsBold):

> Renamed `font-weight-bold-for-b-and-strong.html` to 
> `font-weight-bolder-for-b-and-strong.html`:
* 
LayoutTests/platform/gtk/fast/html/font-weight-bold-for-b-and-strong-expected.png:
 Removed.
* 
LayoutTests/platform/ios/fast/html/font-weight-bold-for-b-and-strong-expected.txt:
 Ditto
* 
LayoutTests/platform/mac/fast/html/font-weight-bold-for-b-and-strong-expected.png:
 Ditto
* 
LayoutTests/platform/mac/fast/html/font-weight-bold-for-b-and-strong-expected.txt:
 Ditto
* 
LayoutTests/platform/win/fast/html/font-weight-bold-for-b-and-strong-expected.txt:
 Ditto
* 
LayoutTests/platform/glib/fast/html/font-weight-bold-for-b-and-strong-expected.txt:
 Ditto
* LayoutTests/fast/html/font-weight-bold-for-b-and-strong.html: Ditto

* LayoutTests/fast/html/font-weight-bolder-for-b-and-strong.html:
* LayoutTests/fast/html/font-weight-bolder-for-b-and-strong-expected.html:
* LayoutTests/platform/win/TestExpectations: Update due to test name change

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



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

Reply via email to