mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 16:58:52 +00:00
LibHTML: Load image resource when src attribute is set
This commit is contained in:
parent
ef8b754a46
commit
1ef53be2f3
Notes:
sideshowbarker
2024-07-19 11:47:32 +09:00
Author: https://github.com/deoxxa
Commit: 1ef53be2f3
Pull-request: https://github.com/SerenityOS/serenity/pull/634
2 changed files with 21 additions and 10 deletions
|
@ -8,12 +8,16 @@ public:
|
|||
HTMLImageElement(Document&, const String& tag_name);
|
||||
virtual ~HTMLImageElement() override;
|
||||
|
||||
virtual void parse_attribute(const String& name, const String& value) override;
|
||||
|
||||
String alt() const { return attribute("alt"); }
|
||||
String src() const { return attribute("src"); }
|
||||
|
||||
const GraphicsBitmap* bitmap() const;
|
||||
|
||||
private:
|
||||
void load_image(const String& src);
|
||||
|
||||
virtual RefPtr<LayoutNode> create_layout_node(const StyleResolver&, const StyleProperties* parent_style) const override;
|
||||
|
||||
mutable RefPtr<GraphicsBitmap> m_bitmap;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue