servo: Merge #14135 - Indicate items in doc comments as code-like (from frewsxcv:code-like); r=Ms2ger
authorCorey Farwell <coreyf@rwell.org>
Mon, 14 Nov 2016 06:59:35 -0600
changeset 340148 d29762ef45e9847a6d72ea23deb83bdf48d24a09
parent 340147 79d53bc10f7834d375fc4ad898f064b7de28f28d
child 340149 40d9cfca3d64ada446866112643673269e60658f
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMs2ger
servo: Merge #14135 - Indicate items in doc comments as code-like (from frewsxcv:code-like); r=Ms2ger Source-Repo: https://github.com/servo/servo Source-Revision: eb36ab82c042750897e7d35bc57b0a453a6c228b
servo/components/compositing/touch.rs
servo/components/script_traits/lib.rs
servo/components/script_traits/script_msg.rs
servo/components/style_traits/lib.rs
servo/components/style_traits/values.rs
--- a/servo/components/compositing/touch.rs
+++ b/servo/components/compositing/touch.rs
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use euclid::point::TypedPoint2D;
 use euclid::scale_factor::ScaleFactor;
 use gfx_traits::DevicePixel;
 use script_traits::{EventResult, TouchId};
 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;
 
 pub struct TouchHandler {
     pub state: TouchState,
     pub active_touch_points: Vec<TouchPoint>,
 }
 
 #[derive(Clone, Copy, Debug)]
--- a/servo/components/script_traits/lib.rs
+++ b/servo/components/script_traits/lib.rs
@@ -119,18 +119,18 @@ pub enum LayoutControlMsg {
     TickAnimations,
     /// Tells layout about the new scrolling offsets of each scrollable stacking context.
     SetStackingContextScrollStates(Vec<StackingContextScrollState>),
     /// Requests the current load state of Web fonts. `true` is returned if fonts are still loading
     /// and `false` is returned if all fonts have loaded.
     GetWebFontLoadState(IpcSender<bool>),
 }
 
-/// Similar to net::resource_thread::LoadData
-/// can be passed to LoadUrl to load a page with GET/POST
+/// Similar to `net::resource_thread::LoadData`
+/// can be passed to `LoadUrl` to load a page with GET/POST
 /// parameters or headers
 #[derive(Clone, Deserialize, Serialize)]
 pub struct LoadData {
     /// The URL.
     pub url: Url,
     /// The method.
     #[serde(deserialize_with = "::hyper_serde::deserialize",
             serialize_with = "::hyper_serde::serialize")]
@@ -362,17 +362,17 @@ pub enum CompositorEvent {
     /// A touch event was generated with a touch ID and location.
     TouchEvent(TouchEventType, TouchId, Point2D<f32>),
     /// Touchpad pressure event
     TouchpadPressureEvent(Point2D<f32>, f32, TouchpadPressurePhase),
     /// A key was pressed.
     KeyEvent(Option<char>, Key, KeyState, KeyModifiers),
 }
 
-/// Touchpad pressure phase for TouchpadPressureEvent.
+/// Touchpad pressure phase for `TouchpadPressureEvent`.
 #[derive(Copy, Clone, HeapSizeOf, PartialEq, Deserialize, Serialize)]
 pub enum TouchpadPressurePhase {
     /// Pressure before a regular click.
     BeforeClick,
     /// Pressure after a regular click.
     AfterFirstClick,
     /// Pressure after a "forceTouch" click
     AfterSecondClick,
@@ -381,31 +381,31 @@ pub enum TouchpadPressurePhase {
 /// Requests a TimerEvent-Message be sent after the given duration.
 #[derive(Deserialize, Serialize)]
 pub struct TimerEventRequest(pub IpcSender<TimerEvent>,
                              pub TimerSource,
                              pub TimerEventId,
                              pub MsDuration);
 
 /// Notifies the script thread to fire due timers.
-/// TimerSource must be FromWindow when dispatched to ScriptThread and
-/// must be FromWorker when dispatched to a DedicatedGlobalWorkerScope
+/// `TimerSource` must be `FromWindow` when dispatched to `ScriptThread` and
+/// must be `FromWorker` when dispatched to a `DedicatedGlobalWorkerScope`
 #[derive(Deserialize, Serialize)]
 pub struct TimerEvent(pub TimerSource, pub TimerEventId);
 
 /// Describes the thread that requested the TimerEvent.
 #[derive(Copy, Clone, HeapSizeOf, Deserialize, Serialize)]
 pub enum TimerSource {
     /// The event was requested from a window (ScriptThread).
     FromWindow(PipelineId),
     /// The event was requested from a worker (DedicatedGlobalWorkerScope).
     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)]
 pub struct TimerEventId(pub u32);
 
 /// Unit of measurement.
 #[derive(Clone, Copy, HeapSizeOf)]
 pub enum Milliseconds {}
 /// Unit of measurement.
 #[derive(Clone, Copy, HeapSizeOf)]
--- a/servo/components/script_traits/script_msg.rs
+++ b/servo/components/script_traits/script_msg.rs
@@ -40,17 +40,17 @@ pub enum EventResult {
     /// Allowed by web content
     DefaultAllowed,
     /// Prevented by web content
     DefaultPrevented,
 }
 
 /// A log entry reported to the constellation
 /// 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)]
 pub enum LogEntry {
     /// Panic, with a reason and backtrace
     Panic(String, String),
     /// Error, with a reason
     Error(String),
     /// warning, with a reason
     Warn(String)
--- a/servo/components/style_traits/lib.rs
+++ b/servo/components/style_traits/lib.rs
@@ -20,34 +20,34 @@ extern crate cssparser;
 extern crate euclid;
 #[cfg(feature = "servo")] extern crate heapsize;
 #[cfg(feature = "servo")] #[macro_use] extern crate heapsize_derive;
 extern crate rustc_serialize;
 #[cfg(feature = "servo")] extern crate serde;
 #[cfg(feature = "servo")] #[macro_use] extern crate serde_derive;
 
 /// 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);
 
 /// One CSS "px" in the coordinate system of the "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
 /// 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.
 #[derive(Clone, Copy, Debug)]
 pub enum ViewportPx {}
 
 /// 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
 /// viewport zoom is not equal to 1.0, then the layout viewport is no longer the same physical size
 /// as the viewable area.
 #[derive(Clone, Copy, Debug)]
 pub enum PagePx {}
 
 // In summary, the hierarchy of pixel units and the factors to convert from one to the next:
 //
--- a/servo/components/style_traits/values.rs
+++ b/servo/components/style_traits/values.rs
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 use app_units::Au;
 use std::fmt;
 
-/// 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.
 pub trait ToCss {
     /// Serialize `self` in CSS syntax, writing to `dest`.
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write;
 
     /// Serialize `self` in CSS syntax and return a string.
     ///
     /// (This is a convenience wrapper for `to_css` and probably should not be overridden.)