LibWeb: Implement WebDriver shadow references according to the spec

Similar to commit a9c858fc78, this patch
implements the WebDriver spec concept of shadow references grouped
according to their browsing context groups.
This commit is contained in:
Timothy Flynn
2024-10-30 16:57:56 -04:00
committed by Tim Ledbetter
parent ad9d623664
commit e8cd3749c8
Notes: github-actions[bot] 2024-10-31 00:43:26 +00:00
2 changed files with 37 additions and 25 deletions

View File

@@ -42,9 +42,10 @@ bool is_element_in_view(ReadonlySpan<JS::NonnullGCPtr<Web::DOM::Element>> paint_
bool is_element_obscured(ReadonlySpan<JS::NonnullGCPtr<Web::DOM::Element>> paint_tree, Web::DOM::Element&);
JS::MarkedVector<JS::NonnullGCPtr<Web::DOM::Element>> pointer_interactable_tree(Web::HTML::BrowsingContext&, Web::DOM::Element&);
ByteString get_or_create_a_shadow_root_reference(Web::DOM::ShadowRoot const& shadow_root);
JsonObject shadow_root_reference_object(Web::DOM::ShadowRoot const& shadow_root);
ErrorOr<JS::NonnullGCPtr<Web::DOM::ShadowRoot>, Web::WebDriver::Error> get_known_shadow_root(StringView shadow_id);
ByteString get_or_create_a_shadow_root_reference(HTML::BrowsingContext const&, Web::DOM::ShadowRoot const&);
JsonObject shadow_root_reference_object(HTML::BrowsingContext const&, Web::DOM::ShadowRoot const&);
ErrorOr<JS::NonnullGCPtr<Web::DOM::ShadowRoot>, Web::WebDriver::Error> get_known_shadow_root(HTML::BrowsingContext const&, StringView reference);
bool is_shadow_root_detached(Web::DOM::ShadowRoot const&);
CSSPixelPoint in_view_center_point(DOM::Element const& element, CSSPixelRect viewport);