mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-31 13:48:25 +00:00
LibWeb: Refactor "editable" and "editing host" concepts
The DOM spec defines what it means for an element to be an "editing host", and the Editing spec does the same for the "editable" concept. Replace our `Node::is_editable()` implementation with these spec-compliant algorithms. An editing host is an element that has the properties to make its contents effectively editable. Editable elements are descendants of an editing host. Concepts like the inheritable contenteditable attribute are propagated through the editable algorithm.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
f88c13a58c
commit
1c55153d43
@@ -411,7 +411,7 @@ static bool matches_read_write_pseudo_class(DOM::Element const& element)
|
||||
return true;
|
||||
}
|
||||
// - elements that are editing hosts or editable and are neither input elements nor textarea elements
|
||||
return element.is_editable();
|
||||
return element.is_editable_or_editing_host();
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/selectors-4/#open-state
|
||||
|
||||
Reference in New Issue
Block a user