mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Fix comments in devtools.
In particular, use the right kind of documentation comments.
This commit is contained in:
parent
5c4d2d7928
commit
422b6bd223
4 changed files with 17 additions and 11 deletions
|
@ -2,9 +2,10 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
/// Liberally derived from the [Firefox JS implementation](http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/webconsole.js).
|
//! Liberally derived from the [Firefox JS implementation]
|
||||||
/// Mediates interaction between the remote web console and equivalent functionality (object
|
//! (http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/webconsole.js).
|
||||||
/// inspection, JS evaluation, autocompletion) in Servo.
|
//! Mediates interaction between the remote web console and equivalent functionality (object
|
||||||
|
//! inspection, JS evaluation, autocompletion) in Servo.
|
||||||
|
|
||||||
use actor::{Actor, ActorRegistry};
|
use actor::{Actor, ActorRegistry};
|
||||||
use protocol::JsonPacketStream;
|
use protocol::JsonPacketStream;
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
/// Liberally derived from the [Firefox JS implementation](http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/inspector.js).
|
//! Liberally derived from the [Firefox JS implementation]
|
||||||
|
//! (http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/inspector.js).
|
||||||
|
|
||||||
use devtools_traits::{DevtoolScriptControlMsg, NodeInfo};
|
use devtools_traits::{DevtoolScriptControlMsg, NodeInfo};
|
||||||
use devtools_traits::DevtoolScriptControlMsg::{GetRootNode, GetDocumentElement, GetChildren};
|
use devtools_traits::DevtoolScriptControlMsg::{GetRootNode, GetDocumentElement, GetChildren};
|
||||||
|
@ -461,12 +462,14 @@ impl Actor for PageStyleActor {
|
||||||
let auto_margins = msg.get(&"autoMargins".to_string()).unwrap().as_boolean().unwrap();
|
let auto_margins = msg.get(&"autoMargins".to_string()).unwrap().as_boolean().unwrap();
|
||||||
|
|
||||||
//TODO: the remaining layout properties (margin, border, padding, position)
|
//TODO: the remaining layout properties (margin, border, padding, position)
|
||||||
// as specified in getLayout in http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/styles.js
|
// as specified in getLayout in
|
||||||
|
// http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/styles.js
|
||||||
let msg = GetLayoutReply {
|
let msg = GetLayoutReply {
|
||||||
width: width.round() as i32,
|
width: width.round() as i32,
|
||||||
height: height.round() as i32,
|
height: height.round() as i32,
|
||||||
autoMargins: if auto_margins {
|
autoMargins: if auto_margins {
|
||||||
//TODO: real values like processMargins in http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/styles.js
|
//TODO: real values like processMargins in
|
||||||
|
// http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/styles.js
|
||||||
let mut m = BTreeMap::new();
|
let mut m = BTreeMap::new();
|
||||||
m.insert("top".to_string(), "auto".to_string().to_json());
|
m.insert("top".to_string(), "auto".to_string().to_json());
|
||||||
m.insert("bottom".to_string(), "auto".to_string().to_json());
|
m.insert("bottom".to_string(), "auto".to_string().to_json());
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
/// Liberally derived from the [Firefox JS implementation](http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/webconsole.js).
|
//! Liberally derived from the [Firefox JS implementation]
|
||||||
/// Handles interaction with the remote web console on network events (HTTP requests, responses) in Servo.
|
//! (http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/webconsole.js).
|
||||||
|
//! Handles interaction with the remote web console on network events (HTTP requests, responses) in Servo.
|
||||||
|
|
||||||
extern crate hyper;
|
extern crate hyper;
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
/// Liberally derived from the [Firefox JS implementation](http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/webbrowser.js).
|
//! Liberally derived from the [Firefox JS implementation]
|
||||||
/// Connection point for remote devtools that wish to investigate a particular tab's contents.
|
//! (http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/webbrowser.js).
|
||||||
/// Supports dynamic attaching and detaching which control notifications of navigation, etc.
|
//! Connection point for remote devtools that wish to investigate a particular tab's contents.
|
||||||
|
//! Supports dynamic attaching and detaching which control notifications of navigation, etc.
|
||||||
|
|
||||||
use actor::{Actor, ActorRegistry};
|
use actor::{Actor, ActorRegistry};
|
||||||
use actors::console::ConsoleActor;
|
use actors::console::ConsoleActor;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue