commit | 89de27e2df236a2caf81d8c225a224e6f7535f40 | [log] [tgz] |
---|---|---|
author | Darren Shen <shend@chromium.org> | Fri Feb 16 05:10:36 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Feb 16 05:10:36 2018 |
tree | 376598163113b5ea196e0579b0087c5859d4e2c0 | |
parent | ca44fdbd7ef706c2ffc0347973fa7ffb6626a10c [diff] |
[css-typed-om] Make StylePropertyMap.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 Commit-Queue: Darren Shen <shend@chromium.org> Reviewed-by: nainar <nainar@chromium.org> Cr-Commit-Position: refs/heads/master@{#537206}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .