LibWeb: Implement WebDriver element references according to the spec

Our currently ad-hoc method of tracking element references is basically
a process-wide map, rather than grouping elements according to their
browsing context groups. This prevents us from recognizing when an
element reference is invalid due to its browsing context having been
closed.

This implements the WebDriver spec concept of element references grouped
according to their browsing context groups.

This patch is a bit noisy because we now need to plumb the current BC
through to the element reference AOs.
This commit is contained in:
Timothy Flynn 2024-10-24 13:23:38 -04:00 committed by Tim Flynn
commit a9c858fc78
Notes: github-actions[bot] 2024-10-24 23:01:12 +00:00
8 changed files with 155 additions and 67 deletions

View file

@ -397,6 +397,11 @@ BrowsingContextGroup* BrowsingContext::group()
return m_group;
}
BrowsingContextGroup const* BrowsingContext::group() const
{
return m_group;
}
void BrowsingContext::set_group(BrowsingContextGroup* group)
{
m_group = group;