Let the embedder decide if servo should follow a link or not

This commit is contained in:
Paul Rouget 2017-03-02 09:33:19 +01:00
parent d0856fd4cd
commit 79a5bf0cbf
6 changed files with 27 additions and 0 deletions

View file

@ -554,6 +554,13 @@ impl<Window: WindowMethods> IOCompositor<Window> {
self.window.load_end(back, forward, root);
}
(Msg::AllowNavigation(url, response_chan), ShutdownState::NotShuttingDown) => {
let allow = self.window.allow_navigation(url);
if let Err(e) = response_chan.send(allow) {
warn!("Failed to send allow_navigation result ({}).", e);
}
}
(Msg::DelayedCompositionTimeout(timestamp), ShutdownState::NotShuttingDown) => {
if let CompositionRequest::DelayedComposite(this_timestamp) =
self.composition_request {