mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 12:49:08 +00:00
LibWeb: Use JS::HeapFunction for resumption steps in HTMLImageElement
This commit is contained in:
committed by
Andreas Kling
parent
67aa86b5b6
commit
0c46d79e78
@@ -9,6 +9,7 @@
|
||||
#include <AK/ByteBuffer.h>
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <LibGfx/Forward.h>
|
||||
#include <LibJS/Heap/HeapFunction.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/DocumentLoadEventDelayer.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
@@ -90,7 +91,8 @@ public:
|
||||
virtual RefPtr<Gfx::Bitmap const> current_image_bitmap(Gfx::IntSize = {}) const override;
|
||||
virtual void set_visible_in_viewport(bool) override;
|
||||
|
||||
JS::SafeFunction<void()> take_lazy_load_resumption_steps(Badge<DOM::Document>);
|
||||
void set_lazy_load_resumption_steps(Function<void()>);
|
||||
JS::GCPtr<JS::HeapFunction<void()>> take_lazy_load_resumption_steps(Badge<DOM::Document>);
|
||||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
@@ -136,7 +138,7 @@ private:
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/urls-and-fetching.html#lazy-load-resumption-steps
|
||||
// Each img and iframe element has associated lazy load resumption steps, initially null.
|
||||
JS::SafeFunction<void()> m_lazy_load_resumption_steps;
|
||||
JS::GCPtr<JS::HeapFunction<void()>> m_lazy_load_resumption_steps;
|
||||
|
||||
CSSPixelSize m_last_seen_viewport_size;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user