servo: Merge #13685 - layout: Don't use the existing block position as the float ceiling when placing block formatting contexts in the sequential fallback (from pcwalton:block-formatting-context-fallback-placement); r=notriddle
authorPatrick Walton <pcwalton@mimiga.net>
Tue, 11 Oct 2016 01:11:24 -0500
changeset 339881 048ebe874ed5698f465a027ca6f7685b21641b06
parent 339880 826a79e4f45c3637ecb3331d097043a5f99a6865
child 339882 5890b18db1c9bbcd88579d28eb4a28e1aa65cec4
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnotriddle
servo: Merge #13685 - layout: Don't use the existing block position as the float ceiling when placing block formatting contexts in the sequential fallback (from pcwalton:block-formatting-context-fallback-placement); r=notriddle The existing block position isn't yet computed at that time, so it contains junk data. It just so happened to work on first reflow because that value is usually set to zero, but it usually failed on subsequent reflows. Improves certain Wikipedia pages. Closes #13630 (though Google is still broken; it was a separate bug and will be split off into a separate issue). r? @notriddle Source-Repo: https://github.com/servo/servo Source-Revision: cad5a4e3261ddb82b542b9a087b48daab51bbfd3
servo/components/layout/block.rs
--- a/servo/components/layout/block.rs
+++ b/servo/components/layout/block.rs
@@ -1489,21 +1489,19 @@ impl BlockFlow {
         if !self.base.might_have_floats_in() {
             return
         }
 
         // If you remove the might_have_floats_in conditional, this will go off.
         debug_assert!(!self.is_flex());
 
         // Compute the available space for us, based on the actual floats.
-        let rect = self.base.floats.available_rect(
-            self.base.position.start.b,
-            self.fragment.border_box.size.block,
-            content_box.size.inline
-        );
+        let rect = self.base.floats.available_rect(Au(0),
+                                                   self.fragment.border_box.size.block,
+                                                   content_box.size.inline);
         let available_inline_size = if let Some(rect) = rect {
             // Offset our position by whatever displacement is needed to not impact the floats.
             // Also, account for margins sliding behind floats.
             let inline_offset = if self.fragment.margin.inline_start < rect.start.i {
                 // Do not do anything for negative margins; those are handled separately.
                 rect.start.i - max(Au(0), self.fragment.margin.inline_start)
             } else {
                 Au(0)