Can't set background-image or border-style to new CSSKeywordValue('none'). Attempting to do so throws TypeError("Invalid type for property"). It does work for transform, however. 'none' is a valid value for background-image (https://drafts.csswg.org/css-backgrounds-3/#background-image) and border-style (https://drafts.csswg.org/css-backgrounds-3/#the-border-style), so it should be possible. Setting it with the normal CSSOM works.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b2cef4230a879b622aa29eea20154960bd402f7b commit b2cef4230a879b622aa29eea20154960bd402f7b Author: meade <meade@chromium.org> Date: Fri Feb 24 00:38:51 2017 Output correct types from CSSKeywordValue for css-wide keywords Also, for list-valued properties, pass the css-wide keyword's CSSValue into the inline style directly instead of wrapping it in a CSSValueList, as that is invalid too. Previously, our tests didn't use an element that was in the document, and didn't force a style recalc, so this issue did not hit the DCHECK. BUG= 691455 ,545318 Review-Url: https://codereview.chromium.org/2692043004 Cr-Commit-Position: refs/heads/master@{#452691} [modify] https://crrev.com/b2cef4230a879b622aa29eea20154960bd402f7b/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/bottom.html [modify] https://crrev.com/b2cef4230a879b622aa29eea20154960bd402f7b/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/property-suite.js [modify] https://crrev.com/b2cef4230a879b622aa29eea20154960bd402f7b/third_party/WebKit/Source/core/css/cssom/CSSKeywordValue.cpp [modify] https://crrev.com/b2cef4230a879b622aa29eea20154960bd402f7b/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ced73dcd242b3c859323a03a2291d08e3c3f584a commit ced73dcd242b3c859323a03a2291d08e3c3f584a Author: nainar <nainar@chromium.org> Date: Wed Mar 01 09:04:03 2017 Make background-image and border-*-style accept CSSKeywordValue('none') as an acceptable value This patch makes background-image and border-*-style accept CSSKeywordValue('none') as an acceptable value by editing the CSSProperties.json5 file. It also adds the LayoutTest that tests this change. BUG= 691455 Review-Url: https://codereview.chromium.org/2714663002 Cr-Commit-Position: refs/heads/master@{#453889} [add] https://crrev.com/ced73dcd242b3c859323a03a2291d08e3c3f584a/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/background-image.html [add] https://crrev.com/ced73dcd242b3c859323a03a2291d08e3c3f584a/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/border-bottom-style.html [add] https://crrev.com/ced73dcd242b3c859323a03a2291d08e3c3f584a/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/border-left-style.html [add] https://crrev.com/ced73dcd242b3c859323a03a2291d08e3c3f584a/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/border-right-style.html [add] https://crrev.com/ced73dcd242b3c859323a03a2291d08e3c3f584a/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/border-top-style.html [add] https://crrev.com/ced73dcd242b3c859323a03a2291d08e3c3f584a/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/config-templates.js [modify] https://crrev.com/ced73dcd242b3c859323a03a2291d08e3c3f584a/third_party/WebKit/Source/core/css/CSSProperties.json5
Comment 1 by rjwright@chromium.org
, Feb 13 2017Owner: meade@chromium.org
Status: Assigned (was: Untriaged)