New issue
Advanced search Search tips

Issue 825549 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 4
Cc:
Components:
EstimatedDays: ----
NextAction: 2018-06-15
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 3
Type: Bug



Sign in to add a comment

background-size should not accept negative values

Project Member Reported by ericwilligers@chromium.org, Mar 25 2018

Issue description

Blink (and WebKit) currently accepts negative background-size.
https://jsfiddle.net/ericwilligers/2wzwt55t/

Spec: Negative values are not allowed.
https://drafts.csswg.org/css-backgrounds/#background-size

Negative values should be rejected during parsing, and they should be clamped during animation.

Also raised WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=183990
 

Comment 1 by e...@chromium.org, Mar 30 2018

Cc: futhark@chromium.org
Status: Available (was: Untriaged)
Owner: zhuoyu.q...@samsung.com
Status: Started (was: Available)
I will take this issue.
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 5 2018

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

commit 55816db5c7307cb87943dc09dfc2a79b91582422
Author: Eric Willigers <ericwilligers@chromium.org>
Date: Thu Apr 05 18:10:56 2018

CSS: Use count negative background-size

Add use counters for negative values in background-size and mask-size.

Spec forbids negative background-size.
https://drafts.csswg.org/css-backgrounds/#background-size

Bug:  825549 
Change-Id: I5415bd9123b86907665c552801fbeca4b587b1ea
Reviewed-on: https://chromium-review.googlesource.com/984913
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548486}
[add] https://crrev.com/55816db5c7307cb87943dc09dfc2a79b91582422/third_party/WebKit/LayoutTests/fast/css/usecounter-negative-background-size-longhand.html
[add] https://crrev.com/55816db5c7307cb87943dc09dfc2a79b91582422/third_party/WebKit/LayoutTests/fast/css/usecounter-negative-background-size-shorthand.html
[add] https://crrev.com/55816db5c7307cb87943dc09dfc2a79b91582422/third_party/WebKit/LayoutTests/fast/css/usecounter-negative-mask-size-longhand.html
[add] https://crrev.com/55816db5c7307cb87943dc09dfc2a79b91582422/third_party/WebKit/LayoutTests/fast/css/usecounter-negative-mask-size-shorthand.html
[modify] https://crrev.com/55816db5c7307cb87943dc09dfc2a79b91582422/third_party/WebKit/Source/core/css/properties/CSSParsingUtils.cpp
[modify] https://crrev.com/55816db5c7307cb87943dc09dfc2a79b91582422/third_party/WebKit/Source/core/css/properties/CSSParsingUtils.h
[modify] https://crrev.com/55816db5c7307cb87943dc09dfc2a79b91582422/third_party/WebKit/Source/core/css/properties/longhands/BackgroundSizeCustom.cpp
[modify] https://crrev.com/55816db5c7307cb87943dc09dfc2a79b91582422/third_party/WebKit/Source/core/css/properties/longhands/WebkitMaskSizeCustom.cpp
[modify] https://crrev.com/55816db5c7307cb87943dc09dfc2a79b91582422/third_party/WebKit/public/platform/web_feature.mojom
[modify] https://crrev.com/55816db5c7307cb87943dc09dfc2a79b91582422/tools/metrics/histograms/enums.xml

Comment 5 by cnardi@chromium.org, May 14 2018

NextAction: 2018-06-15
Use counters originally landed in M67, so setting a next action date of about two weeks following stable release of M67.
The NextAction date has arrived: 2018-06-15
The use counts are low and we can proceed to remove or deprecate/remove:

negative background-size 0.005%
https://www.chromestatus.com/metrics/feature/timeline/popularity/2402

negative mask-size 0%
https://www.chromestatus.com/metrics/feature/timeline/popularity/2403

Project Member

Comment 8 by bugdroid1@chromium.org, Jul 3

Status: Fixed (was: Started)

Sign in to add a comment