mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 07:37:03 +00:00
LibWeb: Mark image elements for layout before firing their load event
This removes a long-standing source of flakiness seen for example in WPT's /referrer-policy/ tests.
This commit is contained in:
parent
f638f84185
commit
063cd68bf4
Notes:
github-actions[bot]
2024-11-20 18:05:33 +00:00
Author: https://github.com/awesomekling
Commit: 063cd68bf4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2461
Reviewed-by: https://github.com/gmta ✅
3 changed files with 17 additions and 3 deletions
|
@ -0,0 +1,13 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
asyncTest((done) => {
|
||||
let img = document.createElement("img");
|
||||
img.src = "../../../Layout/input/400.png";
|
||||
document.body.appendChild(img);
|
||||
img.onload = function() {
|
||||
println("image is " + img.clientWidth + "x" + img.clientHeight);
|
||||
img.remove();
|
||||
done();
|
||||
};
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue