Bug 159955 - Align CSSStyleDeclaration.setProperty() with the specification
Summary: Align CSSStyleDeclaration.setProperty() with the specification
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: https://drafts.csswg.org/cssom/#the-c...
Keywords: InRadar, WebExposed
Depends on:
Blocks:
 
Reported: 2016-07-19 15:27 PDT by Chris Dumez
Modified: 2017-07-05 19:21 PDT (History)
10 users (show)

See Also:


Attachments
Patch (10.64 KB, patch)
2016-07-19 15:54 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (10.84 KB, patch)
2016-07-19 16:29 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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