mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 16:19:23 +00:00
LibWeb: Give Element a CustomStateSet, exposed by ElementInternals
This commit is contained in:
parent
e63d81b36e
commit
b6ffea8990
Notes:
github-actions[bot]
2025-07-04 17:11:47 +00:00
Author: https://github.com/AtkinsSJ
Commit: b6ffea8990
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5302
Reviewed-by: https://github.com/tcl3 ✅
10 changed files with 209 additions and 1 deletions
|
@ -46,6 +46,7 @@
|
|||
#include <LibWeb/HTML/CustomElements/CustomElementName.h>
|
||||
#include <LibWeb/HTML/CustomElements/CustomElementReactionNames.h>
|
||||
#include <LibWeb/HTML/CustomElements/CustomElementRegistry.h>
|
||||
#include <LibWeb/HTML/CustomElements/CustomStateSet.h>
|
||||
#include <LibWeb/HTML/EventLoop/EventLoop.h>
|
||||
#include <LibWeb/HTML/HTMLAnchorElement.h>
|
||||
#include <LibWeb/HTML/HTMLAreaElement.h>
|
||||
|
@ -118,6 +119,7 @@ void Element::visit_edges(Cell::Visitor& visitor)
|
|||
visitor.visit(m_class_list);
|
||||
visitor.visit(m_shadow_root);
|
||||
visitor.visit(m_custom_element_definition);
|
||||
visitor.visit(m_custom_state_set);
|
||||
visitor.visit(m_cascaded_properties);
|
||||
visitor.visit(m_computed_properties);
|
||||
if (m_pseudo_element_data) {
|
||||
|
@ -3824,6 +3826,13 @@ auto Element::ensure_custom_element_reaction_queue() -> CustomElementReactionQue
|
|||
return *m_custom_element_reaction_queue;
|
||||
}
|
||||
|
||||
HTML::CustomStateSet& Element::ensure_custom_state_set()
|
||||
{
|
||||
if (!m_custom_state_set)
|
||||
m_custom_state_set = HTML::CustomStateSet::create(realm(), *this);
|
||||
return *m_custom_state_set;
|
||||
}
|
||||
|
||||
CSS::StyleSheetList& Element::document_or_shadow_root_style_sheets()
|
||||
{
|
||||
auto& root_node = root();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue