mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-11 09:27:00 +02:00
Both Chromium and Gecko delay the document's load event for CSS image resource requests (background-image, mask-image, etc). We now start fetching CSS image resources as soon as their stylesheet is associated with a document, rather than deferring until layout. This is done by collecting ImageStyleValues during stylesheet parsing and initiating their fetches when the stylesheet is added to the document. Fixes #3448
19 lines
429 B
HTML
19 lines
429 B
HTML
<!DOCTYPE html>
|
|
<link rel="match" href="../expected/mask-image-with-scroll-offset-ref.html" />
|
|
<style>
|
|
* { scrollbar-width: none; }
|
|
body { height: 200vh; }
|
|
#spacer { height: 100px; }
|
|
#mask-image-box {
|
|
background-color: green;
|
|
width: 100px;
|
|
height: 200px;
|
|
mask-image: url("../data/mask-image-100x200.png");
|
|
}
|
|
</style>
|
|
<div id="spacer"></div>
|
|
<div id="mask-image-box"></div>
|
|
<script>
|
|
window.scrollTo(0, 100);
|
|
</script>
|