mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-11 21:52:53 +00:00
LibWeb: Implement fragment parsing and use it for Element.innerHTML
This patch implements most of the HTML fragment parsing algorithm and ports Element::set_inner_html() to it. This was the last remaining user of the old HTML parser. :^)
This commit is contained in:
parent
eb33021d65
commit
92d831c25b
Notes:
sideshowbarker
2024-07-19 05:22:28 +09:00
Author: https://github.com/awesomekling
Commit: 92d831c25b
7 changed files with 91 additions and 18 deletions
|
@ -70,6 +70,8 @@ public:
|
|||
|
||||
Document& document();
|
||||
|
||||
static NonnullRefPtrVector<Node> parse_html_fragment(Element& context_element, const StringView&);
|
||||
|
||||
enum class InsertionMode {
|
||||
#define __ENUMERATE_INSERTION_MODE(mode) mode,
|
||||
ENUMERATE_INSERTION_MODES
|
||||
|
@ -134,7 +136,7 @@ private:
|
|||
void increment_script_nesting_level();
|
||||
void decrement_script_nesting_level();
|
||||
size_t script_nesting_level() const { return m_script_nesting_level; }
|
||||
void reset_the_insertion_mode_appropriately();
|
||||
void reset_the_insertion_mode_appropriately(const Element* context_element = nullptr);
|
||||
|
||||
void adjust_mathml_attributes(HTMLToken&);
|
||||
void adjust_svg_attributes(HTMLToken&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue