Bug 212435 - makeprop.pl should use a preprocessor instead of "defines"
Summary: makeprop.pl should use a preprocessor instead of "defines"
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-27 14:58 PDT by Darin Adler
Modified: 2020-05-27 18:22 PDT (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 Darin Adler 2020-05-27 14:58:45 PDT
The makeprop.pl script decides which properties to include based on conditions inside the JSON file. But instead it should use a preprocessor so it can share feature definitions with C++ and makevalues.pl.
Comment 1 Darin Adler 2020-05-27 14:59:59 PDT
Unfortunately that means that CSSProperties.json would not actually be a JSON file any more. It would be a JSON file with preprocessor defines in it. Maybe there's some better way?
Comment 2 Daniel Bates 2020-05-27 15:32:18 PDT
JSON is consumed by <https://webkit.org/css-status/>. Solution should include plan to keep that working.
Comment 3 Timothy Hatcher 2020-05-27 15:38:32 PDT
The JSON on that page is directly loaded from SVN: https://svn.webkit.org/repository/webkit/trunk/Source/WebCore/css/CSSProperties.json
Comment 4 Daniel Bates 2020-05-27 15:43:00 PDT
(In reply to Darin Adler from comment #1)
> Unfortunately that means that CSSProperties.json would not actually be a
> JSON file any more. It would be a JSON file with preprocessor defines in it.
> Maybe there's some better way?

To find an elegant solution I would need to think about it. Working with the constraints at hand: must use preprocessor and must keep webkit.org CSS page working then easy solution is to patch up webkit.org CSS page to remove preprocessor directives before parsing as JSON.
Comment 5 Darin Adler 2020-05-27 18:19:46 PDT
I found a way. I won’t change this script or file.