diff options
author | Brendan Zabarauskas <bjzaba@yahoo.com.au> | 2014-05-28 10:35:35 -0700 |
---|---|---|
committer | Brendan Zabarauskas <bjzaba@yahoo.com.au> | 2014-05-28 16:35:15 -0700 |
commit | 3ffce02b88a59e5967a31a29d4666bde176e874c (patch) | |
tree | be25b343933d2e922ec8123ce324cd91b30394ab /src/components/main/layout/flow.rs | |
parent | c5fced4390a7ad46e3eccfae48073ed820a840b6 (diff) | |
download | servo-3ffce02b88a59e5967a31a29d4666bde176e874c.tar.gz servo-3ffce02b88a59e5967a31a29d4666bde176e874c.zip |
Rename functions, fields and adjust comments to use `fragment` instead of `box`
I tried to make sure to keep 'box' where it made sense, and alter comments so they still make sense.
Diffstat (limited to 'src/components/main/layout/flow.rs')
-rw-r--r-- | src/components/main/layout/flow.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/components/main/layout/flow.rs b/src/components/main/layout/flow.rs index 0e3538063f2..2781a856d87 100644 --- a/src/components/main/layout/flow.rs +++ b/src/components/main/layout/flow.rs @@ -8,8 +8,8 @@ /// inline and block layout. /// /// Flows are interior nodes in the layout tree and correspond closely to *flow contexts* in the -/// CSS specification. Flows are responsible for positioning their child flow contexts and boxes. -/// Flows have purpose-specific fields, such as auxiliary line box structs, out-of-flow child +/// CSS specification. Flows are responsible for positioning their child flow contexts and fragments. +/// Flows have purpose-specific fields, such as auxiliary line fragment structs, out-of-flow child /// lists, and so on. /// /// Currently, the important types of flows are: @@ -21,7 +21,7 @@ /// the viewport. /// /// * `InlineFlow`: A flow that establishes an inline context. It has a flat list of child -/// boxes/flows that are subject to inline layout and line breaking and structs to represent +/// fragments/flows that are subject to inline layout and line breaking and structs to represent /// line breaks and mapping to CSS boxes, for the purpose of handling `getClientRects()` and /// similar methods. @@ -844,12 +844,12 @@ impl<'a> ImmutableFlowUtils for &'a Flow { fn generate_missing_child_flow(self, node: &ThreadSafeLayoutNode) -> Box<Flow:Share> { match self.class() { TableFlowClass | TableRowGroupFlowClass => { - let box_ = Fragment::new_anonymous_table_box(node, TableRowFragment); - box TableRowFlow::from_node_and_box(node, box_) as Box<Flow:Share> + let fragment = Fragment::new_anonymous_table_fragment(node, TableRowFragment); + box TableRowFlow::from_node_and_fragment(node, fragment) as Box<Flow:Share> }, TableRowFlowClass => { - let box_ = Fragment::new_anonymous_table_box(node, TableCellFragment); - box TableCellFlow::from_node_and_box(node, box_) as Box<Flow:Share> + let fragment = Fragment::new_anonymous_table_fragment(node, TableCellFragment); + box TableCellFlow::from_node_and_fragment(node, fragment) as Box<Flow:Share> }, _ => { fail!("no need to generate a missing child") @@ -869,8 +869,8 @@ impl<'a> ImmutableFlowUtils for &'a Flow { /// Return true if this flow is a Block Container. /// - /// Except for table boxes and replaced elements, block-level boxes (`BlockFlow`) are - /// also block container boxes. + /// Except for table fragments and replaced elements, block-level fragments (`BlockFlow`) are + /// also block container fragments. /// Non-replaced inline blocks and non-replaced table cells are also block /// containers. fn is_block_container(self) -> bool { @@ -1065,7 +1065,7 @@ impl MutableOwnedFlowUtils for Box<Flow:Share> { let _ = base.parallel.children_and_absolute_descendant_count.fetch_add(1, Relaxed); } - /// Finishes a flow. Once a flow is finished, no more child flows or boxes may be added to it. + /// Finishes a flow. Once a flow is finished, no more child flows or fragments may be added to it. /// This will normally run the bubble-widths (minimum and preferred -- i.e. intrinsic -- width) /// calculation, unless the global `bubble_widths_separately` flag is on. /// |