Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upConstellation: there should be one focused pipeline by top level browsing context id #17401
Comments
|
How has #21713 affected this issue? Can you please give a few more details? |
|
I'm not sure. I haven't looked at this for a long time, so this might not be relevant. Looking at the PR, that might just work as long as focused_browsing_context_id is a top level browsing context. The idea is this: there are multiple top level browsing contexts and only one is "active" (see |
|
@paulrouget I'm sorry, I completely missed that you responded! Hmm, I think I may be lacking some context to fully understand the issue. Since we're now tracking focused browsing contexts (introduced in the PR), which means their current pipeline is also the focused pipeline, is your proposed invariant not already ensured? |
|
The issue here is tracking the focused browsing context per top-level browsing context. In other words, we need to track the active browsing context per browser tab. This would mean there should be multiple focused browsing contexts at once (one per top-level browsing context/browser tab). |
|
Ah, I wasn't taking tabs into account (though I had a suspicion), since afaik it's not yet supported by Servo. So am I right that this will only become relevant when #21363 progresses? |
|
@mandreyel Tabs are internally supported. But there's no UI for it. Every time the embedder sends a |
|
Ah, that makes sense. Thanks for clearing it up. This is indeed an unsolved issue, I'll look into it later. |
|
@highfive assign me |
|
Hey @mandreyel! Thanks for your interest in working on this issue. It's now assigned to you! |
…ewster Update Constellation to track each browser's focused browsing context 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 `Constellation::focused_browsing_context_id` would not be set to the switched-to browser's focused browsing context. This PR introduces a `browser_ids` `HashMap` in constellation, that maps each of the top-level browsing context's ids to their currently focused browsing context's id, so that when the active browser is changed with the `SelectBrowser` message, we can look up and restore the selected browser's focused browsing context. 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 `Browser` struct to hold data for a browser like its session history and focused browsing context (and possibly more later). But wanted to implement the bare-bones logic to first ensure correctness and will refactor later. Also, we may need new tests but I'm not sure. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #17401 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22051) <!-- Reviewable:end -->
At the moment, there is one global focused pipeline.
The actual focused pipeline being the focused pipeline under the last top level browsing context sent to the compositor.