mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Implemented the plumbing for paint worklets.
This commit is contained in:
parent
7e273d6c9b
commit
fd17dcd604
23 changed files with 600 additions and 156 deletions
|
@ -6736,6 +6736,18 @@
|
|||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/worklets/test_paint_worklet.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/worklets/test_paint_worklet.html",
|
||||
[
|
||||
[
|
||||
"/_mozilla/mozilla/worklets/test_paint_worklet_ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
]
|
||||
},
|
||||
"reftest_node": {
|
||||
|
@ -11208,6 +11220,16 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/worklets/test_paint_worklet.js": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/worklets/test_paint_worklet_ref.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/worklets/test_worklet.js": [
|
||||
[
|
||||
{}
|
||||
|
@ -31775,6 +31797,18 @@
|
|||
"f3a9b8c78346507bc0b3190c8000ccf80cc133f6",
|
||||
"support"
|
||||
],
|
||||
"mozilla/worklets/test_paint_worklet.html": [
|
||||
"67fccbde17c28e13b5f4dc54d70b1279d6e9d602",
|
||||
"reftest"
|
||||
],
|
||||
"mozilla/worklets/test_paint_worklet.js": [
|
||||
"e714db50da9e5cb18c652629fcc1b5ccc453564d",
|
||||
"support"
|
||||
],
|
||||
"mozilla/worklets/test_paint_worklet_ref.html": [
|
||||
"e9cfa945824a8ecf07c41a269f82a2c2ca002406",
|
||||
"support"
|
||||
],
|
||||
"mozilla/worklets/test_worklet.html": [
|
||||
"fe9c93a5307c616f878b6623155e1b04c86dd994",
|
||||
"testharness"
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[test_paint_worklet.html]
|
||||
type: reftest
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<!doctype html>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title>A basic paint worklet test</title>
|
||||
<link rel=match href=/_mozilla/mozilla/worklets/test_paint_worklet_ref.html>
|
||||
</head>
|
||||
<body>
|
||||
<div style="height: 100px; width: 100px; background: paint(test);"></div>
|
||||
</body>
|
||||
<script>
|
||||
// This reftest will TIMEOUT if loading the paint worklet fails,
|
||||
// It will PASS if the worklet draws a green rectangle.
|
||||
window.paintWorklet
|
||||
.addModule("test_paint_worklet.js")
|
||||
.then(function() { document.documentElement.classList.remove("reftest-wait"); });
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,6 @@
|
|||
registerPaint("test", class {
|
||||
paint(ctx, size) {
|
||||
ctx.fillStyle = 'green';
|
||||
ctx.fillRect(0, 0, size.width, size.height);
|
||||
}
|
||||
});
|
|
@ -0,0 +1,6 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
<div style="height: 100px; width: 100px; background: green;"></div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue