commit | b786c57cab4e93f6736fecfcc986c36dfbddd507 | [log] [tgz] |
---|---|---|
author | Anders Hartvoll Ruud <andruud@chromium.org> | Thu Aug 16 17:00:04 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Aug 16 17:00:04 2018 |
tree | 3c489e59e9c723a7dd6ff3204823d642b37e39a7 | |
parent | ecdb6a3b7887523a80b75a0fa774533a7cb93ac7 [diff] |
[css-properties-values-api] Support CSSStyleValues in StylePropertyMap.set. In StyleValueToCSSValue, when checking whether a certain CSSStyleValue matches the property in question, we now ask the registration (via CSSOMTypes) if the CSSStyleValue matches. If it doesn't match, we throw a TypeError like for normal properties. If it does match, the CSSStyleValue is stringified, tokenized, and set on the style rule as tokens. I have postponed support for <color> and <transform-function>, because CSSUnsupportedStyleValue currently does not handle registered custom properties at all. This is appropriate to fix in a separate CL. Note that, because the string version of StylePropertyMap.set also uses StyleValueToCSSValue, it will no longer be possible to set registered custom properties with a string--even if the syntax is matched. A subsequent CL will fix this. R=futhark@chromium.org Bug: 641877 Change-Id: Ie0cc2f87e39f8f59015824bfd1b81efaf402c326 Reviewed-on: https://chromium-review.googlesource.com/1175822 Commit-Queue: Anders Ruud <andruud@chromium.org> Reviewed-by: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#583695}
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 .