Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Update Constellation to track each browser's focused browsing context #22051
Since there may be multiple browsers (top-level browsing contexts), each has a focused browsing context. However, we were not keeping track of each browser's focused browsing context, so e.g when switching tabs the
This PR introduces a
This is a wip. For one, I'm not a fan of adding another hash map to constellation, and since there already is a hash map for keeping track of a browser's joint session history, we could introduce some
Looking good, I would suggest us storing a map of
BrowsingContextId for tracking the active browsing context for each "tab". And then just use the
active_browser_id as the key for this map when determining the focused browsing context for key events. This alleviates the need for the extra bookkeeping of
Also I agree about merging these
TopLevelBrowsingContextId. I think that would be a good followup.
@cbrewster Thanks for the review, I'll implement the changes shortly.
@mandreyel Yes auxiliary BCs will need to be included in the bookkeeping as they are always top-level browsing contexts: https://html.spec.whatwg.org/multipage/#auxiliary-browsing-context