mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Update web-platform-tests to revision e3cc95aa44f8a32bdf5c2827455de43148aa9980
This commit is contained in:
parent
2af9648235
commit
d3f5d549bb
109 changed files with 4141 additions and 598 deletions
|
@ -0,0 +1,19 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml"
|
||||
class="reftest-wait">
|
||||
<title>Removing a clip-path attribute pointing to an empty <clipPath></title>
|
||||
<h:link rel="help" href="https://drafts.fxtf.org/css-masking-1/#ClipPathElement"/>
|
||||
<h:link rel="match" href="reference/clip-path-square-003-ref.svg"/>
|
||||
<h:script src="/common/reftest-wait.js"/>
|
||||
<h:script src="/common/rendering-utils.js"/>
|
||||
|
||||
<clipPath id="empty"/>
|
||||
<g clip-path='url("#empty")'>
|
||||
<rect width="200" height="200" fill="green"/>
|
||||
</g>
|
||||
<script>
|
||||
waitForAtLeastOneFrame().then(() => {
|
||||
document.querySelector('svg > g').removeAttribute('clip-path');
|
||||
takeScreenshot();
|
||||
});
|
||||
</script>
|
||||
</svg>
|
After Width: | Height: | Size: 731 B |
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<title>CSS Masking: Test clip-path nonzero path interpolation with zoom</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-shapes-2/#funcdef-path">
|
||||
<link rel="match" href="reference/clip-path-path-interpolation-with-zoom-ref.html">
|
||||
<meta name="assert" content="The clip-path property takes the basic shape
|
||||
'path()' for clipping. Test the interpolation of nonzero
|
||||
path function.">
|
||||
<style>
|
||||
@keyframes anim {
|
||||
from {
|
||||
clip-path: path(nonzero, 'M20,20h60 v60 h-60z M30,30 h40 v40 h-40z');
|
||||
}
|
||||
to {
|
||||
clip-path: path(nonzero, 'M50,50h50 v50 h-50z M20,20 h50 v50 h-50z');
|
||||
}
|
||||
}
|
||||
#rect {
|
||||
width: 100px;
|
||||
zoom: 3;
|
||||
height: 100px;
|
||||
background-color: green;
|
||||
animation: anim 10s -5s paused linear;
|
||||
}
|
||||
</style>
|
||||
<div id="rect"></div>
|
||||
</html>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Masking: Test clip-path property hit-testing when the page is zoomed</title>
|
||||
<link rel="author" title="Noam Rosenthal" href="mailto:noam@webkit.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-shapes-2/#funcdef-path">
|
||||
<meta name="assert" content="The zoomed path is hit-tested correctly">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
#triangle {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: green;
|
||||
clip-path: path(nonzero, 'M0 0, L100 0, L0 100, L 0 0');
|
||||
zoom: 2;
|
||||
}
|
||||
</style>
|
||||
<div id="triangle"></div>
|
||||
<script>
|
||||
test(() => {
|
||||
assert_equals(document.elementFromPoint(20, 20).id, 'triangle')
|
||||
assert_equals(document.elementFromPoint(150, 20).id, 'triangle')
|
||||
assert_equals(document.elementFromPoint(180, 180).tagName, 'BODY')
|
||||
}, 'clip-path: path() hit-test takes zoom into account');
|
||||
|
||||
</script>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Masking: Test clip-path property when the page is zoomed</title>
|
||||
<link rel="author" title="Noam Rosenthal" href="mailto:noam@webkit.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-shapes-2/#funcdef-path">
|
||||
<link rel="match" href="reference/clip-path-path-with-zoom-ref.html">
|
||||
<meta name="assert" content="The path gets zoomed together with the content">
|
||||
<style>
|
||||
#red {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: red;
|
||||
}
|
||||
#rect {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: green;
|
||||
clip-path: path(nonzero, 'M0 0, L100 0, L0 100, L 0 0');
|
||||
zoom: 2;
|
||||
}
|
||||
</style>
|
||||
<div id="red"></div>
|
||||
<div id="rect"></div>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Masking: Test clip-path nonzero path interpolation with zoom</title>
|
||||
<style type="text/css">
|
||||
#rect {
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
background-color: green;
|
||||
clip-path: path('M105,105 H270 V270 H105Z M75,75 H210 V210 H75Z');
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="rect"></div>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<title>CSS Masking: Test clip-path property when the page is zoomed</title>
|
||||
<style>
|
||||
#rect {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
background: green;
|
||||
clip-path: path(nonzero, 'M0 0, L200 0, L0 200');
|
||||
}
|
||||
</style>
|
||||
<div id="rect"></div>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue