servo: Merge #13329 - layout: Make `baseline_offset_of_last_line_box_in_flow()` only check blocks in flow (from pcwalton:last-line-in-flow); r=notriddle
authorPatrick Walton <pcwalton@mimiga.net>
Mon, 19 Sep 2016 22:45:55 -0500
changeset 339712 43d98697e837c3d2855bd0194027486d52ee623c
parent 339711 5cc300e93e39c823dc25dbd541d46f34c6e7478c
child 339713 7e7ce6109e760d9c7a1fff7117748c8eb2a4e6f3
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 #13329 - layout: Make `baseline_offset_of_last_line_box_in_flow()` only check blocks in flow (from pcwalton:last-line-in-flow); r=notriddle Improves python.org. Closes #12124. r? @notriddle Source-Repo: https://github.com/servo/servo Source-Revision: 53938c439f3a0c2b3c3d734346ca291e1eb703a5
servo/components/layout/flow.rs
--- a/servo/components/layout/flow.rs
+++ b/servo/components/layout/flow.rs
@@ -1400,17 +1400,18 @@ impl<'a> ImmutableFlowUtils for &'a Flow
     }
 
     fn baseline_offset_of_last_line_box_in_flow(self) -> Option<Au> {
         for kid in base(self).children.iter().rev() {
             if kid.is_inline_flow() {
                 return kid.as_inline().baseline_offset_of_last_line()
             }
             if kid.is_block_like() &&
-                    kid.as_block().formatting_context_type() == FormattingContextType::None {
+                    kid.as_block().formatting_context_type() == FormattingContextType::None &&
+                    !base(kid).flags.contains(IS_ABSOLUTELY_POSITIONED) {
                 if let Some(baseline_offset) = kid.baseline_offset_of_last_line_box_in_flow() {
                     return Some(base(kid).position.start.b + baseline_offset)
                 }
             }
         }
         None
     }
 }