mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove the Node type parameter from Contents
We now pass the Node as an argument during DOM traversal in layout.
This commit is contained in:
parent
b2f6cc7144
commit
47944a39fc
6 changed files with 114 additions and 63 deletions
|
@ -61,19 +61,19 @@ fn construct_for_root_element<'dom>(
|
|||
Display::GeneratingBox(DisplayGeneratingBox::OutsideInside { inside, .. }) => inside,
|
||||
};
|
||||
|
||||
let contents = replaced.map_or(Contents::OfElement(root_element), Contents::Replaced);
|
||||
let contents = replaced.map_or(Contents::OfElement, Contents::Replaced);
|
||||
if box_style.position.is_absolutely_positioned() {
|
||||
(
|
||||
ContainsFloats::No,
|
||||
vec![Arc::new(BlockLevelBox::OutOfFlowAbsolutelyPositionedBox(
|
||||
AbsolutelyPositionedBox::construct(context, style, display_inside, contents),
|
||||
AbsolutelyPositionedBox::construct(context, root_element, style, display_inside, contents),
|
||||
))],
|
||||
)
|
||||
} else if box_style.float.is_floating() {
|
||||
(
|
||||
ContainsFloats::Yes,
|
||||
vec![Arc::new(BlockLevelBox::OutOfFlowFloatBox(
|
||||
FloatBox::construct(context, style, display_inside, contents),
|
||||
FloatBox::construct(context, root_element, style, display_inside, contents),
|
||||
))],
|
||||
)
|
||||
} else {
|
||||
|
@ -82,6 +82,7 @@ fn construct_for_root_element<'dom>(
|
|||
vec![Arc::new(BlockLevelBox::Independent(
|
||||
IndependentFormattingContext::construct(
|
||||
context,
|
||||
root_element,
|
||||
style,
|
||||
display_inside,
|
||||
contents,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue