mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Responding to review comments.
This commit is contained in:
parent
79743b5358
commit
3f761bed53
4 changed files with 5 additions and 5 deletions
|
@ -903,7 +903,6 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
|
|||
self.handle_init_load(url);
|
||||
}
|
||||
// Handle a forward or back request
|
||||
// Handle a forward or back request
|
||||
FromCompositorMsg::TraverseHistory(top_level_browsing_context_id, direction) => {
|
||||
debug!("constellation got traverse history message from compositor");
|
||||
self.handle_traverse_history_msg(top_level_browsing_context_id, direction);
|
||||
|
@ -2800,7 +2799,7 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
|
|||
let top_level_browsing_context_id = self.browsing_contexts.get(&pipeline.browsing_context_id)
|
||||
.map(|browsing_context| browsing_context.top_level_id)
|
||||
.unwrap_or(self.root_browsing_context_id);
|
||||
let url = pipeline.url.clone();
|
||||
let url = pipeline.url.to_string();
|
||||
let can_go_forward = !self.joint_session_future_is_empty(top_level_browsing_context_id);
|
||||
let can_go_back = !self.joint_session_past_is_empty(top_level_browsing_context_id);
|
||||
let event = MozBrowserEvent::LocationChange(url, can_go_back, can_go_forward);
|
||||
|
|
|
@ -498,7 +498,7 @@ unsafe fn build_mozbrowser_event_detail(event: MozBrowserEvent,
|
|||
}
|
||||
MozBrowserEvent::LocationChange(url, can_go_back, can_go_forward) => {
|
||||
BrowserElementLocationChangeEventDetail {
|
||||
url: Some(DOMString::from(url.as_str())),
|
||||
url: Some(DOMString::from(url)),
|
||||
canGoBack: Some(can_go_back),
|
||||
canGoForward: Some(can_go_forward),
|
||||
}.to_jsval(cx, rval);
|
||||
|
|
|
@ -602,7 +602,7 @@ pub enum MozBrowserEvent {
|
|||
/// Sent when the browser `<iframe>` starts to load a new page.
|
||||
LoadStart,
|
||||
/// Sent when a browser `<iframe>`'s location changes.
|
||||
LocationChange(ServoUrl, bool, bool),
|
||||
LocationChange(String, bool, bool),
|
||||
/// Sent when a new tab is opened within a browser `<iframe>` as a result of the user
|
||||
/// issuing a command to open a link target in a new tab (for example ctrl/cmd + click.)
|
||||
/// Includes the URL.
|
||||
|
|
|
@ -782,7 +782,8 @@ impl Handler {
|
|||
let keys = try!(keycodes_to_keys(&keys.value).or_else(|_|
|
||||
Err(WebDriverError::new(ErrorStatus::UnsupportedOperation, "Failed to convert keycodes"))));
|
||||
|
||||
// TODO: there's a race condition caused by these being two separate messages,
|
||||
// TODO: there's a race condition caused by the focus command and the
|
||||
// send keys command being two separate messages,
|
||||
// so the constellation may have changed state between them.
|
||||
let cmd_msg = WebDriverCommandMsg::SendKeys(browsing_context_id, keys);
|
||||
self.constellation_chan.send(ConstellationMsg::WebDriverCommand(cmd_msg)).unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue