diff options
author | Brendan Zabarauskas <bjzaba@yahoo.com.au> | 2014-05-13 09:51:08 -0700 |
---|---|---|
committer | Brendan Zabarauskas <bjzaba@yahoo.com.au> | 2014-05-13 13:39:14 -0700 |
commit | 2a7dd5302101f8d4828e279a7242296e41922ca5 (patch) | |
tree | 3f9d6e8a8d920fdc01dc932c4bf0f12b00de4b96 /src/components/main/layout/construct.rs | |
parent | b54059e6d2ccc5666fcca098ff92bbc1453ff713 (diff) | |
download | servo-2a7dd5302101f8d4828e279a7242296e41922ca5.tar.gz servo-2a7dd5302101f8d4828e279a7242296e41922ca5.zip |
Use fragment index type for referring to inline DOM fragments
Diffstat (limited to 'src/components/main/layout/construct.rs')
-rw-r--r-- | src/components/main/layout/construct.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/main/layout/construct.rs b/src/components/main/layout/construct.rs index 10d68dd34d1..82aedb08417 100644 --- a/src/components/main/layout/construct.rs +++ b/src/components/main/layout/construct.rs @@ -30,7 +30,7 @@ use layout::floats::FloatKind; use layout::flow::{Flow, ImmutableFlowUtils, MutableOwnedFlowUtils}; use layout::flow::{Descendants, AbsDescendants}; use layout::flow_list::{Rawlink}; -use layout::inline::{InlineBoxes, InlineFlow}; +use layout::inline::{FragmentIndex, InlineBoxes, InlineFlow}; use layout::table_wrapper::TableWrapperFlow; use layout::table::TableFlow; use layout::table_caption::TableCaptionFlow; @@ -189,7 +189,7 @@ impl InlineBoxAccumulator { fn from_inline_node(node: &ThreadSafeLayoutNode) -> InlineBoxAccumulator { let mut boxes = InlineBoxes::new(); - boxes.map.push(node.style().clone(), Range::new(0, 0)); + boxes.map.push(node.style().clone(), Range::empty()); InlineBoxAccumulator { boxes: boxes, has_enclosing_range: true, @@ -203,8 +203,8 @@ impl InlineBoxAccumulator { } = self; if has_enclosing_range { - let len = boxes.len() as int; - boxes.map.get_mut(0).range.extend_to(len); + let len = FragmentIndex(boxes.len() as int); + boxes.map.get_mut(FragmentIndex(0)).range.extend_to(len); } boxes } |