New issue
Advanced search Search tips

Issue 844290 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

[css-typed-om] CSSNumericValue.parse should ignore leading whitespace.

Project Member Reported by shend@chromium.org, May 18 2018

Issue description

Example: CSSNumericValue.parse(' 100px') should work.

From the spec: https://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-parse . Parsing a component value ignores leading spaces: https://drafts.csswg.org/css-syntax-3/#parse-a-component-value
 

Comment 1 by shend@chromium.org, May 18 2018

Sorry, it should actually ignore both leading and trailing whitespaces.
Project Member

Comment 2 by bugdroid1@chromium.org, May 20 2018

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

commit b3c62041aaea962464d64516411371b9ef2c141d
Author: Darren Shen <shend@chromium.org>
Date: Sun May 20 23:18:36 2018

[css-typed-om] Ignore surrounding whitespace in CSSNumericValue.parse.

Fixes an issue where CSSNumericValue.parse considers valid strings
surrounded by whitespace to be invalid.

Bug:  844290 
Change-Id: I4c40044631276a611ef9a56aac21ddf09316a550
Reviewed-on: https://chromium-review.googlesource.com/1065532
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560207}
[modify] https://crrev.com/b3c62041aaea962464d64516411371b9ef2c141d/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/stylevalue-subclasses/numeric-objects/parse.tentative.html
[modify] https://crrev.com/b3c62041aaea962464d64516411371b9ef2c141d/third_party/blink/renderer/core/css/cssom/css_numeric_value.cc

Comment 3 by shend@chromium.org, May 20 2018

Status: Fixed (was: Assigned)

Sign in to add a comment