LibWeb: Rename Element::shadow_root_internal() to shadow_root()

And let the old shadow_root(), which was only supposed to be used by
bindings, be called shadow_root_for_bindings() instead.

This makes it much easier to read DOM code, and we don't have to worry
about when to use shadow_root_internal() or why.
This commit is contained in:
Andreas Kling 2024-06-25 11:28:58 +02:00 committed by Andreas Kling
commit f4bdf56212
Notes: sideshowbarker 2024-07-17 17:06:59 +09:00
18 changed files with 27 additions and 28 deletions

View file

@ -1175,7 +1175,7 @@ void Document::update_layout()
if (needs_full_style_update || node.child_needs_style_update()) {
if (node.is_element()) {
if (auto* shadow_root = static_cast<DOM::Element&>(node).shadow_root_internal()) {
if (auto shadow_root = static_cast<DOM::Element&>(node).shadow_root()) {
if (needs_full_style_update || shadow_root->needs_style_update() || shadow_root->child_needs_style_update()) {
auto subtree_invalidation = update_style_recursively(*shadow_root, style_computer);
if (!is_display_none)