mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-10-28 09:44:53 +00:00
Tests/LibWeb: Wait for feImage resources before switching filters
Wait for load before the existing animation-frame sequence so fetching and decoding finish before the repaint test runs. Keep its four frames and completion behavior unchanged.
This commit is contained in:
1 parent
ba8c812a72
commit
3f2a351643
1 file changed
+10
-7
Notes:
github-actions[bot]
2026-10-28 08:18:06 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/3f2a351643c Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/13308
@@ -18,18 +18,21 @@
|
||||
</filter>
|
||||
</svg>
|
||||
<script>
|
||||
requestAnimationFrame(() => {
|
||||
// NB: feImage fetching and decoding delay load; animation frames alone do not wait for those resources.
|
||||
addEventListener("load", () => {
|
||||
requestAnimationFrame(() => {
|
||||
filtered.style.filter = "url(#green-image)";
|
||||
requestAnimationFrame(() => {
|
||||
filtered.style.filter = "url(#green-image)";
|
||||
requestAnimationFrame(() => {
|
||||
if (window.internals)
|
||||
internals.signalTestIsDone("PASS");
|
||||
else
|
||||
document.documentElement.classList.remove("reftest-wait");
|
||||
requestAnimationFrame(() => {
|
||||
if (window.internals)
|
||||
internals.signalTestIsDone("PASS");
|
||||
else
|
||||
document.documentElement.classList.remove("reftest-wait");
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}, { once: true });
|
||||
</script>
|
||||
</html>
|
||||
Reference in new issue
Block a user