Auto merge of #11616 - ConnorGBrewster:navigation_delta, r=asajeffrey

Add support for navigating by a delta

<!-- 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. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11616)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-06-07 14:16:13 -05:00
commit a80767993b
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