diff options
author | Patrick Walton <pcwalton@mimiga.net> | 2015-08-03 19:21:44 -0700 |
---|---|---|
committer | Patrick Walton <pcwalton@mimiga.net> | 2015-08-03 19:22:50 -0700 |
commit | 3d9cc784d0c65e34540ecf646d2bca044f4c42c3 (patch) | |
tree | 43c9cc22e55adbed385e2ace37ebcd5201999a6c /components/layout/block.rs | |
parent | d66c59a15213dec17f38af0653e9e7e1bf579a95 (diff) | |
download | servo-3d9cc784d0c65e34540ecf646d2bca044f4c42c3.tar.gz servo-3d9cc784d0c65e34540ecf646d2bca044f4c42c3.zip |
layout: If the container of a block formatting context has margins in
the inline direction, subtract those from the inline size of preceding
floats.
Makes the content area on http://reddit.com/r/rust visible.
Diffstat (limited to 'components/layout/block.rs')
-rw-r--r-- | components/layout/block.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/components/layout/block.rs b/components/layout/block.rs index ee3e603e11f..d1a333f2b83 100644 --- a/components/layout/block.rs +++ b/components/layout/block.rs @@ -1300,8 +1300,10 @@ impl BlockFlow { let mut inline_size_of_preceding_left_floats = Au(0); let mut inline_size_of_preceding_right_floats = Au(0); if self.formatting_context_type() == FormattingContextType::None { - inline_size_of_preceding_left_floats = self.inline_size_of_preceding_left_floats; - inline_size_of_preceding_right_floats = self.inline_size_of_preceding_right_floats; + inline_size_of_preceding_left_floats = + max(self.inline_size_of_preceding_left_floats - inline_start_content_edge, Au(0)); + inline_size_of_preceding_right_floats = + max(self.inline_size_of_preceding_right_floats - inline_end_content_edge, Au(0)); } let opaque_self = OpaqueFlow::from_flow(self); @@ -1319,7 +1321,6 @@ impl BlockFlow { // FIXME (mbrubeck): Get correct mode for absolute containing block let containing_block_mode = self.base.writing_mode; - // This value is used only for table cells. let mut inline_start_margin_edge = inline_start_content_edge; let mut inline_end_margin_edge = inline_end_content_edge; |