mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb: Set inertness of HTMLElement when inert attribute is changed
This commit is contained in:
parent
893e9e3eac
commit
a9ffc6359a
Notes:
github-actions[bot]
2025-02-21 12:43:40 +00:00
Author: https://github.com/tcl3
Commit: a9ffc6359a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3475
Reviewed-by: https://github.com/AtkinsSJ ✅
4 changed files with 49 additions and 0 deletions
|
@ -2110,6 +2110,17 @@ bool Node::is_default_namespace(Optional<String> namespace_) const
|
|||
return default_namespace == namespace_;
|
||||
}
|
||||
|
||||
bool Node::is_inert() const
|
||||
{
|
||||
if (auto* html_element = as_if<HTML::HTMLElement>(*this))
|
||||
return html_element->is_inert();
|
||||
|
||||
if (auto* enclosing_html_element = this->enclosing_html_element())
|
||||
return enclosing_html_element->is_inert();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#in-a-document-tree
|
||||
bool Node::in_a_document_tree() const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue