WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
100132
negative scale values in -webkit-image-set are handled incorrectly
https://bugs.webkit.org/show_bug.cgi?id=100132
Summary
negative scale values in -webkit-image-set are handled incorrectly
Rick Byers
Reported
2012-10-23 08:57:40 PDT
I noticed none of the existing image-set-parsing tests checked negative scale values, eg: background-image: url(a.png) -2x, url(b.png) -1x I tried this in chromium and it appears like it's simply ignorning the leading negative sign. I.e., the '-2x' image is used when the device scale factor is 2. The cssText property also shows the absolute value without the sign. I'm assuming such rules should be invalid. I glanced at the code for this, and it looks like CSSParser::parseImageSet is supposed to fail on negative values: if (imageScaleFactor <= 0) return 0; So parseDouble is presumably ignorning a leading '-'. I haven't dug in further.
Attachments
Add attachment
proposed patch, testcase, etc.
Ahmad Saleem
Comment 1
2024-07-28 12:10:21 PDT
@Tim & @Antti - is it still an issue, since with Interop 2023 - `image-set` support is improved significantly -
https://wpt.fyi/results/css/css-images/image-set?label=master&label=experimental&aligned&view=interop&q=label%3Ainterop-2023-webcompat
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug