Auto merge of #7132 - jdm:docenum, r=ms2ger

Document the use and meaning of the devtools control messages. Fixes …

…#6922.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7132)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-08-13 12:41:48 -06:00
commit f3b7c5cb4b
10 changed files with 80 additions and 96 deletions

View file

@ -94,6 +94,7 @@ use js::jsapi::{JSContext, JSObject, JSRuntime};
use num::ToPrimitive;
use std::iter::FromIterator;
use std::borrow::ToOwned;
use std::boxed::FnBox;
use std::collections::HashMap;
use std::collections::hash_map::Entry::{Occupied, Vacant};
use std::ascii::AsciiExt;
@ -148,7 +149,7 @@ pub struct Document {
/// https://html.spec.whatwg.org/multipage/#list-of-animation-frame-callbacks
/// List of animation frame callbacks
#[ignore_heap_size_of = "closures are hard"]
animation_frame_list: RefCell<HashMap<i32, Box<Fn(f64)>>>,
animation_frame_list: RefCell<HashMap<i32, Box<FnBox(f64)>>>,
/// Tracks all outstanding loads related to this document.
loader: DOMRefCell<DocumentLoader>,
/// The current active HTML parser, to allow resuming after interruptions.
@ -292,7 +293,7 @@ pub trait DocumentHelpers<'a> {
fn set_current_script(self, script: Option<&HTMLScriptElement>);
fn trigger_mozbrowser_event(self, event: MozBrowserEvent);
/// https://html.spec.whatwg.org/multipage/#dom-window-requestanimationframe
fn request_animation_frame(self, callback: Box<Fn(f64, )>) -> i32;
fn request_animation_frame(self, callback: Box<FnBox(f64, )>) -> i32;
/// https://html.spec.whatwg.org/multipage/#dom-window-cancelanimationframe
fn cancel_animation_frame(self, ident: i32);
/// https://html.spec.whatwg.org/multipage/#run-the-animation-frame-callbacks
@ -949,7 +950,7 @@ impl<'a> DocumentHelpers<'a> for &'a Document {
}
/// https://html.spec.whatwg.org/multipage/#dom-window-requestanimationframe
fn request_animation_frame(self, callback: Box<Fn(f64, )>) -> i32 {
fn request_animation_frame(self, callback: Box<FnBox(f64)>) -> i32 {
let window = self.window.root();
let window = window.r();
let ident = self.animation_frame_ident.get() + 1;