mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Implement Msg::Status with serialized url upon mouseover
Credits for Mike Blumenkrantz (@zmike), I just rebased against trunk and fixed the url serialization. Fixes #6178.
This commit is contained in:
parent
5873a5cf20
commit
b3927d5a2d
10 changed files with 67 additions and 1 deletions
|
@ -420,6 +420,10 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
self.scroll_fragment_to_point(pipeline_id, layer_id, point);
|
||||
}
|
||||
|
||||
(Msg::Status(message), ShutdownState::NotShuttingDown) => {
|
||||
self.window.status(message);
|
||||
}
|
||||
|
||||
(Msg::LoadStart(back, forward), ShutdownState::NotShuttingDown) => {
|
||||
self.window.load_start(back, forward);
|
||||
}
|
||||
|
|
|
@ -199,6 +199,8 @@ pub enum Msg {
|
|||
ReturnUnusedNativeSurfaces(Vec<NativeSurface>),
|
||||
/// Collect memory reports and send them back to the given mem::ReportsChan.
|
||||
CollectMemoryReports(mem::ReportsChan),
|
||||
/// A status message to be displayed by the browser chrome.
|
||||
Status(Option<String>),
|
||||
}
|
||||
|
||||
impl Debug for Msg {
|
||||
|
@ -229,6 +231,7 @@ impl Debug for Msg {
|
|||
Msg::HeadParsed => write!(f, "HeadParsed"),
|
||||
Msg::ReturnUnusedNativeSurfaces(..) => write!(f, "ReturnUnusedNativeSurfaces"),
|
||||
Msg::CollectMemoryReports(..) => write!(f, "CollectMemoryReports"),
|
||||
Msg::Status(..) => write!(f, "Status"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -514,6 +514,10 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
|
|||
debug!("constellation got create-WebGL-paint-task message");
|
||||
self.handle_create_webgl_paint_task_msg(&size, attributes, sender)
|
||||
}
|
||||
ConstellationMsg::NodeStatus(message) => {
|
||||
debug!("constellation got NodeStatus message");
|
||||
self.compositor_proxy.send(CompositorMsg::Status(message));
|
||||
}
|
||||
}
|
||||
true
|
||||
}
|
||||
|
|
|
@ -97,6 +97,7 @@ impl CompositorEventListener for NullCompositor {
|
|||
Msg::AssignPaintedBuffers(..) |
|
||||
Msg::ChangeRunningAnimationsState(..) |
|
||||
Msg::ScrollFragmentPoint(..) |
|
||||
Msg::Status(..) |
|
||||
Msg::LoadStart(..) |
|
||||
Msg::LoadComplete(..) |
|
||||
Msg::ScrollTimeout(..) |
|
||||
|
|
|
@ -107,6 +107,8 @@ pub trait WindowMethods {
|
|||
fn set_page_title(&self, title: Option<String>);
|
||||
/// Sets the load data for the current page.
|
||||
fn set_page_url(&self, url: Url);
|
||||
/// Called when the browser chrome should display a status message.
|
||||
fn status(&self, Option<String>);
|
||||
/// Called when the browser has started loading a frame.
|
||||
fn load_start(&self, back: bool, forward: bool);
|
||||
/// Called when the browser is done loading a frame.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue