Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-typed-om] Generate whitelist from CSSProperties.json5. #9934

Merged
merged 1 commit into from Mar 13, 2018

Conversation

Projects
None yet
4 participants
@chromium-wpt-export-bot
Copy link
Collaborator

chromium-wpt-export-bot commented Mar 9, 2018

Currently, any CSS property in CSSProperties.json5 with keywords will
implicitly accept keywords. This can cause crashes if the property
doesn't actually store keywords as CSSIdenifierValues.

We solved this by having a manual whitelist of properties we explicitly
support. However, this is annoying to maintain. So we generate this
whitelist from CSSProperties.json5 by explicitly specifying "Keyword"
as a typedom_type.

e.g. a property that doesn't have typedom_types will not be supported
by Typed OM. A property that has "Keyword" in typedom_types will
take CSSKeywordValues and reify as CSSKeywordValues.

We also add support for scroll-padding-* because the JSON for that
was already there and we just to write a test for it.

Diff of generated files:
https://gist.github.com/darrnshn/03cb617909abab7bf94aaaaad9874a15/revisions

Bug: 820299
Change-Id: I6fa01c3623161e0778c5f8764009c6e0cdd6bbf3
Reviewed-on: https://chromium-review.googlesource.com/956903
Reviewed-by: nainar nainar@chromium.org
Commit-Queue: Darren Shen shend@chromium.org
Cr-Commit-Position: refs/heads/master@{#542697}

@wpt-pr-bot
Copy link
Collaborator

wpt-pr-bot left a comment

Already reviewed downstream.

@w3c-bots

This comment has been minimized.

Copy link

w3c-bots commented Mar 9, 2018

Build PASSED

Started: 2018-03-13 02:37:42
Finished: 2018-03-13 02:43:40

View more information about this build on:

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-956903 branch from e0833c3 to 7cb5806 Mar 12, 2018

[css-typed-om] Generate whitelist from CSSProperties.json5.
Currently, any CSS property in CSSProperties.json5 with keywords will
implicitly accept keywords. This can cause crashes if the property
doesn't actually store keywords as CSSIdenifierValues.

We solved this by having a manual whitelist of properties we explicitly
support. However, this is annoying to maintain. So we generate this
whitelist from CSSProperties.json5 by explicitly specifying "Keyword"
as a typedom_type.

e.g. a property that doesn't have typedom_types will not be supported
by Typed OM. A property that has "Keyword" in typedom_types will
take CSSKeywordValues and reify as CSSKeywordValues.

We also add support for scroll-padding-* because the JSON for that
was already there and we just to write a test for it.

Diff of generated files:
https://gist.github.com/darrnshn/03cb617909abab7bf94aaaaad9874a15/revisions

Bug: 820299
Change-Id: I6fa01c3623161e0778c5f8764009c6e0cdd6bbf3
Reviewed-on: https://chromium-review.googlesource.com/956903
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542697}

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-956903 branch from 7cb5806 to 41d7b34 Mar 13, 2018

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 6163df2 into master Mar 13, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-956903 branch Mar 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.