mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 12:27:35 +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:
parent
7162347563
commit
09dccb3224
11 changed files with 96 additions and 2 deletions
13
Libraries/LibHTML/Layout/LayoutReplaced.cpp
Normal file
13
Libraries/LibHTML/Layout/LayoutReplaced.cpp
Normal file
|
@ -0,0 +1,13 @@
|
|||
#include <LibHTML/DOM/Element.h>
|
||||
#include <LibHTML/Layout/LayoutReplaced.h>
|
||||
|
||||
LayoutReplaced::LayoutReplaced(const Element& element, NonnullRefPtr<StyleProperties> style)
|
||||
: LayoutNode(&element, move(style))
|
||||
{
|
||||
// FIXME: Allow non-inline replaced elements.
|
||||
set_inline(true);
|
||||
}
|
||||
|
||||
LayoutReplaced::~LayoutReplaced()
|
||||
{
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue