mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 04:37:55 +00:00
HTMLImageElement: Improve decoding stub
Add an enum and warn when setting to sync/async.
This commit is contained in:
committed by
Andreas Kling
parent
03f9915054
commit
977e77bd4a
@@ -80,6 +80,10 @@ 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; }
|
||||
@@ -147,6 +151,15 @@ 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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user