Bug 159955

Summary: Align CSSStyleDeclaration.setProperty() with the specification
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, commit-queue, darin, dbates, dino, manian, rniwa, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar, WebExposed
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://drafts.csswg.org/cssom/#the-cssstyledeclaration-interface
See Also: https://bugs.webkit.org/show_bug.cgi?id=159959
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2016-07-19 15:27:02 PDT
Align CSSStyleDeclaration.setProperty() with the specification:
- https://drafts.csswg.org/cssom/#the-cssstyledeclaration-interface

In particular:
1. The 'value' parameter should not be optional
2. The 'priority' parameter should treat null as the empty string rather than the string "null"
3. The 'priority' parameter's default value should be the empty string, not the string "undefined"
4. CSSStyleDeclaration.setProperty() should return early if 'priority' is not the empty string and is not an ASCII case-insensitive match for the string "important".

Chrome matches the specification entirely. Firefox matches the specification with the exception that it does a case-sensitive match for "important".
Comment 1 Chris Dumez 2016-07-19 15:54:33 PDT
Created attachment 284065 [details]
Patch
Comment 2 Chris Dumez 2016-07-19 16:29:12 PDT
Created attachment 284067 [details]
Patch
Comment 3 WebKit Commit Bot 2016-07-19 18:21:19 PDT
Comment on attachment 284067 [details]
Patch

Clearing flags on attachment: 284067

Committed r203437: <http://trac.webkit.org/changeset/203437>
Comment 4 WebKit Commit Bot 2016-07-19 18:21:25 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Simon Fraser (smfr) 2017-07-05 19:21:42 PDT
rdar://problem/33108273