Bug 212435
| Summary: | makeprop.pl should use a preprocessor instead of "defines" | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Darin Adler <darin> |
| Component: | Tools / Tests | Assignee: | Darin Adler <darin> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | timothy |
| Priority: | P2 | ||
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Darin Adler
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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Darin Adler
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?
Daniel Bates
JSON is consumed by <https://webkit.org/css-status/>. Solution should include plan to keep that working.
Timothy Hatcher
The JSON on that page is directly loaded from SVN: https://svn.webkit.org/repository/webkit/trunk/Source/WebCore/css/CSSProperties.json
Daniel Bates
(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.
Darin Adler
I found a way. I won’t change this script or file.