Bug 247498 - StyleProperties::fontValue needs to return emptyString in many more cases where font sub properties have unusual values
Summary: StyleProperties::fontValue needs to return emptyString in many more cases whe...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Darin Adler
URL:
Keywords: InRadar
: 169259 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-11-04 12:27 PDT by Darin Adler
Modified: 2022-11-14 01:27 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2022-11-04 12:27:18 PDT
StyleProperties::fontValue needs to return emptyString in many more cases where font subproperties have values other than their initial values. We already do this in the fontShorthandValue function for computed style, but we need it for specified style too.
Comment 1 Darin Adler 2022-11-04 12:27:39 PDT
A significant part of the work here is to add test cases, preferably WPT tests.
Comment 2 Darin Adler 2022-11-05 09:56:33 PDT
I’m not actually sure what the desired behavior is here. I might need someone’s help to write the tests before changing any of the code. Tim, what do you think?
Comment 3 Radar WebKit Bug Importer 2022-11-11 11:28:23 PST
<rdar://problem/102248342>
Comment 4 Tim Nguyen (:ntim) 2022-11-11 22:18:06 PST
> I’m not actually sure what the desired behavior is here.

https://github.com/w3c/csswg-drafts/issues/8062

The font shorthand serialization should be empty when the subproperties are not representable by the shorthand.

We seem to have similar issues with other props too, see bug 247810
Comment 5 Darin Adler 2022-11-12 07:54:29 PST
I am working on a patch for this right now. Tim, hope you weren’t already working on it.
Comment 6 Darin Adler 2022-11-12 07:55:40 PST
The part I was not clear on was the "implicit" flag bit.
Comment 7 Darin Adler 2022-11-12 09:21:21 PST
Pull request: https://github.com/WebKit/WebKit/pull/6426
Comment 8 EWS 2022-11-13 23:53:58 PST
Committed 256635@main (d3d6e16bf1f0): <https://commits.webkit.org/256635@main>

Reviewed commits have been landed. Closing PR #6426 and removing active labels.
Comment 9 Tim Nguyen (:ntim) 2022-11-14 01:27:55 PST
*** Bug 169259 has been marked as a duplicate of this bug. ***