aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/construct.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-04-16 06:58:47 +0530
committerbors-servo <lbergstrom+bors@mozilla.com>2016-04-16 06:58:47 +0530
commit86778a0d714e4e9d2696d54ec422aede47ba3cb9 (patch)
treed995b9052e73268d323357d040669f9ac18d0da4 /components/layout/construct.rs
parent9d23d7c0d98e24995243487b55abbf2acd1ec354 (diff)
parente840c7aaa09627979c2cec69277a04f884489e6b (diff)
downloadservo-86778a0d714e4e9d2696d54ec422aede47ba3cb9.tar.gz
servo-86778a0d714e4e9d2696d54ec422aede47ba3cb9.zip
Auto merge of #10644 - pcwalton:absolute-ib-split, r=mbrubeck
layout: Make absolutely-positioned blocks not generate {ib} splits. Improves YouTube. Closes #10642. r? @mbrubeck <!-- 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/10644) <!-- Reviewable:end -->
Diffstat (limited to 'components/layout/construct.rs')
-rw-r--r--components/layout/construct.rs27
1 files changed, 14 insertions, 13 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs
index 8ba85710ae3..4099e1f9af5 100644
--- a/components/layout/construct.rs
+++ b/components/layout/construct.rs
@@ -512,19 +512,20 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
} else if flow.need_anonymous_flow(&*kid_flow) {
consecutive_siblings.push(kid_flow)
} else {
- // Flush any inline fragments that we were gathering up. This allows us to
- // handle {ib} splits.
- debug!("flushing {} inline box(es) to flow A",
- inline_fragment_accumulator.fragments.fragments.len());
- let old_inline_fragment_accumulator =
- mem::replace(inline_fragment_accumulator,
- InlineFragmentsAccumulator::new());
- self.flush_inline_fragments_to_flow_or_list(
- old_inline_fragment_accumulator,
- flow,
- consecutive_siblings,
- abs_descendants,
- node);
+ if !flow::base(&*kid_flow).flags.contains(IS_ABSOLUTELY_POSITIONED) {
+ // Flush any inline fragments that we were gathering up. This allows us to
+ // handle {ib} splits.
+ let old_inline_fragment_accumulator =
+ mem::replace(inline_fragment_accumulator,
+ InlineFragmentsAccumulator::new());
+ self.flush_inline_fragments_to_flow_or_list(
+ old_inline_fragment_accumulator,
+ flow,
+ consecutive_siblings,
+ abs_descendants,
+ node);
+ }
+
if !consecutive_siblings.is_empty() {
let consecutive_siblings = mem::replace(consecutive_siblings, vec!());
self.generate_anonymous_missing_child(consecutive_siblings, flow, node);