Indicate items in doc comments as code-like.

This commit is contained in:
Corey Farwell 2016-11-08 09:33:03 -05:00
parent 085c52dfbc
commit 531289ebb7
5 changed files with 13 additions and 13 deletions

View file

@ -8,7 +8,7 @@ use gfx_traits::DevicePixel;
use script_traits::{EventResult, TouchId}; use script_traits::{EventResult, TouchId};
use self::TouchState::*; use self::TouchState::*;
/// Minimum number of ScreenPx to begin touch scrolling. /// Minimum number of `ScreenPx` to begin touch scrolling.
const TOUCH_PAN_MIN_SCREEN_PX: f32 = 20.0; const TOUCH_PAN_MIN_SCREEN_PX: f32 = 20.0;
pub struct TouchHandler { pub struct TouchHandler {

View file

@ -124,8 +124,8 @@ pub enum LayoutControlMsg {
GetWebFontLoadState(IpcSender<bool>), GetWebFontLoadState(IpcSender<bool>),
} }
/// Similar to net::resource_thread::LoadData /// Similar to `net::resource_thread::LoadData`
/// can be passed to LoadUrl to load a page with GET/POST /// can be passed to `LoadUrl` to load a page with GET/POST
/// parameters or headers /// parameters or headers
#[derive(Clone, Deserialize, Serialize)] #[derive(Clone, Deserialize, Serialize)]
pub struct LoadData { pub struct LoadData {
@ -364,7 +364,7 @@ pub enum CompositorEvent {
KeyEvent(Option<char>, Key, KeyState, KeyModifiers), KeyEvent(Option<char>, Key, KeyState, KeyModifiers),
} }
/// Touchpad pressure phase for TouchpadPressureEvent. /// Touchpad pressure phase for `TouchpadPressureEvent`.
#[derive(Copy, Clone, HeapSizeOf, PartialEq, Deserialize, Serialize)] #[derive(Copy, Clone, HeapSizeOf, PartialEq, Deserialize, Serialize)]
pub enum TouchpadPressurePhase { pub enum TouchpadPressurePhase {
/// Pressure before a regular click. /// Pressure before a regular click.
@ -383,8 +383,8 @@ pub struct TimerEventRequest(pub IpcSender<TimerEvent>,
pub MsDuration); pub MsDuration);
/// Notifies the script thread to fire due timers. /// Notifies the script thread to fire due timers.
/// TimerSource must be FromWindow when dispatched to ScriptThread and /// `TimerSource` must be `FromWindow` when dispatched to `ScriptThread` and
/// must be FromWorker when dispatched to a DedicatedGlobalWorkerScope /// must be `FromWorker` when dispatched to a `DedicatedGlobalWorkerScope`
#[derive(Deserialize, Serialize)] #[derive(Deserialize, Serialize)]
pub struct TimerEvent(pub TimerSource, pub TimerEventId); pub struct TimerEvent(pub TimerSource, pub TimerEventId);
@ -397,7 +397,7 @@ pub enum TimerSource {
FromWorker, FromWorker,
} }
/// The id to be used for a TimerEvent is defined by the corresponding TimerEventRequest. /// The id to be used for a `TimerEvent` is defined by the corresponding `TimerEventRequest`.
#[derive(PartialEq, Eq, Copy, Clone, Debug, HeapSizeOf, Deserialize, Serialize)] #[derive(PartialEq, Eq, Copy, Clone, Debug, HeapSizeOf, Deserialize, Serialize)]
pub struct TimerEventId(pub u32); pub struct TimerEventId(pub u32);

View file

@ -45,7 +45,7 @@ pub enum EventResult {
/// A log entry reported to the constellation /// A log entry reported to the constellation
/// We don't report all log entries, just serious ones. /// We don't report all log entries, just serious ones.
/// We need a separate type for this because LogLevel isn't serializable. /// We need a separate type for this because `LogLevel` isn't serializable.
#[derive(Clone, Debug, Deserialize, Serialize)] #[derive(Clone, Debug, Deserialize, Serialize)]
pub enum LogEntry { pub enum LogEntry {
/// Panic, with a reason and backtrace /// Panic, with a reason and backtrace

View file

@ -26,24 +26,24 @@ extern crate rustc_serialize;
extern crate url; extern crate url;
/// Opaque type stored in type-unsafe work queues for parallel layout. /// Opaque type stored in type-unsafe work queues for parallel layout.
/// Must be transmutable to and from TNode. /// Must be transmutable to and from `TNode`.
pub type UnsafeNode = (usize, usize); pub type UnsafeNode = (usize, usize);
/// One CSS "px" in the coordinate system of the "initial viewport": /// One CSS "px" in the coordinate system of the "initial viewport":
/// http://www.w3.org/TR/css-device-adapt/#initial-viewport /// http://www.w3.org/TR/css-device-adapt/#initial-viewport
/// ///
/// ViewportPx is equal to ScreenPx times a "page zoom" factor controlled by the user. This is /// `ViewportPx` is equal to `ScreenPx` times a "page zoom" factor controlled by the user. This is
/// the desktop-style "full page" zoom that enlarges content but then reflows the layout viewport /// the desktop-style "full page" zoom that enlarges content but then reflows the layout viewport
/// so it still exactly fits the visible area. /// so it still exactly fits the visible area.
/// ///
/// At the default zoom level of 100%, one PagePx is equal to one ScreenPx. However, if the /// At the default zoom level of 100%, one `PagePx` is equal to one `ScreenPx`. However, if the
/// document is zoomed in or out then this scale may be larger or smaller. /// document is zoomed in or out then this scale may be larger or smaller.
#[derive(Clone, Copy, Debug)] #[derive(Clone, Copy, Debug)]
pub enum ViewportPx {} pub enum ViewportPx {}
/// One CSS "px" in the root coordinate system for the content document. /// One CSS "px" in the root coordinate system for the content document.
/// ///
/// PagePx is equal to ViewportPx multiplied by a "viewport zoom" factor controlled by the user. /// `PagePx` is equal to `ViewportPx` multiplied by a "viewport zoom" factor controlled by the user.
/// This is the mobile-style "pinch zoom" that enlarges content without reflowing it. When the /// This is the mobile-style "pinch zoom" that enlarges content without reflowing it. When the
/// viewport zoom is not equal to 1.0, then the layout viewport is no longer the same physical size /// viewport zoom is not equal to 1.0, then the layout viewport is no longer the same physical size
/// as the viewable area. /// as the viewable area.

View file

@ -7,7 +7,7 @@ use cssparser::CssStringWriter;
use std::fmt::{self, Write}; use std::fmt::{self, Write};
use url::Url; use url::Url;
/// The real ToCss trait can't be implemented for types in crates that don't /// The real `ToCss` trait can't be implemented for types in crates that don't
/// depend on each other. /// depend on each other.
pub trait ToCss { pub trait ToCss {
/// Serialize `self` in CSS syntax, writing to `dest`. /// Serialize `self` in CSS syntax, writing to `dest`.