Bug 1673016 [wpt PR 26259] - Revised test to match behaviour in spec, as revised in issue #245, a=testonly

Automatic update from web-platform-tests
Revised test to match behaviour in spec, as revised in issue #245 (#26259)

Co-authored-by: Mike <mike@qtunes.org>
--

wpt-commits: 080385a6d06fe04feaf857ccc6e29b97f9caee24
wpt-pr: 26259
This commit is contained in:
Mike Bremford 2020-10-27 04:57:49 +00:00 коммит произвёл moz-wptsync-bot
Родитель b272ca94f2
Коммит e6eb6e8bf8
2 изменённых файлов: 29 добавлений и 18 удалений

Просмотреть файл

@ -8,12 +8,12 @@
<body>
<svg width="200" height="200">
<foreignObject x="0" y="0" width="200" height="200">
<div style="width: 200px; height: 200px; background: red"></div>
<div style="width: 200px; height: 200px;"></div>
</foreignObject>
</svg>
<svg width="200" height="200">
<foreignObject x="0" y="0" width="200" height="200">
<div style="width: 200px; height: 200px; background: red"></div>
<div style="width: 200px; height: 200px; background: green"></div>
</foreignObject>
</svg>
<svg width="200" height="200">
@ -23,28 +23,28 @@
</svg>
<svg width="200" height="200">
<foreignObject x="0" y="0" width="200" height="200">
<div style="width: 200px; height: 200px;"></div>
<div style="width: 200px; height: 200px; background: green"></div>
</foreignObject>
</svg>
<!-- make sure masking actually works -->
<svg width="200" height="200">
<rect x="0" y="0" width="100" height="50" fill="red"></rect>
<rect x="0" y="100" width="100" height="50" fill="red"></rect>
<rect x="0" y="0" width="100" height="50" fill="green"></rect>
<rect x="0" y="100" width="100" height="50" fill="green"></rect>
</svg>
<svg width="200" height="200">
<rect x="0" y="0" width="100" height="50" fill="red"></rect>
<rect x="0" y="100" width="100" height="50" fill="red"></rect>
<rect x="0" y="0" width="100" height="50" fill="green"></rect>
<rect x="0" y="100" width="100" height="50" fill="green"></rect>
</svg>
<!-- make sure masking works on active content -->
<svg width="200" height="200">
<rect x="0" y="0" width="100" height="50" fill="red"></rect>
<rect x="0" y="100" width="100" height="50" fill="red"></rect>
<rect x="0" y="0" width="100" height="50" fill="green"></rect>
<rect x="0" y="100" width="100" height="50" fill="green"></rect>
</svg>
<svg width="200" height="200">
<rect x="0" y="0" width="100" height="50" fill="red"></rect>
<rect x="0" y="100" width="100" height="50" fill="red"></rect>
<rect x="0" y="0" width="100" height="50" fill="green"></rect>
<rect x="0" y="100" width="100" height="50" fill="green"></rect>
</svg>
</body>
</html>

Просмотреть файл

@ -3,28 +3,39 @@
<head>
<meta charset="UTF-8">
<link rel="match" href="display-none-mask-ref.html" />
<title>Mask behaviour when mask image is missing or display:none</title>
<link rel="match" href="display-none-mask-ref.html">
<link name="author" title="Timothy Nikkel" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1624532">
<link name="author" title="Mike Bremford" href="http://bfo.com"> <!-- edited 202010 -->
<link rel="help" href="https://drafts.fxtf.org/css-masking-1/#the-mask-image">
<link rel="help" href="https://drafts.fxtf.org/css-masking-1/#MaskElement">
<link rel="help" href="https://github.com/w3c/fxtf-drafts/issues/245">
<meta name="assert" content="A missing or invalid mask image is equivalent to transparent black (i.e. nothing is displayed). A mask with display:none is disabled (which is a change to the specified behaviour as of issue 245)">
</head>
<body>
<svg width="200" height="200">
<!-- missing/invalid mask is equivalent to transparent black - nothing displayed -->
<foreignObject x="0" y="0" width="200" height="200" style="mask: url('#notfound');">
<div style="width: 200px; height: 200px; background: red"></div>
</foreignObject>
</svg>
<svg width="200" height="200">
<!-- display:none on mask means mask is not applied (new in https://github.com/w3c/fxtf-drafts/issues/245) -->
<foreignObject x="0" y="0" width="200" height="200" style="mask: url('#noneMask');">
<div style="width: 200px; height: 200px; background: red"></div>
<div style="width: 200px; height: 200px; background: green"></div>
</foreignObject>
</svg>
<svg width="200" height="200">
<foreignObject x="0" y="0" width="200" height="200">
<!-- missing/invalid mask is equivalent to transparent black - nothing displayed -->
<div style="width: 200px; height: 200px; background: red; mask: url('#notfound');"></div>
</foreignObject>
</svg>
<svg width="200" height="200">
<foreignObject x="0" y="0" width="200" height="200">
<div style="width: 200px; height: 200px; background: red; mask: url('#noneMask');"></div>
<!-- display:none on mask means mask is not applied (new in https://github.com/w3c/fxtf-drafts/issues/245) -->
<div style="width: 200px; height: 200px; background: green; mask: url('#noneMask');"></div>
</foreignObject>
</svg>
@ -45,24 +56,24 @@
</mask>
</defs>
<foreignObject x="0" y="0" width="200" height="200" style="mask: url('#aMask');">
<div style="width: 200px; height: 200px; background: red;"></div>
<div style="width: 200px; height: 200px; background: green;"></div>
</foreignObject>
</svg>
<svg width="200" height="200">
<foreignObject x="0" y="0" width="200" height="200">
<div style="width: 200px; height: 200px; background: red; mask: url('#aMask');"></div>
<div style="width: 200px; height: 200px; background: green; mask: url('#aMask');"></div>
</foreignObject>
</svg>
<!-- make sure masking works on active content -->
<svg width="200" height="200">
<foreignObject x="0" y="0" width="200" height="200" style="mask: url('#aMask');">
<div style="width: 200px; height: 200px; background: red; will-change: transform"></div>
<div style="width: 200px; height: 200px; background: green; will-change: transform"></div>
</foreignObject>
</svg>
<svg width="200" height="200">
<foreignObject x="0" y="0" width="200" height="200">
<div style="width: 200px; height: 200px; background: red; will-change: transform; mask: url('#aMask');"></div>
<div style="width: 200px; height: 200px; background: green; will-change: transform; mask: url('#aMask');"></div>
</foreignObject>
</svg>
</body>