aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-04-16 05:25:12 +0530
committerbors-servo <lbergstrom+bors@mozilla.com>2016-04-16 05:25:12 +0530
commit812c4ad69916e29fe2743cee02ab71b000050987 (patch)
tree134cc1c6a6def8af5aed48a8c7a98e0b4f458490 /components/layout
parentccfd768c4bd6874c67f1c45c23d770f617452a07 (diff)
parent2ecadc913aaf16a4dbaaf881857448a60cac0080 (diff)
downloadservo-812c4ad69916e29fe2743cee02ab71b000050987.tar.gz
servo-812c4ad69916e29fe2743cee02ab71b000050987.zip
Auto merge of #10637 - notriddle:absolute_float_line_height, r=pcwalton
layout: Do not propagate floats in or out of absolutely positioned flows Fixes #10625 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10637) <!-- Reviewable:end -->
Diffstat (limited to 'components/layout')
-rw-r--r--components/layout/sequential.rs14
1 files changed, 10 insertions, 4 deletions
diff --git a/components/layout/sequential.rs b/components/layout/sequential.rs
index 6ca7332497a..bc4668f33c6 100644
--- a/components/layout/sequential.rs
+++ b/components/layout/sequential.rs
@@ -9,6 +9,7 @@ use context::{LayoutContext, SharedLayoutContext};
use display_list_builder::DisplayListBuildState;
use euclid::point::Point2D;
use floats::SpeculatedFloatPlacement;
+use flow::IS_ABSOLUTELY_POSITIONED;
use flow::{PostorderFlowTraversal, PreorderFlowTraversal};
use flow::{self, Flow, ImmutableFlowUtils, InorderFlowTraversal, MutableFlowUtils};
use flow_ref::{self, FlowRef};
@@ -144,10 +145,15 @@ pub fn guess_float_placement(flow: &mut Flow) {
let mut floats_in = SpeculatedFloatPlacement::compute_floats_in_for_first_child(flow);
for kid in flow::mut_base(flow).child_iter_mut() {
- floats_in.compute_floats_in(kid);
- flow::mut_base(kid).speculated_float_placement_in = floats_in;
- guess_float_placement(kid);
- floats_in = flow::base(kid).speculated_float_placement_out;
+ if flow::base(kid).flags.contains(IS_ABSOLUTELY_POSITIONED) {
+ // Do not propagate floats in or out, but do propogate between kids.
+ guess_float_placement(kid);
+ } else {
+ floats_in.compute_floats_in(kid);
+ flow::mut_base(kid).speculated_float_placement_in = floats_in;
+ guess_float_placement(kid);
+ floats_in = flow::base(kid).speculated_float_placement_out;
+ }
}
floats_in.compute_floats_out(flow);
flow::mut_base(flow).speculated_float_placement_out = floats_in