mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 03:27:15 +02:00
LibWeb: Use dimension image source for images
Fixes tiny images on Wikipedia
This commit is contained in:
committed by
Sam Atkins
parent
31cbe2061a
commit
b8f31179b2
Notes:
github-actions[bot]
2026-02-13 10:44:04 +00:00
Author: https://github.com/ChaseKnowlden Commit: https://github.com/LadybirdBrowser/ladybird/commit/b8f31179b22 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7904 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -92,6 +92,10 @@ public:
|
||||
|
||||
void set_source_set(SourceSet);
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element:dimension-attribute-source
|
||||
DOM::Element const& dimension_attribute_source() const;
|
||||
void set_dimension_attribute_source(DOM::Element const*);
|
||||
|
||||
ImageRequest& current_request() { return *m_current_request; }
|
||||
ImageRequest const& current_request() const { return *m_current_request; }
|
||||
|
||||
@@ -168,6 +172,10 @@ private:
|
||||
|
||||
CSSPixelSize m_last_seen_viewport_size;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element:dimension-attribute-source
|
||||
// Each img element has a dimension attribute source, which must initially be the img element itself.
|
||||
GC::Ptr<DOM::Element const> m_dimension_attribute_source;
|
||||
|
||||
u64 m_update_the_image_data_count { 0 };
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user