mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
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 -->
This commit is contained in:
commit
86778a0d71
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) {
|
} else if flow.need_anonymous_flow(&*kid_flow) {
|
||||||
consecutive_siblings.push(kid_flow)
|
consecutive_siblings.push(kid_flow)
|
||||||
} else {
|
} else {
|
||||||
// Flush any inline fragments that we were gathering up. This allows us to
|
if !flow::base(&*kid_flow).flags.contains(IS_ABSOLUTELY_POSITIONED) {
|
||||||
// handle {ib} splits.
|
// Flush any inline fragments that we were gathering up. This allows us to
|
||||||
debug!("flushing {} inline box(es) to flow A",
|
// handle {ib} splits.
|
||||||
inline_fragment_accumulator.fragments.fragments.len());
|
let old_inline_fragment_accumulator =
|
||||||
let old_inline_fragment_accumulator =
|
mem::replace(inline_fragment_accumulator,
|
||||||
mem::replace(inline_fragment_accumulator,
|
InlineFragmentsAccumulator::new());
|
||||||
InlineFragmentsAccumulator::new());
|
self.flush_inline_fragments_to_flow_or_list(
|
||||||
self.flush_inline_fragments_to_flow_or_list(
|
old_inline_fragment_accumulator,
|
||||||
old_inline_fragment_accumulator,
|
flow,
|
||||||
flow,
|
consecutive_siblings,
|
||||||
consecutive_siblings,
|
abs_descendants,
|
||||||
abs_descendants,
|
node);
|
||||||
node);
|
}
|
||||||
|
|
||||||
if !consecutive_siblings.is_empty() {
|
if !consecutive_siblings.is_empty() {
|
||||||
let consecutive_siblings = mem::replace(consecutive_siblings, vec!());
|
let consecutive_siblings = mem::replace(consecutive_siblings, vec!());
|
||||||
self.generate_anonymous_missing_child(consecutive_siblings, flow, node);
|
self.generate_anonymous_missing_child(consecutive_siblings, flow, node);
|
||||||
|
|
|
@ -94,6 +94,18 @@
|
||||||
"url": "/_mozilla/css/absolute_hypothetical_with_intervening_inline_block_a.html"
|
"url": "/_mozilla/css/absolute_hypothetical_with_intervening_inline_block_a.html"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"css/absolute_ib_split_a.html": [
|
||||||
|
{
|
||||||
|
"path": "css/absolute_ib_split_a.html",
|
||||||
|
"references": [
|
||||||
|
[
|
||||||
|
"/_mozilla/css/absolute_ib_split_ref.html",
|
||||||
|
"=="
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"url": "/_mozilla/css/absolute_ib_split_a.html"
|
||||||
|
}
|
||||||
|
],
|
||||||
"css/absolute_inline_containing_block_a.html": [
|
"css/absolute_inline_containing_block_a.html": [
|
||||||
{
|
{
|
||||||
"path": "css/absolute_inline_containing_block_a.html",
|
"path": "css/absolute_inline_containing_block_a.html",
|
||||||
|
@ -6732,6 +6744,18 @@
|
||||||
"url": "/_mozilla/css/absolute_hypothetical_with_intervening_inline_block_a.html"
|
"url": "/_mozilla/css/absolute_hypothetical_with_intervening_inline_block_a.html"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"css/absolute_ib_split_a.html": [
|
||||||
|
{
|
||||||
|
"path": "css/absolute_ib_split_a.html",
|
||||||
|
"references": [
|
||||||
|
[
|
||||||
|
"/_mozilla/css/absolute_ib_split_ref.html",
|
||||||
|
"=="
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"url": "/_mozilla/css/absolute_ib_split_a.html"
|
||||||
|
}
|
||||||
|
],
|
||||||
"css/absolute_inline_containing_block_a.html": [
|
"css/absolute_inline_containing_block_a.html": [
|
||||||
{
|
{
|
||||||
"path": "css/absolute_inline_containing_block_a.html",
|
"path": "css/absolute_inline_containing_block_a.html",
|
||||||
|
|
5
tests/wpt/mozilla/tests/css/absolute_ib_split_a.html
Normal file
5
tests/wpt/mozilla/tests/css/absolute_ib_split_a.html
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<link rel="match" href="absolute_ib_split_ref.html">
|
||||||
|
Ser<div style="position: absolute"></div>vo
|
||||||
|
|
4
tests/wpt/mozilla/tests/css/absolute_ib_split_ref.html
Normal file
4
tests/wpt/mozilla/tests/css/absolute_ib_split_ref.html
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
Servo
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue