Bug 247688

Summary: Automatically get shorthands in StyleProperties::asTextInternal()
Product: WebKit Reporter: Oriol Brufau <obrufau>
Component: CSSAssignee: Oriol Brufau <obrufau>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 190496    

Description Oriol Brufau 2022-11-09 11:21:37 PST
StyleProperties::asTextInternal() tries to serialize declarations using shorthands when possible.
The list of shorthand candidates for each longhand is written manually.
This is a big and fragile bunch of code that's missing various shorthands.
Other shorthands are only mapped to some of their longhands but not others, causing bugs.

It would be better to use matchingShorthandsForLonghand() to find the list of shorthand candidates automatically.
Comment 1 Oriol Brufau 2022-11-09 11:28:42 PST
Pull request: https://github.com/WebKit/WebKit/pull/6307
Comment 2 EWS 2022-11-09 17:21:55 PST
Committed 256511@main (07aea4888889): <https://commits.webkit.org/256511@main>

Reviewed commits have been landed. Closing PR #6307 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2022-11-09 17:22:19 PST
<rdar://problem/102169019>