Bug 159959

Summary: CSSStyleDeclaration.setProperty() should be able to unset "important" on a property
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: CSSAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, benjamin, buildbot, commit-queue, darin, dino, kling, rniwa
Priority: P2 Keywords: WebExposed
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=159955
https://bugs.webkit.org/show_bug.cgi?id=129994
https://bugs.webkit.org/show_bug.cgi?id=60007
Attachments:
Description Flags
WIP patch
none
WIP patch
none
Archive of layout-test-results from ews105 for mac-yosemite-wk2
none
Patch none

Chris Dumez
Reported 2016-07-19 16:40:12 PDT
CSSStyleDeclaration.setProperty() should be able to unset "important" on a property. Currently, if you do the following: element.style.setProperty("color", "red", "important"); element.style.setProperty("color", "red", ""); It does not unset the "important" flag on the color property. Relevant specification: - https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty - https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-camel-cased-attribute Firefox and Chrome match the specification here.
Attachments
WIP patch (3.27 KB, patch)
2016-07-19 16:53 PDT, Chris Dumez
no flags
WIP patch (3.28 KB, patch)
2016-07-19 16:53 PDT, Chris Dumez
no flags
Archive of layout-test-results from ews105 for mac-yosemite-wk2 (1.10 MB, application/zip)
2016-07-19 17:29 PDT, Build Bot
no flags
Patch (6.31 KB, patch)
2016-07-20 10:08 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2016-07-19 16:53:09 PDT
Created attachment 284070 [details] WIP patch
Chris Dumez
Comment 2 2016-07-19 16:53:59 PDT
Created attachment 284072 [details] WIP patch
Build Bot
Comment 3 2016-07-19 17:29:05 PDT
Comment on attachment 284072 [details] WIP patch Attachment 284072 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/1709355 New failing tests: fast/mediastream/MediaStream-video-element-displays-buffer.html
Build Bot
Comment 4 2016-07-19 17:29:08 PDT
Created attachment 284073 [details] Archive of layout-test-results from ews105 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Chris Dumez
Comment 5 2016-07-20 10:01:21 PDT
Comment on attachment 284072 [details] WIP patch View in context: https://bugs.webkit.org/attachment.cgi?id=284072&action=review > Source/WebCore/css/StyleProperties.cpp:-887 > - // Only add properties that have no !important counterpart present Looks like this code was added via https://bugs.webkit.org/show_bug.cgi?id=60007 whose layout test is LayoutTests/fast/css/important-js-override.html. However, the behavior covered in LayoutTests/fast/css/important-js-override.html does not match the latest specification and this test is failing in both Firefox and Chrome.
Chris Dumez
Comment 6 2016-07-20 10:08:25 PDT
WebKit Commit Bot
Comment 7 2016-07-20 11:02:23 PDT
Comment on attachment 284118 [details] Patch Clearing flags on attachment: 284118 Committed r203460: <http://trac.webkit.org/changeset/203460>
WebKit Commit Bot
Comment 8 2016-07-20 11:02:31 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.