mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-27 02:20:17 +00:00
LibWeb: Keep the tokens in ListOfActiveFormattingElements
This commit is contained in:
parent
b8bbebd3ff
commit
6afd39b16a
Notes:
github-actions[bot]
2025-10-21 21:37:19 +00:00
Author: https://github.com/lpas
Commit: 6afd39b16a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6515
Reviewed-by: https://github.com/gmta ✅
6 changed files with 59 additions and 42 deletions
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/HTML/Parser/HTMLToken.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
|
@ -20,16 +21,17 @@ public:
|
|||
bool is_marker() const { return !element; }
|
||||
|
||||
GC::Ptr<DOM::Element> element;
|
||||
AK::OwnPtr<HTMLToken> token;
|
||||
};
|
||||
|
||||
bool is_empty() const { return m_entries.is_empty(); }
|
||||
bool contains(DOM::Element const&) const;
|
||||
|
||||
void add(DOM::Element& element);
|
||||
void add(DOM::Element& element, HTMLToken& token);
|
||||
void add_marker();
|
||||
void insert_at(size_t index, DOM::Element& element);
|
||||
void insert_at(size_t index, DOM::Element& element, HTMLToken& token);
|
||||
|
||||
void replace(DOM::Element& to_remove, DOM::Element& to_add);
|
||||
void replace(DOM::Element& to_remove, DOM::Element& to_add, HTMLToken& token);
|
||||
|
||||
void remove(DOM::Element&);
|
||||
|
||||
|
|
@ -44,6 +46,8 @@ public:
|
|||
|
||||
void visit_edges(JS::Cell::Visitor&);
|
||||
|
||||
static AK::OwnPtr<HTMLToken> create_own_token(HTMLToken& token);
|
||||
|
||||
private:
|
||||
Vector<Entry> m_entries;
|
||||
void ensure_noahs_ark_clause(DOM::Element& element);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue