Skip to content

Conversation

jgraham
Copy link
Member

@jgraham jgraham commented Sep 8, 2020

Previously the parent and top-level browsing contexts were computed
properties based on the current browsing context. This fails in the
case where the frame containing the current browsing context is
removed from the DOM tree since the browsing context is then discarded
meaning that trying to compute its parents will fail. In practice we
expect operations working with the top-level browsing context to
continue working in that case (and indeed implementations are
mostly/entirely not following the current spec), so this makes the
top-level and parent browsing contexts explictly stored properties of
the session that are updated at the point where we change browsing
contexts.


Preview | Diff

@whimboo
Copy link
Contributor

whimboo commented Sep 8, 2020

Please note that appropriate WebDriver tests will be added/updated via https://bugzilla.mozilla.org/show_bug.cgi?id=1493108 once that PR has been approved.

Previously the parent and top-level browsing contexts were computed
properties based on the current browsing context. This fails in the
case where the frame containing the current browsing context is
removed from the DOM tree since the browsing context is then discarded
meaning that trying to compute its parents will fail. In practice we
expect operations working with the top-level browsing context to
continue working in that case (and indeed implementations are
mostly/entirely not following the current spec), so this makes the
top-level and parent browsing contexts explictly stored properties of
the session that are updated at the point where we change browsing
contexts.
This ensures that we only fail these operations if the browsing
context we're trying to switch to is missing, not the current browsing
context.
@jgraham jgraham force-pushed the set_browsing_context branch from c8bafd6 to 43f6e94 Compare September 8, 2020 13:10
Copy link
Contributor

@whimboo whimboo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my perspective it looks fine, but it would be good to also get a review from @AutomatedTester and/or @shs96c.

@AutomatedTester AutomatedTester merged commit afc3d5d into master Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants