Bug 247688 - Automatically get shorthands in StyleProperties::asTextInternal()
Summary: Automatically get shorthands in StyleProperties::asTextInternal()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Oriol Brufau
URL:
Keywords: InRadar
Depends on:
Blocks: 190496
  Show dependency treegraph
 
Reported: 2022-11-09 11:21 PST by Oriol Brufau
Modified: 2022-11-09 17:22 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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>