Closed Bug 1438416 Opened 4 years ago Closed 4 years ago
[wpt-sync] PR 9535 - [css-typed-om] Make Style
Property Map .set work with calcs .
Currently StylePropertyMap.set doesn't actually work with calcs. The current way to check if something is, say, a <length> is to check its CSSStyleValue::Type. However, this doesn't return the right value for CSSMathValues, whose types may be quite complicated. The correct way is to use the CSSNumericValue matching algorthms: CSSNumericValue::MatchesLength, which also takes into account CSSMathValues and percent hints. This patch changes the following to make this work: - Removed base types from CSSStyleValue::StyleValueType. A base type like "length" is not really a CSSStyleValue type. - Removed unused StyleValueTypeToString. - Changed "Percent" to "Percentage" in CSSProperties.json5 as that's the correct term. - Changed make_cssom_types to use the matching algorithms from CSSNumericValue. Bug: 545318 Change-Id: I16aa71a4873e9992749f0f52ba641671d109170e Reviewed-on: https://chromium-review.googlesource.com/901002 WPT-Export-Revision: 07699e1a28a9572b82c54adc8c5ca2569cb6394f
4 years ago
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/44e5006d2987 [wpt PR 9535] - [css-typed-om] Make StylePropertyMap.set work with calcs., a=testonly
You need to log in before you can comment on or make changes to this bug.