-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply patch. rdar://problem/108930635
Identifier: 263769.50@safari-7616.1.14.10-branch
- Loading branch information
Dan Robson
committed
May 24, 2023
1 parent
c8446e4
commit 645d9c0
Showing
5 changed files
with
65 additions
and
14 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
LayoutTests/fast/images/decode-decoding-change-image-src-expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<body> | ||
<p>This test ensures if an image with decoding="async" is decoded after the first paint, it will not flicker.</p> | ||
<img src="resources/green-400x400.png"> | ||
</body> |
22 changes: 22 additions & 0 deletions
22
LayoutTests/fast/images/decode-decoding-change-image-src.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<body> | ||
<p>This test ensures if an image with decoding="async" is decoded after the first paint, it will not flicker.</p> | ||
<img id="image" decoding="async" src=""> | ||
<script> | ||
if (window.internals && window.testRunner) { | ||
internals.clearMemoryCache(); | ||
testRunner.waitUntilDone(); | ||
} | ||
|
||
function setImageSrc() { | ||
var image = document.getElementById("image"); | ||
image.onload = (() => { | ||
// Force layout and display so the image frame starts decoding. | ||
document.body.offsetHeight; | ||
if (window.testRunner) | ||
testRunner.notifyDone(); | ||
}); | ||
image.src = "resources/green-400x400.png"; | ||
} | ||
requestAnimationFrame(setImageSrc); | ||
</script> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters