mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Auto merge of #15795 - paulrouget:follow-link, r=asajeffrey
Let the embedder decide if servo should follow a link or not We want to give a chance to the embedder to handle a link itself. Is it a problem that this will add a round trip to the main thread every time `load_url` is called? --- <!-- 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 - [x] These changes fix #15655 <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because I'm not sure how to test that <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15795) <!-- Reviewable:end -->
This commit is contained in:
commit
808ffffd1e
6 changed files with 27 additions and 0 deletions
|
@ -544,6 +544,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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue