LibWeb: Remove unused ImageProvider methods
This commit is contained in:
parent
1bdcdaf088
commit
60c6cc2f0f
10 changed files with 0 additions and 34 deletions
|
|
@ -350,11 +350,6 @@ Optional<Gfx::DecodedImageFrame> HTMLImageElement::current_image_frame_sized(Gfx
|
|||
return {};
|
||||
}
|
||||
|
||||
void HTMLImageElement::set_visible_in_viewport(bool)
|
||||
{
|
||||
// FIXME: Loosen grip on image data when it's not visible, e.g via volatile memory.
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-width
|
||||
WebIDL::UnsignedLong HTMLImageElement::width() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -112,8 +112,6 @@ public:
|
|||
virtual Optional<CSSPixels> intrinsic_height() const override;
|
||||
virtual Optional<CSSPixelFraction> intrinsic_aspect_ratio() const override;
|
||||
virtual Optional<Gfx::DecodedImageFrame> current_image_frame_sized(Gfx::IntSize) const override;
|
||||
virtual void set_visible_in_viewport(bool) override;
|
||||
virtual GC::Ptr<DOM::Element const> to_html_element() const override { return *this; }
|
||||
virtual GC::Ptr<DecodedImageData> decoded_image_data() const override;
|
||||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
|
|
|||
|
|
@ -2347,11 +2347,6 @@ Optional<Gfx::DecodedImageFrame> HTMLInputElement::current_image_frame_sized(Gfx
|
|||
return {};
|
||||
}
|
||||
|
||||
void HTMLInputElement::set_visible_in_viewport(bool)
|
||||
{
|
||||
// FIXME: Loosen grip on image data when it's not visible, e.g via volatile memory.
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/interaction.html#dom-tabindex
|
||||
i32 HTMLInputElement::default_tab_index_value() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -292,8 +292,6 @@ private:
|
|||
virtual Optional<CSSPixels> intrinsic_height() const override;
|
||||
virtual Optional<CSSPixelFraction> intrinsic_aspect_ratio() const override;
|
||||
virtual Optional<Gfx::DecodedImageFrame> current_image_frame_sized(Gfx::IntSize) const override;
|
||||
virtual void set_visible_in_viewport(bool) override;
|
||||
virtual GC::Ptr<DOM::Element const> to_html_element() const override { return *this; }
|
||||
virtual size_t current_frame_index() const override { return 0; }
|
||||
virtual GC::Ptr<HTML::DecodedImageData> decoded_image_data() const override { return image_data(); }
|
||||
|
||||
|
|
|
|||
|
|
@ -627,9 +627,4 @@ Optional<Gfx::DecodedImageFrame> HTMLObjectElement::current_image_frame_sized(Gf
|
|||
return {};
|
||||
}
|
||||
|
||||
void HTMLObjectElement::set_visible_in_viewport(bool)
|
||||
{
|
||||
// FIXME: Loosen grip on image data when it's not visible, e.g via volatile memory.
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,8 +88,6 @@ private:
|
|||
virtual Optional<CSSPixels> intrinsic_height() const override;
|
||||
virtual Optional<CSSPixelFraction> intrinsic_aspect_ratio() const override;
|
||||
virtual Optional<Gfx::DecodedImageFrame> current_image_frame_sized(Gfx::IntSize) const override;
|
||||
virtual void set_visible_in_viewport(bool) override;
|
||||
virtual GC::Ptr<DOM::Element const> to_html_element() const override { return *this; }
|
||||
virtual size_t current_frame_index() const override { return 0; }
|
||||
virtual GC::Ptr<DecodedImageData> decoded_image_data() const override { return image_data(); }
|
||||
|
||||
|
|
|
|||
|
|
@ -30,11 +30,6 @@ Optional<Gfx::DecodedImageFrame> ImageProvider::current_image_frame() const
|
|||
return current_image_frame_sized(intrinsic_size().value_or({}).to_type<int>());
|
||||
}
|
||||
|
||||
Optional<Gfx::DecodedImageFrame> ImageProvider::default_image_frame() const
|
||||
{
|
||||
return default_image_frame_sized(intrinsic_size().value_or({}).to_type<int>());
|
||||
}
|
||||
|
||||
Optional<Gfx::DecodedImageFrame> ImageProvider::default_image_frame_sized(Gfx::IntSize size) const
|
||||
{
|
||||
// Defer to the current image by default.
|
||||
|
|
|
|||
|
|
@ -33,14 +33,11 @@ public:
|
|||
virtual Optional<Gfx::DecodedImageFrame> current_image_frame() const;
|
||||
virtual Optional<Gfx::DecodedImageFrame> current_image_frame_sized(Gfx::IntSize) const = 0;
|
||||
|
||||
virtual Optional<Gfx::DecodedImageFrame> default_image_frame() const;
|
||||
virtual Optional<Gfx::DecodedImageFrame> default_image_frame_sized(Gfx::IntSize) const;
|
||||
|
||||
virtual void set_visible_in_viewport(bool) = 0;
|
||||
virtual void layout_node_was_detached() const { }
|
||||
|
||||
protected:
|
||||
virtual GC::Ptr<DOM::Element const> to_html_element() const = 0;
|
||||
static void did_update_alt_text(ImageBox&);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -240,15 +240,12 @@ public:
|
|||
return m_image->current_frame(*document, rect);
|
||||
}
|
||||
|
||||
virtual void set_visible_in_viewport(bool) override { }
|
||||
virtual void layout_node_was_detached() const override
|
||||
{
|
||||
unregister_image_style_value_client();
|
||||
m_layout_node = nullptr;
|
||||
}
|
||||
|
||||
virtual GC::Ptr<DOM::Element const> to_html_element() const override { return nullptr; }
|
||||
|
||||
static NonnullOwnPtr<GeneratedContentImageProvider> create(DOM::Document& document, NonnullRefPtr<CSS::ImageStyleValue> image)
|
||||
{
|
||||
return adopt_own(*new GeneratedContentImageProvider(document, move(image)));
|
||||
|
|
|
|||
|
|
@ -41,8 +41,6 @@ public:
|
|||
virtual Optional<CSSPixels> intrinsic_height() const override;
|
||||
virtual Optional<CSSPixelFraction> intrinsic_aspect_ratio() const override;
|
||||
virtual Optional<Gfx::DecodedImageFrame> current_image_frame_sized(Gfx::IntSize) const override;
|
||||
virtual void set_visible_in_viewport(bool) override { }
|
||||
virtual GC::Ptr<DOM::Element const> to_html_element() const override { return *this; }
|
||||
virtual size_t current_frame_index() const override { return m_current_frame_index; }
|
||||
virtual GC::Ptr<HTML::DecodedImageData> decoded_image_data() const override;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue