From 47d05c99089ebb3621e2fd2c83f1f40c35296a0e Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 10 Oct 2012 18:08:31 -0700 Subject: [PATCH] Replace remaning doc attrs with comments --- src/servo/css/lexer.rs | 2 +- src/servo/css/parser_util.rs | 2 +- src/servo/css/values.rs | 12 ++++++------ src/servo/gfx/compositor.rs | 4 ++-- src/servo/gfx/png_compositor.rs | 4 ++-- src/servo/html/lexer_util.rs | 4 +++- src/servo/platform/osmain.rs | 6 +++--- 7 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/servo/css/lexer.rs b/src/servo/css/lexer.rs index a4067945464..1e60ba3b34b 100644 --- a/src/servo/css/lexer.rs +++ b/src/servo/css/lexer.rs @@ -1,4 +1,4 @@ -#[doc = "Code to lex and tokenize css files."] +//! Code to lex and tokenize css files use option::is_none; use str::from_bytes; diff --git a/src/servo/css/parser_util.rs b/src/servo/css/parser_util.rs index 74d4e395d4a..3e5a589f831 100644 --- a/src/servo/css/parser_util.rs +++ b/src/servo/css/parser_util.rs @@ -1,4 +1,4 @@ -#[doc = "Helper functions to parse values of specific attributes."] +//! Helper functions to parse values of specific attributes use css::values::*; use str::{pop_char, from_chars}; diff --git a/src/servo/css/values.rs b/src/servo/css/values.rs index c73eca1c9c6..0b883c75eca 100644 --- a/src/servo/css/values.rs +++ b/src/servo/css/values.rs @@ -1,13 +1,13 @@ +/*! +Defines how css rules, both selectors and style specifications, are +stored. CSS selector-matching rules, as presented by +http://www.w3.org/TR/CSS2/selector.html are represented by nested types. +*/ + use SharedColor = util::color::Color; use cmp::Eq; use std::net::url::Url; -#[doc = " - Defines how css rules, both selectors and style specifications, are - stored. CSS selector-matching rules, as presented by - http://www.w3.org/TR/CSS2/selector.html are represented by nested types. -"] - // CSS Units enum ParseResult { diff --git a/src/servo/gfx/compositor.rs b/src/servo/gfx/compositor.rs index 09e424d9aed..b7447866b66 100644 --- a/src/servo/gfx/compositor.rs +++ b/src/servo/gfx/compositor.rs @@ -1,10 +1,10 @@ use dom::event::Event; use azure::azure_hl::DrawTarget; -#[doc = " +/** The interface used to by the renderer to aquire draw targets for each rendered frame and submit them to be drawn to the display -"] +*/ trait Compositor { fn begin_drawing(+next_dt: pipes::Chan); fn draw(+next_dt: pipes::Chan, +draw_me: DrawTarget); diff --git a/src/servo/gfx/png_compositor.rs b/src/servo/gfx/png_compositor.rs index e4acbb6f7a4..28a8ebe1a31 100644 --- a/src/servo/gfx/png_compositor.rs +++ b/src/servo/gfx/png_compositor.rs @@ -1,9 +1,9 @@ -#[doc = " +/*! A graphics compositor that renders to PNG format buffers Each time the renderer renders a frame the compositor will output a `~[u8]` containing the frame in PNG format. -"]; +*/ use libc::{c_int, c_uint, c_void, c_uchar}; use azure_bg = azure::bindgen; diff --git a/src/servo/html/lexer_util.rs b/src/servo/html/lexer_util.rs index d7df23fb0d0..7442a9d867b 100644 --- a/src/servo/html/lexer_util.rs +++ b/src/servo/html/lexer_util.rs @@ -1,4 +1,6 @@ -#[doc = "A collection of functions that are useful for both css and html parsing."] +/*! +A collection of functions that are useful for both css and html parsing +*/ use option::is_none; use str::from_bytes; diff --git a/src/servo/platform/osmain.rs b/src/servo/platform/osmain.rs index d0c235c85e6..7e25cc264c2 100644 --- a/src/servo/platform/osmain.rs +++ b/src/servo/platform/osmain.rs @@ -161,10 +161,10 @@ fn mainloop(+mode: Mode, po: comm::Port) { } } -#[doc = " +/** Implementation to allow the osmain channel to be used as a graphics compositor for the renderer -"] +*/ impl OSMain : Compositor { fn begin_drawing(+next_dt: pipes::Chan) { self.send(BeginDrawing(next_dt)) @@ -226,7 +226,7 @@ fn Surface() -> Surface { Surface { cairo_surface: cairo_surface, draw_target: draw_target, have: true } } -#[doc = "A function for spawning into the platform's main thread"] +/// A function for spawning into the platform's main thread fn on_osmain(+f: fn~(+po: comm::Port)) -> comm::Chan { task::task().sched_mode(task::PlatformThread).spawn_listener(f) }