Closed Bug 1203142 Opened 9 years ago Closed 9 years ago

SeparatorRequiredBetweenTokens() needs to return true for two dashes

Categories

(Core :: CSS Parsing and Computation, defect)

37 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: SimonSapin, Assigned: heycam)

Details

Attachments

(2 files)

The attachment is a test case that Firefox currently fails. I just submitted it to the W3C test suite in https://github.com/w3c/csswg-test/pull/852

Custom property values is conceptually sequences of tokens, not strings. Firefox represents them as strings internally, and when substituting variable references with the corresponding value inserts `/**/` between adjacent tokens that would otherwise be re-parsed as a single token.

It relies on the table [1] in the css-syntax spec, but that table has not been updated when the definition of identifier tokens was extended [2] to allow `--` prefixes. This was just fixed [3].

[1] https://drafts.csswg.org/css-syntax/#serialization
[2] http://hg.csswg.org/drafts/rev/ab8b75f1fa88
[3] http://hg.csswg.org/drafts/rev/92d088e07ca2
This new eCSSTokenSerialization_Symbol_Minus case is the same as the earlier eCSSTokenSerialization_Symbol_Hash case, isn’t it?

Also, nice, more tests I didn’t know about. I might steal them for Servo :)
Attached patch patchSplinter Review
Thanks, yes looks like I can join those two cases.

If you want to convert my variables-related mochitests into Web Platform Tests at any point, please be my guest. :-)
Assignee: nobody → cam
Status: NEW → ASSIGNED
Attachment #8659635 - Flags: review?(simon.sapin)
Attachment #8659635 - Flags: review?(simon.sapin) → review+
https://hg.mozilla.org/mozilla-central/rev/5fc62c86d050
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: