Skip to content

Commit

Permalink
Bug 1513326 [wpt PR 14466] - Fix SVG-As-Background sizing, a=testonly
Browse files Browse the repository at this point in the history
Automatic update from web-platform-tests
Fix SVG-As-Background sizing

Addresses a TODO where we were snapping the intrinsic size of an SVG image,
even when that is no longer useful. This was posing issues with operations
using aspect ratio, because the computed aspect ratio on the snapped value
was wrong when then used on un-snapped values.

[email protected]
BUG=855882

Change-Id: I0c14c0109da4c5ca5e52aebf408e9b702eda799c
Reviewed-on: https://chromium-review.googlesource.com/c/1370486
Commit-Queue: Stephen Chenney <[email protected]>
Reviewed-by: Fredrik Söderquist <[email protected]>
Cr-Commit-Position: refs/heads/master@{#615798}

--

wpt-commits: 39f6169dae5bafb2f5d5d5b4a6595e20d63337b7
wpt-pr: 14466
  • Loading branch information
schenney-chromium authored and jgraham committed Jan 23, 2019
1 parent d8520c8 commit da559d6
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Background Test: A SVG background should fully cover the positioning area</title>
<link rel="author" title="schenney" href="mailto:[email protected]">
<link rel="help" href="http://www.w3.org/TR/css3-background">
<link rel="match" href="reference/background-size-cover-svg-ref.html">
<style>
div {
height: 400px;
width: 600px;
position: relative;
background-color: red;
background-size: cover;
background-repeat: no-repeat;
background-position: bottom center;
background-image: url("support/rectangle-2560x208.svg");
}
</style>
</head>

<body>
<div></div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Background Test Reference</title>
<link rel="author" title="schenney" href="mailto:[email protected]">
<style>
div {
height: 400px;
width: 600px;
position: relative;
background-color: red;
background-repeat: repeat;
background-position: bottom center;
background-image: url("../support/50x50-green.png");
}
</style>
</head>

<body>
<div></div>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit da559d6

Please sign in to comment.