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:
bors-servo 2017-03-14 07:22:23 -07:00 committed by GitHub
commit 808ffffd1e
6 changed files with 27 additions and 0 deletions

View file

@ -484,6 +484,10 @@ impl WindowMethods for Window {
}
}
fn allow_navigation(&self, _: ServoUrl) -> bool {
true
}
fn supports_clipboard(&self) -> bool {
false
}

View file

@ -1107,6 +1107,10 @@ impl WindowMethods for Window {
}
}
fn allow_navigation(&self, _: ServoUrl) -> bool {
true
}
fn supports_clipboard(&self) -> bool {
false
}