LibWeb: Implement caching of reflected element array attributes
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

For attributes like Element.ariaControlsElements, which are a reflection
of FrozenArray<Element>, we must return the same JS::Array object every
time the attribute is invoked - until its contents have changed. This
patch implements caching of the reflected array in accordance with the
spec.
This commit is contained in:
Timothy Flynn 2025-04-25 13:47:08 -04:00 committed by Tim Flynn
commit ac1c2a956a
Notes: github-actions[bot] 2025-04-26 21:30:33 +00:00
7 changed files with 93 additions and 14 deletions

View file

@ -106,6 +106,7 @@ void Element::visit_edges(Cell::Visitor& visitor)
Base::visit_edges(visitor);
SlottableMixin::visit_edges(visitor);
Animatable::visit_edges(visitor);
ARIAMixin::visit_edges(visitor);
visitor.visit(m_attributes);
visitor.visit(m_inline_style);