diff options
author | Patrick Walton <pcwalton@mimiga.net> | 2016-04-14 17:41:58 -0700 |
---|---|---|
committer | Patrick Walton <pcwalton@mimiga.net> | 2016-04-28 10:25:49 -0700 |
commit | 6b6587a73bbc9980e395268869f7e9164b29691c (patch) | |
tree | 99d663b9f64ee1983304fc0739fd1055cad1f057 /components | |
parent | 97de2c2afa0510cb9ba1ceb65cfb33b8ab70dda4 (diff) | |
download | servo-6b6587a73bbc9980e395268869f7e9164b29691c.tar.gz servo-6b6587a73bbc9980e395268869f7e9164b29691c.zip |
layout: Translate floats flowing out of blocks to compensate for inline
direction margins.
Improves Reddit /r/rust.
Diffstat (limited to 'components')
-rw-r--r-- | components/layout/block.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/components/layout/block.rs b/components/layout/block.rs index fa91b847b20..0b10ef39000 100644 --- a/components/layout/block.rs +++ b/components/layout/block.rs @@ -1020,8 +1020,12 @@ impl BlockFlow { self.base.position.size.block = cur_b; } - // Store the current set of floats in the flow so that flows that come later in the + // Translate the current set of floats back into the parent coordinate system in the + // inline direction, and store them in the flow so that flows that come later in the // document can access them. + floats.translate(LogicalSize::new(writing_mode, + self.fragment.inline_start_offset(), + Au(0))); self.base.floats = floats.clone(); self.adjust_fragments_for_collapsed_margins_if_root(layout_context); } else { |