diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2014-08-22 22:49:32 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2014-08-29 17:50:56 +0100 |
commit | 80704aeabd1c8882760f8efc49b8bc5abca91a60 (patch) | |
tree | 1010303f145632284fac74720a05aeaa7736cacb /src/components/layout/inline.rs | |
parent | db80b76d0a3e21e49630725376aaf3781730f489 (diff) | |
download | servo-80704aeabd1c8882760f8efc49b8bc5abca91a60.tar.gz servo-80704aeabd1c8882760f8efc49b8bc5abca91a60.zip |
Implement sideways text.
Diffstat (limited to 'src/components/layout/inline.rs')
-rw-r--r-- | src/components/layout/inline.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/components/layout/inline.rs b/src/components/layout/inline.rs index bdbabe31f5e..c5157709c27 100644 --- a/src/components/layout/inline.rs +++ b/src/components/layout/inline.rs @@ -1100,13 +1100,10 @@ impl Flow for InlineFlow { line_distance_from_flow_block_start = line_distance_from_flow_block_start + line.bounds.size.block; } // End of `lines.each` loop. - self.base.position.size.block = - if self.lines.len() > 0 { - self.lines.as_slice().last().get_ref().bounds.start.b + - self.lines.as_slice().last().get_ref().bounds.size.block - } else { - Au::new(0) - }; + self.base.position.size.block = match self.lines.as_slice().last() { + Some(ref last_line) => last_line.bounds.start.b + last_line.bounds.size.block, + None => Au::new(0) + }; self.base.floats = scanner.floats(); self.base.floats.translate(LogicalSize::new( |