mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
layout: Make the stacking context take into account the children transform when calculating overflow areas.
This only works for simple translations and similar, but I want Patrick to validate my approach.
This commit is contained in:
parent
49431be44a
commit
fd3a99ead3
5 changed files with 85 additions and 32 deletions
|
@ -1729,7 +1729,7 @@ impl BlockFlowDisplayListBuilding for BlockFlow {
|
|||
}
|
||||
}
|
||||
|
||||
contexts[stacking_context_index].children = floating;
|
||||
contexts[stacking_context_index].set_children(floating);
|
||||
return stacking_context_id;
|
||||
}
|
||||
|
||||
|
@ -1745,14 +1745,14 @@ impl BlockFlowDisplayListBuilding for BlockFlow {
|
|||
&self.base,
|
||||
scroll_policy,
|
||||
StackingContextCreationMode::InnerScrollWrapper);
|
||||
inner_stacking_context.children = child_contexts;
|
||||
inner_stacking_context.set_children(child_contexts);
|
||||
|
||||
let mut outer_stacking_context = self.fragment.create_stacking_context(
|
||||
stacking_context_id,
|
||||
&self.base,
|
||||
scroll_policy,
|
||||
StackingContextCreationMode::OuterScrollWrapper);
|
||||
outer_stacking_context.children.push(inner_stacking_context);
|
||||
outer_stacking_context.add_child(inner_stacking_context);
|
||||
outer_stacking_context
|
||||
} else {
|
||||
let mut stacking_context = self.fragment.create_stacking_context(
|
||||
|
@ -1760,7 +1760,7 @@ impl BlockFlowDisplayListBuilding for BlockFlow {
|
|||
&self.base,
|
||||
scroll_policy,
|
||||
StackingContextCreationMode::Normal);
|
||||
stacking_context.children = child_contexts;
|
||||
stacking_context.set_children(child_contexts);
|
||||
stacking_context
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue