Bug 249685
Summary: | [CSS-Typed-OM] StylePropertyMap.set() should throw when trying to set a number for a property which doesn't allow it | ||
---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> |
Component: | CSS | Assignee: | Chris Dumez <cdumez> |
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: | 175733 |
Chris Dumez
StylePropertyMap.set() should throw when trying to set a number for a property which doesn't allow it.
We previously relied on our CSS parser for validation. However, CSS parsing is more permissive than CSS Typed OM is some cases. In particular, the CSS parser will append "px" to numbers in some cases for properties that need a <length>. For CSS Typed OM, the type needs to match exactly:
- https://drafts.css-houdini.org/css-typed-om-1/#cssstylevalue-match-a-grammar
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Chris Dumez
Pull request: https://github.com/WebKit/WebKit/pull/7945
EWS
Committed 258242@main (add3c9105b58): <https://commits.webkit.org/258242@main>
Reviewed commits have been landed. Closing PR #7945 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/103638252>