New issue
Advanced search Search tips

Issue 828272 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Serialize custom properties as identifiers to ensure valid output

Project Member Reported by cnardi@chromium.org, Apr 3 2018

Issue description

We fail two parts of https://w3c-test.org/css/cssom/variable-names.html since we do not serialize custom properties as identifiers and, as a result, do not escape characters that are not valid in identifiers.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 3 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f9d61d01ea0a33eb3608b9749ff7142667a00411

commit f9d61d01ea0a33eb3608b9749ff7142667a00411
Author: Chris Nardi <cnardi@chromium.org>
Date: Tue Apr 03 16:53:51 2018

Serialize custom property names as identifiers

Custom property names are defined [1] to be "any valid identifier that
starts with two dashes." As such, they need to be serialized as
identifiers, in order to ensure that reparsing generates a valid custom
property name. Change our serialization of custom property names to use
SerializeIdentifier().

[1]: https://drafts.csswg.org/css-variables/#typedef-custom-property-name

Bug:  828272 
Change-Id: Icd830b6b3b38f0414877c6d8dec69efa00318bb3
Reviewed-on: https://chromium-review.googlesource.com/991608
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Chris Nardi <cnardi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547733}
[delete] https://crrev.com/045cec8bc5c98827e8a063250162977daee52255/third_party/WebKit/LayoutTests/external/wpt/css/cssom/variable-names-expected.txt
[modify] https://crrev.com/f9d61d01ea0a33eb3608b9749ff7142667a00411/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp

Status: Fixed (was: Started)

Sign in to add a comment