-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for non-positive resolutions to image-set
This change was triggered by the recently added wpt tests that started failing after auto import: third_party/blink/web_tests/external/wpt/css/css-images/image-set/image-set-zero-resolution-rendering.html third_party/blink/web_tests/external/wpt/css/css-images/image-set/image-set-zero-resolution-rendering-2.html Currently the spec does not restrict the range for resolution, thus non-positive resolutions are valid and should not be rejected at parse time. The current consensus is to parse the non-positive resolutions, but treat them as unsupported options for rendering purposes. With this change, image-set will match resolution parsing with media queries. An issue has been opend for the spec to define the valid argument range for resolution: w3c/csswg-drafts#8532 In the discussion on the issue new proposals were added about how to treat zero resolutions for rendering purposes. Until the spec is well defined in this area we will remove the zero resolution rendering tests. R=futhark, pdr Change-Id: I7b329519168f3c088f5c9ee8614931b0ead7a4df Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4312883 Commit-Queue: Philip Rogers <pdr@chromium.org> Commit-Queue: Traian Captan <tcaptan@chromium.org> Reviewed-by: Philip Rogers <pdr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1114116}
- Loading branch information
1 parent
19aa967
commit f0de80a
Showing
4 changed files
with
55 additions
and
22 deletions.
There are no files selected for viewing
7 changes: 3 additions & 4 deletions
7
...mage-set-zero-resolution-rendering-2.html → ...-set-negative-resolution-rendering-2.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
css/css-images/image-set/image-set-negative-resolution-rendering.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<title>Image set negative resolution rendering</title> | ||
<link rel="author" title="Traian Captan" href="mailto:tcaptan@chromium.org"> | ||
<link rel="help" href="https://drafts.csswg.org/css-images-4/#image-set-notation"> | ||
<link rel="match" href="/css/reference/blank.html"> | ||
<meta name="assert" content="image-set rendering with negative resolution"> | ||
<style> | ||
#test { | ||
background-image: url("/images/red.png"); | ||
background-image: image-set(url("/images/green.png") -1x); | ||
width: 100px; | ||
height: 100px; | ||
} | ||
</style> | ||
<div id="test"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
css/css-images/image-set/image-set-zero-resolution-rendering.html
This file was deleted.
Oops, something went wrong.