Track the active tab and browsing context for devtools (#36168)

<!-- Please describe your changes on the following line: -->


---Part of #35867, per Step 5 suggestion. This PR:
- Adds active_tab (via RefCell) to RootActor, updated in
get_tab_msg_by_browser_id.
- Adds browsing_context() helper to TabDescriptorActor.
- Adds actor()`getter to TabDescriptorActorMsg for  access in root.rs.
-Creates the chain (Root - Tab - BrowsingContext) for routing
colorSchemeSimulation.
<!-- 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
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they’re structural
setup for the actor chain and don’t change the system's behavior yet.

<!-- 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. -->

---------

Signed-off-by: Uthman Yahaya Baba <uthmanyahayababa@gmail.com>
This commit is contained in:
Usman Yahaya Baba 2025-03-31 18:51:28 +01:00 committed by GitHub
parent 05e48c3d46
commit f9831f2bea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 25 additions and 2 deletions

View file

@ -153,6 +153,7 @@ impl DevtoolsInstance {
performance: performance.name(),
preference: preference.name(),
process: process.name(),
active_tab: None.into(),
});
registry.register(root);