LibWeb: Don't run update_the_image_data() algorithm if already started

This ensures that events are not fired if the image source is updated
while it is being fetched.
This commit is contained in:
Tim Ledbetter
2025-10-28 18:49:24 +00:00
committed by Andreas Kling
parent 66263f142b
commit fdd3975104
Notes: github-actions[bot] 2025-11-15 11:40:28 +00:00
8 changed files with 251 additions and 23 deletions

View File

@@ -115,7 +115,7 @@ public:
private:
HTMLImageElement(DOM::Document&, DOM::QualifiedName);
void update_the_image_data_impl(bool restart_the_animations = false, bool maybe_omit_events = false);
void update_the_image_data_impl(bool restart_the_animations, bool maybe_omit_events, u64 update_the_image_data_count);
virtual bool is_html_image_element() const override { return true; }
@@ -164,6 +164,8 @@ private:
SourceSet m_source_set;
CSSPixelSize m_last_seen_viewport_size;
u64 m_update_the_image_data_count { 0 };
};
}