mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-06 11:12:54 +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
Notes:
sideshowbarker
2024-07-19 11:48:34 +09:00
Author: https://github.com/awesomekling
Commit: 09dccb3224
11 changed files with 96 additions and 2 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <LibHTML/DOM/HTMLHeadElement.h>
|
||||
#include <LibHTML/DOM/HTMLHeadingElement.h>
|
||||
#include <LibHTML/DOM/HTMLHtmlElement.h>
|
||||
#include <LibHTML/DOM/HTMLImageElement.h>
|
||||
#include <LibHTML/DOM/HTMLStyleElement.h>
|
||||
#include <LibHTML/DOM/HTMLTitleElement.h>
|
||||
#include <LibHTML/DOM/Text.h>
|
||||
|
@ -35,6 +36,8 @@ static NonnullRefPtr<Element> create_element(Document& document, const String& t
|
|||
return adopt(*new HTMLStyleElement(document, tag_name));
|
||||
if (lowercase_tag_name == "title")
|
||||
return adopt(*new HTMLTitleElement(document, tag_name));
|
||||
if (lowercase_tag_name == "img")
|
||||
return adopt(*new HTMLImageElement(document, tag_name));
|
||||
if (lowercase_tag_name == "h1"
|
||||
|| lowercase_tag_name == "h2"
|
||||
|| lowercase_tag_name == "h3"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue