-
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.
[AVIF Downlevels] AVIF image can't be opened as an ImageDocument
https://bugs.webkit.org/show_bug.cgi?id=247759 rdar://102210682 Reviewed by Myles C. Maxfield. On down levels macOS, we need to explicitly set the mime type for the requested URL given its extension. We should not rely on NSURLResponse to tell us the correct mime type since AVIF is only supported on macOS Ventura. * LayoutTests/fast/images/avif-image-document-expected.html: Added. * LayoutTests/fast/images/avif-image-document.html: Added. * LayoutTests/platform/mac-wk1/TestExpectations: * LayoutTests/platform/win/TestExpectations: * Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm: (WebCore::ResourceResponse::platformLazyInit): Canonical link: https://commits.webkit.org/256796@main
- Loading branch information
Showing
5 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
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,16 @@ | ||
<style> | ||
iframe { | ||
width: 400px; | ||
height: 400px; | ||
} | ||
</style> | ||
<body> | ||
<script> | ||
const iframe = document.createElement("iframe"); | ||
iframe.srcdoc = `<!DOCTYPE html> | ||
<body style="margin: 0; overflow: hidden;"> | ||
<img src="resources/green-400x400.avif"> | ||
</body>`; | ||
document.body.appendChild(iframe); | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<style> | ||
iframe { | ||
width: 400px; | ||
height: 400px; | ||
} | ||
</style> | ||
<iframe src="resources/green-400x400.avif"> |
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