1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:28:11 +00:00

LibHTML: Flesh out <img> element with LayoutImage and LayoutReplaced

This patch adds parsing of <img> into HTMLImageElement objects.
It also adds LayoutImage and its parent class LayoutReplaced, which is
going to represent CSS "replaced elements."
This commit is contained in:
Andreas Kling 2019-10-05 22:07:45 +02:00
parent 7162347563
commit 09dccb3224
11 changed files with 96 additions and 2 deletions

View file

@ -53,7 +53,9 @@ public:
virtual const char* class_name() const { return "LayoutNode"; }
virtual bool is_text() const { return false; }
virtual bool is_block() const { return false; }
virtual bool is_inline() const { return false; }
bool is_inline() const { return m_inline; }
void set_inline(bool b) { m_inline = b; }
virtual void layout();
virtual void render(RenderingContext&);
@ -81,4 +83,5 @@ private:
RefPtr<StyleProperties> m_style_properties;
BoxModelMetrics m_style;
Rect m_rect;
bool m_inline { false };
};