Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 755ac38

Browse files
nt1mmoz-wptsync-bot
authored andcommitted
Bug 1793897 [wpt PR 36306] - Update backgrounds on transformed root element tests, a=testonly
Automatic update from web-platform-tests Update backgrounds on transformed root element tests (#36306) It was decided that transforms on the root element and on the canvas should not apply to the background-image. See: w3c/csswg-drafts#6683 (comment) Fixes web-platform-tests/interop#138 -- wpt-commits: 8c3d8900b04afb95d56ee1bee254d94657160f1b wpt-pr: 36306
1 parent 4ae3797 commit 755ac38

9 files changed

+14
-53
lines changed

testing/web-platform/tests/css/css-transforms/support/transform-triangle-left-small.svg

Lines changed: 0 additions & 4 deletions
This file was deleted.

testing/web-platform/tests/css/css-transforms/transform-background-007.html

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,10 @@
55
<link rel="author" title="Aryeh Gregor" href="mailto:[email protected]">
66
<link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-rendering">
77
<link rel="reviewer" title="Apple Inc." href="http://www.apple.com">
8-
<meta name="assert" content='"If the root element is transformed, the
9-
transformation applies to the entire canvas, including any background
10-
specified for the root element. Since the background painting area for the
11-
root element is the entire canvas, which is infinite, the transformation
12-
might cause parts of the background that were originally off-screen to
13-
appear. For example, if the root element&apos;s background were repeating
14-
dots, and a transformation of &apos;scale(0.5)&apos; were specified on the
15-
root element, the dots would shrink to half their size, but there will be
16-
twice as many, so they still cover the whole viewport." In this case, the
17-
background is specified on the body but propagates to the root element.
18-
The transform is on the root element, so it needs to affect the background.
19-
The rotation 90 degrees clockwise means that most of the screen will be
20-
filled with triangles that were originally above the top of the viewport;
21-
the original top row of triangles will now be on the left.'>
8+
<meta name="assert" content='"If the root element is transformed, the transformation should not apply to
9+
any background specified for the root element.'>
2210
<meta name="flags" content="svg">
23-
<link rel="match" href="transform-background-ref-2.html">
24-
<meta name="fuzzy" content="maxDifference=0-1;totalPixels=0-4800">
11+
<link rel="match" href="transform-root-bg-001-ref.html">
2512
<style>
2613
html {
2714
overflow: hidden;

testing/web-platform/tests/css/css-transforms/transform-background-008.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
root element instead of being specified on the body and propagating to the
1111
root.'>
1212
<meta name="flags" content="svg">
13-
<link rel="match" href="transform-background-ref-2.html">
14-
<meta name="fuzzy" content="maxDifference=0-1;totalPixels=0-4800">
13+
<link rel="match" href="transform-root-bg-001-ref.html">
1514
<style>
1615
html {
1716
background: url(support/transform-triangle-left.svg);

testing/web-platform/tests/css/css-transforms/transform-root-bg-001-ref.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<link rel="author" title="Aryeh Gregor" href="mailto:[email protected]">
66
<style>
77
html {
8-
background: url(support/transform-triangle-right.svg) top right;
8+
background: url(support/transform-triangle-left.svg) top left;
99
}
1010
body {
1111
/* The default 8px margin makes the background not line up exactly */

testing/web-platform/tests/css/css-transforms/transform-root-bg-001.html

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,10 @@
55
<link rel="author" title="Aryeh Gregor" href="mailto:[email protected]">
66
<link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-rendering">
77
<meta name="assert" content="The background here extends to the whole
8-
canvas, and a transform on the root element must transform the whole
9-
canvas, background included. Thus the entire tiled background of
10-
left-pointing triangles needs to be rotated 180 degrees (same as scale(-1))
11-
around the top center of the viewport, which is the default
12-
transform-origin of 50% 50% in this case. An implementation that doesn't
13-
draw the background on parts of the canvas outside the viewport might
14-
incorrectly display nothing, because the part of the background that's
15-
supposed to be rotated into view was initially above the visible part of
16-
the canvas.">
8+
canvas, and a transform on the root element should not transform the
9+
canvas background. Thus the entire tiled background of left-pointing triangles
10+
should not be rotated. An implementation that doesn't draw the background
11+
correctly may rotate the background, or incorrectly clip it.">
1712
<link rel="match" href="transform-root-bg-001-ref.html">
1813
<style>
1914
html {

testing/web-platform/tests/css/css-transforms/transform-root-bg-003-ref.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

testing/web-platform/tests/css/css-transforms/transform-root-bg-003.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
transform-root-bg-001.html, except that it uses scale(0.5) instead of
99
scale(-1). It also specifies a transform-origin, because the default of
1010
50% 50% wouldn't work well with the way the reference image is constructed.">
11-
<link rel="match" href="transform-root-bg-003-ref.html">
11+
<link rel="match" href="transform-root-bg-001-ref.html">
1212
<style>
1313
html {
1414
background: url(support/transform-triangle-left.svg);

testing/web-platform/tests/css/css-transforms/transform-translate-background-001.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
<link rel="help" href="https://drafts.csswg.org/css-transforms/#transform-rendering">
77
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=988446">
88
<link rel="match" href="transform-translate-background-001-ref.html">
9-
<meta name="assert" content="Checks that the linear gradient is modified when you vertically translate the root element. The test passes if you see only green.">
9+
<meta name="assert" content="Checks that the linear gradient is not modified when you vertically translate the root element. The test passes if you see only green.">
1010
<style>
1111
html {
12-
background: linear-gradient(to bottom, red 0%, red 50%, green 50%, green 100%);
12+
background: linear-gradient(to bottom, green 0%, green 50%, red 50%, red 100%);
1313
transform: translate(0, -250vh);
1414
}
1515
</style>

testing/web-platform/tests/css/css-transforms/transform-translate-background-002.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
<link rel="help" href="https://drafts.csswg.org/css-transforms/#transform-rendering">
77
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=988446">
88
<link rel="match" href="transform-translate-background-001-ref.html">
9-
<meta name="assert" content="Checks that the linear gradient is modified when you dynamically translate the root element. The test passes if you see only green.">
9+
<meta name="assert" content="Checks that the linear gradient is not modified when you dynamically translate the root element. The test passes if you see only green.">
1010
<script src="/common/reftest-wait.js"></script>
1111
<style>
1212
html {
13-
background: linear-gradient(to bottom, red 0%, red 50%, green 50%, green 100%);
13+
background: linear-gradient(to bottom, green 0%, green 50%, red 50%, red 100%);
1414
}
1515
</style>
1616
<div style="height: 400vh;"></div>

0 commit comments

Comments
 (0)