mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Use [Reflect] to implement HTMLImageElement.decoding
This ensures the correct behavior when the value of the `decoding` attribute is changed with `setAttribute()`.
This commit is contained in:
committed by
Tim Ledbetter
parent
0d635100c4
commit
e176871fdf
Notes:
github-actions[bot]
2024-11-26 21:57:24 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/e176871fdf1 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2597 Reviewed-by: https://github.com/gmta ✅
@@ -2,6 +2,14 @@
|
||||
#import <HTML/HTMLElement.idl>
|
||||
#import <HTML/Scripting/Fetching.idl>
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/images.html#image-decoding-hint
|
||||
[MissingValueDefault=auto, InvalidValueDefault=auto]
|
||||
enum Decoding {
|
||||
"sync",
|
||||
"async",
|
||||
"auto"
|
||||
};
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/embedded-content.html#htmlimageelement
|
||||
[Exposed=Window, LegacyFactoryFunction=Image(optional unsigned long width, optional unsigned long height)]
|
||||
interface HTMLImageElement : HTMLElement {
|
||||
@@ -22,7 +30,7 @@ interface HTMLImageElement : HTMLElement {
|
||||
readonly attribute boolean complete;
|
||||
readonly attribute USVString currentSrc;
|
||||
[CEReactions, Reflect=referrerpolicy, Enumerated=ReferrerPolicy] attribute DOMString referrerPolicy;
|
||||
[CEReactions] attribute DOMString decoding;
|
||||
[CEReactions, Enumerated=Decoding, Reflect] attribute DOMString decoding;
|
||||
[CEReactions, Enumerated=LazyLoadingAttribute, Reflect] attribute DOMString loading;
|
||||
[CEReactions, Enumerated=FetchPriorityAttribute, Reflect=fetchpriority] attribute DOMString fetchPriority;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user