aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/devtools.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2016-06-03 13:39:38 -0400
committerJosh Matthews <josh@joshmatthews.net>2016-06-06 00:51:36 +0100
commit7bf2e19437ad954bd1d03bb52b86551546ae8ba5 (patch)
tree96d085e4a406776ce766e10b4c236be831e4cf65 /components/script/devtools.rs
parent1f5b0008ac763bbb2209a70afddb6434d18cff9d (diff)
downloadservo-7bf2e19437ad954bd1d03bb52b86551546ae8ba5.tar.gz
servo-7bf2e19437ad954bd1d03bb52b86551546ae8ba5.zip
Make the net monitor panel in FF's devtools show meaningful output.
0) Advertise support for the network monitor in the initial protocol communication. 1) Only notify the developer tools server about the final request in an HTTP transaction. 2) Add timing information for connecting to the HTTP server and sending the HTTP request. 3) Reduce duplication between various networkEventUpdate structures by creating a helper function that merges two JSON structures together. This also corrects the JSON structure so the devtools client interprets the output correctly. 4) Calculate various header size fields correctly. 5) Remove unnecessary usize->u32 casts by making the appropriate fields usize. 6) Add header values to request and response header messages. 7) Support triggering page reloads via the devtools client.
Diffstat (limited to 'components/script/devtools.rs')
-rw-r--r--components/script/devtools.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/components/script/devtools.rs b/components/script/devtools.rs
index 8f783126a62..7533b159771 100644
--- a/components/script/devtools.rs
+++ b/components/script/devtools.rs
@@ -10,6 +10,7 @@ use dom::bindings::codegen::Bindings::CSSStyleDeclarationBinding::CSSStyleDeclar
use dom::bindings::codegen::Bindings::DOMRectBinding::DOMRectMethods;
use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
use dom::bindings::codegen::Bindings::ElementBinding::ElementMethods;
+use dom::bindings::codegen::Bindings::LocationBinding::LocationMethods;
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
use dom::bindings::conversions::{FromJSValConvertible, jsstring_to_str};
use dom::bindings::global::GlobalRef;
@@ -250,3 +251,11 @@ pub fn handle_request_animation_frame(context: &BrowsingContext,
devtools_sender.send(msg).unwrap();
});
}
+
+pub fn handle_reload(context: &BrowsingContext,
+ id: PipelineId) {
+ let context = context.find(id).expect("There is no such context");
+ let win = context.active_window();
+ let location = win.Location();
+ location.Reload();
+}