mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 16:58:52 +00: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:
parent
0d635100c4
commit
e176871fdf
Notes:
github-actions[bot]
2024-11-26 21:57:24 +00:00
Author: https://github.com/tcl3
Commit: e176871fdf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2597
Reviewed-by: https://github.com/gmta ✅
4 changed files with 15 additions and 40 deletions
|
@ -87,10 +87,6 @@ public:
|
|||
// https://html.spec.whatwg.org/multipage/images.html#select-an-image-source
|
||||
[[nodiscard]] Optional<ImageSourceAndPixelDensity> select_an_image_source();
|
||||
|
||||
StringView decoding() const;
|
||||
|
||||
void set_decoding(String);
|
||||
|
||||
void set_source_set(SourceSet);
|
||||
|
||||
ImageRequest& current_request() { return *m_current_request; }
|
||||
|
@ -162,15 +158,6 @@ private:
|
|||
SourceSet m_source_set;
|
||||
|
||||
CSSPixelSize m_last_seen_viewport_size;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/images.html#image-decoding-hint
|
||||
enum class ImageDecodingHint {
|
||||
Auto,
|
||||
Sync,
|
||||
Async
|
||||
};
|
||||
|
||||
ImageDecodingHint m_decoding_hint = ImageDecodingHint::Auto;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue