servo: Merge #11616 - Add support for navigating by a delta (from cbrewster:navigation_delta); r=asajeffrey

<!-- Please describe your changes on the following line: -->
This adds support for passing a delta with `NavigationDirection`. This will be used with `history.go`

r? @asajeffrey

---
<!-- 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 do not require tests because I am unsure how to write a test for this

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: a80767993b6b2b885dfac9666f16fb1e1649ac99
This commit is contained in:
Connor Brewster
2016-06-07 14:16:13 -05:00
parent 3efc9e855f
commit f9e6c2bcb0
5 changed files with 31 additions and 30 deletions

View File

@@ -468,12 +468,12 @@ impl HTMLIFrameElementMethods for HTMLIFrameElement {
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/goBack
fn GoBack(&self) -> ErrorResult {
Navigate(self, NavigationDirection::Back)
Navigate(self, NavigationDirection::Back(1))
}
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/goForward
fn GoForward(&self) -> ErrorResult {
Navigate(self, NavigationDirection::Forward)
Navigate(self, NavigationDirection::Forward(1))
}
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/reload