New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 808888 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Email to this user bounced
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Comments should be accepted as a separator for arguments if the separator is whitespace

Project Member Reported by cnardi@chromium.org, Feb 4 2018

Issue description

Spun off from  bug 788707 . See e.g. https://w3c-test.org/css/vendor-imports/mozilla/mozilla-central-reftests/color4/background-color-rgb-002.html.

The spec text for this is https://drafts.csswg.org/css-values-4/#component-whitespace which states that "white space and/or comments may appear before, after, and/or between components combined using the above combinators and multipliers". This likely extends further than just the RGB/HSL functions, but I'm not sure.
 
Owner: rob.b...@samsung.com
Status: Assigned (was: Available)
Project Member

Comment 2 by bugdroid1@chromium.org, Mar 15 2018

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

commit b207b03193de4b9d8ab8ae8ca122869e25f21c3e
Author: Rob Buis <rob.buis@samsung.com>
Date: Thu Mar 15 10:21:22 2018

Accept comments as separators in rgba/hsla

In order to make this work, because comments are already stripped
by the time ParseRGBParameters/ParseHSLParameters is reached, relax
the strictness and simply require the color components to be there.

This works since although the comment is stripped out, the effect is
that it still acts as a separator and will preserve numeric tokens:
1/* comment */2 -> NumericToken(1) + NumericToken(2)

Behavior matches Firefox.

Bug:  808888 

Change-Id: I43ae53a0d7630b8229745a347c5fb914f8949589
Reviewed-on: https://chromium-review.googlesource.com/962989
Reviewed-by: Timothy Loh <timloh@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Rob Buis <rob.buis@samsung.com>
Cr-Commit-Position: refs/heads/master@{#543337}
[modify] https://crrev.com/b207b03193de4b9d8ab8ae8ca122869e25f21c3e/third_party/WebKit/LayoutTests/W3CImportExpectations
[modify] https://crrev.com/b207b03193de4b9d8ab8ae8ca122869e25f21c3e/third_party/WebKit/LayoutTests/svg/dom/rgb-color-parser-expected.txt
[modify] https://crrev.com/b207b03193de4b9d8ab8ae8ca122869e25f21c3e/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment