diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-11-05 13:23:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-05 13:23:30 -0500 |
commit | ddc85098af03fa097eac65762c8bb60f369901fe (patch) | |
tree | d154b82fe8fc82d0756cc8c4f42b780cbbf1cb28 /python/servo/testing_commands.py | |
parent | 5e52992c6bd6400736f32399cb16bfb52a1b4e8b (diff) | |
parent | 0ed9b682a25c8ba888ad544bfe3b636075401169 (diff) | |
download | servo-ddc85098af03fa097eac65762c8bb60f369901fe.tar.gz servo-ddc85098af03fa097eac65762c8bb60f369901fe.zip |
Auto merge of #22051 - mandreyel:track-focused-bc-of-each-tlbc, r=cbrewster
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 -->
Diffstat (limited to 'python/servo/testing_commands.py')
0 files changed, 0 insertions, 0 deletions