mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
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:
parent
05e48c3d46
commit
f9831f2bea
3 changed files with 25 additions and 2 deletions
|
@ -43,6 +43,10 @@ impl TabDescriptorActorMsg {
|
|||
pub fn browser_id(&self) -> u32 {
|
||||
self.browser_id
|
||||
}
|
||||
|
||||
pub fn actor(&self) -> String {
|
||||
self.actor.clone()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
|
@ -167,4 +171,9 @@ impl TabDescriptorActor {
|
|||
pub(crate) fn is_top_level_global(&self) -> bool {
|
||||
self.is_top_level_global
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn browsing_context(&self) -> String {
|
||||
self.browsing_context_actor.clone()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue