mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
add reload keyboard shortcut
rename the preference to shell.builtin-key-shortcuts.enabled
This commit is contained in:
parent
053c2aee0a
commit
909f0da3c2
9 changed files with 57 additions and 4 deletions
|
@ -24,6 +24,8 @@ use devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId};
|
|||
use document_loader::DocumentLoader;
|
||||
use dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, DocumentReadyState};
|
||||
use dom::bindings::codegen::Bindings::LocationBinding::LocationMethods;
|
||||
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
||||
use dom::bindings::conversions::{FromJSValConvertible, StringificationBehavior};
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
|
@ -955,6 +957,8 @@ impl ScriptThread {
|
|||
self.handle_framed_content_changed(containing_pipeline_id, subpage_id),
|
||||
ConstellationControlMsg::ReportCSSError(pipeline_id, filename, line, column, msg) =>
|
||||
self.handle_css_error_reporting(pipeline_id, filename, line, column, msg),
|
||||
ConstellationControlMsg::Reload(pipeline_id) =>
|
||||
self.handle_reload(pipeline_id),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2106,6 +2110,14 @@ impl ScriptThread {
|
|||
sender.send(message).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_reload(&self, pipeline_id: PipelineId) {
|
||||
if let Some(context) = self.find_child_context(pipeline_id) {
|
||||
let win = context.active_window();
|
||||
let location = win.Location();
|
||||
location.Reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for ScriptThread {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue