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:
@@ -417,12 +417,12 @@ impl Handler {
|
||||
}
|
||||
|
||||
fn handle_go_back(&self) -> WebDriverResult<WebDriverResponse> {
|
||||
self.constellation_chan.send(ConstellationMsg::Navigate(None, NavigationDirection::Back)).unwrap();
|
||||
self.constellation_chan.send(ConstellationMsg::Navigate(None, NavigationDirection::Back(1))).unwrap();
|
||||
Ok(WebDriverResponse::Void)
|
||||
}
|
||||
|
||||
fn handle_go_forward(&self) -> WebDriverResult<WebDriverResponse> {
|
||||
self.constellation_chan.send(ConstellationMsg::Navigate(None, NavigationDirection::Forward)).unwrap();
|
||||
self.constellation_chan.send(ConstellationMsg::Navigate(None, NavigationDirection::Forward(1))).unwrap();
|
||||
Ok(WebDriverResponse::Void)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user