mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
layout: Make absolutely-positioned blocks not generate {ib} splits.
Improves YouTube. Closes #10642.
This commit is contained in:
parent
ccfd768c4b
commit
e840c7aaa0
4 changed files with 47 additions and 13 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue