mirror of
https://github.com/servo/servo.git
synced 2025-07-25 00:00:20 +01:00
Cleanup: rename to top_level_browsing_context_id for consistency (#30663)
* rename to top_level_browsing_context_id for consistency * fmt
This commit is contained in:
parent
9227069076
commit
01b30e1552
1 changed files with 14 additions and 11 deletions
|
@ -280,7 +280,7 @@ where
|
||||||
|
|
||||||
// Reserving a namespace to create TopLevelBrowsingContextId.
|
// Reserving a namespace to create TopLevelBrowsingContextId.
|
||||||
PipelineNamespace::install(PipelineNamespaceId(0));
|
PipelineNamespace::install(PipelineNamespaceId(0));
|
||||||
let browser_id = BrowserId::new();
|
let top_level_browsing_context_id = BrowserId::new();
|
||||||
|
|
||||||
// Get both endpoints of a special channel for communication between
|
// Get both endpoints of a special channel for communication between
|
||||||
// the client window and the compositor. This channel is unique because
|
// the client window and the compositor. This channel is unique because
|
||||||
|
@ -467,7 +467,7 @@ where
|
||||||
opts.is_running_problem_test,
|
opts.is_running_problem_test,
|
||||||
opts.exit_after_load,
|
opts.exit_after_load,
|
||||||
opts.debug.convert_mouse_to_touch,
|
opts.debug.convert_mouse_to_touch,
|
||||||
browser_id,
|
top_level_browsing_context_id,
|
||||||
);
|
);
|
||||||
|
|
||||||
let servo = Servo {
|
let servo = Servo {
|
||||||
|
@ -478,7 +478,10 @@ where
|
||||||
profiler_enabled: false,
|
profiler_enabled: false,
|
||||||
_js_engine_setup: js_engine_setup,
|
_js_engine_setup: js_engine_setup,
|
||||||
};
|
};
|
||||||
InitializedServo { servo, browser_id }
|
InitializedServo {
|
||||||
|
servo,
|
||||||
|
browser_id: top_level_browsing_context_id,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_window_event(&mut self, event: EmbedderEvent) -> bool {
|
fn handle_window_event(&mut self, event: EmbedderEvent) -> bool {
|
||||||
|
@ -615,8 +618,8 @@ where
|
||||||
self.compositor.capture_webrender();
|
self.compositor.capture_webrender();
|
||||||
},
|
},
|
||||||
|
|
||||||
EmbedderEvent::NewBrowser(url, browser_id) => {
|
EmbedderEvent::NewBrowser(url, top_level_browsing_context_id) => {
|
||||||
let msg = ConstellationMsg::NewBrowser(url, browser_id);
|
let msg = ConstellationMsg::NewBrowser(url, top_level_browsing_context_id);
|
||||||
if let Err(e) = self.constellation_chan.send(msg) {
|
if let Err(e) = self.constellation_chan.send(msg) {
|
||||||
warn!(
|
warn!(
|
||||||
"Sending NewBrowser message to constellation failed ({:?}).",
|
"Sending NewBrowser message to constellation failed ({:?}).",
|
||||||
|
@ -625,8 +628,8 @@ where
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
EmbedderEvent::SelectBrowser(ctx) => {
|
EmbedderEvent::SelectBrowser(top_level_browsing_context_id) => {
|
||||||
let msg = ConstellationMsg::SelectBrowser(ctx);
|
let msg = ConstellationMsg::SelectBrowser(top_level_browsing_context_id);
|
||||||
if let Err(e) = self.constellation_chan.send(msg) {
|
if let Err(e) = self.constellation_chan.send(msg) {
|
||||||
warn!(
|
warn!(
|
||||||
"Sending SelectBrowser message to constellation failed ({:?}).",
|
"Sending SelectBrowser message to constellation failed ({:?}).",
|
||||||
|
@ -635,8 +638,8 @@ where
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
EmbedderEvent::CloseBrowser(ctx) => {
|
EmbedderEvent::CloseBrowser(top_level_browsing_context_id) => {
|
||||||
let msg = ConstellationMsg::CloseBrowser(ctx);
|
let msg = ConstellationMsg::CloseBrowser(top_level_browsing_context_id);
|
||||||
if let Err(e) = self.constellation_chan.send(msg) {
|
if let Err(e) = self.constellation_chan.send(msg) {
|
||||||
warn!(
|
warn!(
|
||||||
"Sending CloseBrowser message to constellation failed ({:?}).",
|
"Sending CloseBrowser message to constellation failed ({:?}).",
|
||||||
|
@ -645,8 +648,8 @@ where
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
EmbedderEvent::SendError(ctx, e) => {
|
EmbedderEvent::SendError(top_level_browsing_context_id, e) => {
|
||||||
let msg = ConstellationMsg::SendError(ctx, e);
|
let msg = ConstellationMsg::SendError(top_level_browsing_context_id, e);
|
||||||
if let Err(e) = self.constellation_chan.send(msg) {
|
if let Err(e) = self.constellation_chan.send(msg) {
|
||||||
warn!(
|
warn!(
|
||||||
"Sending SendError message to constellation failed ({:?}).",
|
"Sending SendError message to constellation failed ({:?}).",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue