auto merge of #2045 : Manishearth/servo/pub-struct-2044, r=SimonSapin

See #2044
This commit is contained in:
bors-servo 2014-04-09 10:40:26 -04:00
commit d7f450dbd7
12 changed files with 19 additions and 19 deletions

View file

@ -52,7 +52,7 @@ pub struct Constellation {
} }
/// Stores the Id of the outermost frame's pipeline, along with a vector of children frames /// Stores the Id of the outermost frame's pipeline, along with a vector of children frames
struct FrameTree { pub struct FrameTree {
pipeline: RefCell<Rc<Pipeline>>, pipeline: RefCell<Rc<Pipeline>>,
parent: RefCell<Option<Rc<Pipeline>>>, parent: RefCell<Option<Rc<Pipeline>>>,
children: RefCell<~[ChildFrameTree]>, children: RefCell<~[ChildFrameTree]>,
@ -74,7 +74,7 @@ impl Clone for FrameTree {
} }
} }
struct ChildFrameTree { pub struct ChildFrameTree {
frame_tree: Rc<FrameTree>, frame_tree: Rc<FrameTree>,
/// Clipping rect representing the size and position, in page coordinates, of the visible /// Clipping rect representing the size and position, in page coordinates, of the visible
/// region of the child frame relative to the parent. /// region of the child frame relative to the parent.
@ -176,14 +176,14 @@ impl Iterator<Rc<FrameTree>> for FrameTreeIterator {
} }
/// Represents the portion of a page that is changing in navigating. /// Represents the portion of a page that is changing in navigating.
struct FrameChange { pub struct FrameChange {
before: Option<PipelineId>, before: Option<PipelineId>,
after: Rc<FrameTree>, after: Rc<FrameTree>,
navigation_type: NavigationType, navigation_type: NavigationType,
} }
/// Stores the Id's of the pipelines previous and next in the browser's history /// Stores the Id's of the pipelines previous and next in the browser's history
struct NavigationContext { pub struct NavigationContext {
previous: ~[Rc<FrameTree>], previous: ~[Rc<FrameTree>],
next: ~[Rc<FrameTree>], next: ~[Rc<FrameTree>],
current: Option<Rc<FrameTree>>, current: Option<Rc<FrameTree>>,

View file

@ -50,7 +50,7 @@ impl ApplicableDeclarations {
} }
#[deriving(Clone)] #[deriving(Clone)]
struct ApplicableDeclarationsCacheEntry { pub struct ApplicableDeclarationsCacheEntry {
declarations: SmallVec16<MatchedProperty>, declarations: SmallVec16<MatchedProperty>,
} }
@ -159,7 +159,7 @@ pub struct StyleSharingCandidateCache {
} }
#[deriving(Clone)] #[deriving(Clone)]
struct StyleSharingCandidate { pub struct StyleSharingCandidate {
style: Arc<ComputedValues>, style: Arc<ComputedValues>,
parent_style: Arc<ComputedValues>, parent_style: Arc<ComputedValues>,

View file

@ -98,7 +98,7 @@ impl ConstructionResult {
/// Represents the output of flow construction for a DOM node that has not yet resulted in a /// Represents the output of flow construction for a DOM node that has not yet resulted in a
/// complete flow. Construction items bubble up the tree until they find a `Flow` to be /// complete flow. Construction items bubble up the tree until they find a `Flow` to be
/// attached to. /// attached to.
enum ConstructionItem { pub enum ConstructionItem {
/// Inline boxes and associated {ib} splits that have not yet found flows. /// Inline boxes and associated {ib} splits that have not yet found flows.
InlineBoxesConstructionItem(InlineBoxesConstructionResult), InlineBoxesConstructionItem(InlineBoxesConstructionResult),
/// Potentially ignorable whitespace. /// Potentially ignorable whitespace.
@ -124,7 +124,7 @@ impl ConstructionItem {
} }
/// Represents inline boxes and {ib} splits that are bubbling up from an inline. /// Represents inline boxes and {ib} splits that are bubbling up from an inline.
struct InlineBoxesConstructionResult { pub struct InlineBoxesConstructionResult {
/// Any {ib} splits that we're bubbling up. /// Any {ib} splits that we're bubbling up.
/// ///
/// TODO(pcwalton): Small vector optimization. /// TODO(pcwalton): Small vector optimization.
@ -159,7 +159,7 @@ struct InlineBoxesConstructionResult {
/// }),~[ /// }),~[
/// C /// C
/// ]) /// ])
struct InlineBlockSplit { pub struct InlineBlockSplit {
/// The inline boxes that precede the flow. /// The inline boxes that precede the flow.
/// ///
/// TODO(pcwalton): Small vector optimization. /// TODO(pcwalton): Small vector optimization.

View file

@ -718,9 +718,9 @@ impl Descendants {
pub type AbsDescendants = Descendants; pub type AbsDescendants = Descendants;
type DescendantIter<'a> = MutItems<'a, Rawlink>; pub type DescendantIter<'a> = MutItems<'a, Rawlink>;
type DescendantOffsetIter<'a> = Zip<MutItems<'a, Rawlink>, MutItems<'a, Au>>; pub type DescendantOffsetIter<'a> = Zip<MutItems<'a, Rawlink>, MutItems<'a, Au>>;
/// Data common to all flows. /// Data common to all flows.
pub struct BaseFlow { pub struct BaseFlow {

View file

@ -50,7 +50,7 @@ use style::computed_values::{text_align, vertical_align, white_space};
/// with a float or a horizontal wall of the containing block. The top /// with a float or a horizontal wall of the containing block. The top
/// left corner of the green zone is the same as that of the line, but /// left corner of the green zone is the same as that of the line, but
/// the green zone can be taller and wider than the line itself. /// the green zone can be taller and wider than the line itself.
struct LineBox { pub struct LineBox {
range: Range, range: Range,
bounds: Rect<Au>, bounds: Rect<Au>,
green_zone: Size2D<Au> green_zone: Size2D<Au>

View file

@ -231,7 +231,7 @@ impl MarginCollapseInfo {
} }
} }
enum MarginCollapseState { pub enum MarginCollapseState {
AccumulatingCollapsibleTopMargin, AccumulatingCollapsibleTopMargin,
AccumulatingMarginIn, AccumulatingMarginIn,
} }

View file

@ -11,7 +11,7 @@ use servo_util::str::DOMString;
#[repr(uint)] #[repr(uint)]
#[deriving(Show, Encodable)] #[deriving(Show, Encodable)]
enum DOMErrorName { pub enum DOMErrorName {
IndexSizeError = DOMExceptionConstants::INDEX_SIZE_ERR, IndexSizeError = DOMExceptionConstants::INDEX_SIZE_ERR,
HierarchyRequestError = DOMExceptionConstants::HIERARCHY_REQUEST_ERR, HierarchyRequestError = DOMExceptionConstants::HIERARCHY_REQUEST_ERR,
WrongDocumentError = DOMExceptionConstants::WRONG_DOCUMENT_ERR, WrongDocumentError = DOMExceptionConstants::WRONG_DOCUMENT_ERR,

View file

@ -26,7 +26,7 @@ pub enum EventTargetTypeId {
} }
#[deriving(Eq,Encodable)] #[deriving(Eq,Encodable)]
struct EventListenerEntry { pub struct EventListenerEntry {
phase: ListenerPhase, phase: ListenerPhase,
listener: EventListener listener: EventListener
} }

View file

@ -14,7 +14,7 @@ use servo_util::str::DOMString;
use collections::hashmap::HashMap; use collections::hashmap::HashMap;
#[deriving(Encodable)] #[deriving(Encodable)]
enum FormDatum { pub enum FormDatum {
StringData(DOMString), StringData(DOMString),
BlobData { blob: JS<Blob>, name: DOMString } BlobData { blob: JS<Blob>, name: DOMString }
} }

View file

@ -573,7 +573,7 @@ impl NodeHelpers for JS<Node> {
// Iteration and traversal // Iteration and traversal
// //
type ChildElementIterator<'a> = Map<'a, JS<Node>, pub type ChildElementIterator<'a> = Map<'a, JS<Node>,
JS<Element>, JS<Element>,
Filter<'a, JS<Node>, AbstractNodeChildrenIterator>>; Filter<'a, JS<Node>, AbstractNodeChildrenIterator>>;

View file

@ -9,7 +9,7 @@ use dom::node::{Node, NodeHelpers};
use dom::window::Window; use dom::window::Window;
#[deriving(Encodable)] #[deriving(Encodable)]
enum NodeListType { pub enum NodeListType {
Simple(~[JS<Node>]), Simple(~[JS<Node>]),
Children(JS<Node>) Children(JS<Node>)
} }

View file

@ -50,7 +50,7 @@ pub struct JSFile {
url: Url url: Url
} }
type JSResult = ~[JSFile]; pub type JSResult = ~[JSFile];
enum CSSMessage { enum CSSMessage {
CSSTaskNewFile(StylesheetProvenance), CSSTaskNewFile(StylesheetProvenance),