mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Fix Servo build and unify display representation.
This commit is contained in:
parent
4d8fc4b8f7
commit
4752110d53
6 changed files with 128 additions and 168 deletions
|
@ -1847,6 +1847,10 @@ where
|
|||
node.type_id()
|
||||
);
|
||||
|
||||
// FIXME(emilio): This should look at display-outside and
|
||||
// display-inside, but there's so much stuff that goes through the
|
||||
// generic "block" codepath (wrongly).
|
||||
//
|
||||
// Switch on display and floatedness.
|
||||
match (display, float, positioning) {
|
||||
// `display: none` contributes no flow construction result.
|
||||
|
@ -1871,12 +1875,6 @@ where
|
|||
self.set_flow_construction_result(node, construction_result)
|
||||
},
|
||||
|
||||
// List items contribute their own special flows.
|
||||
(Display::ListItem, float_value, _) => {
|
||||
let construction_result = self.build_flow_for_list_item(node, float_value);
|
||||
self.set_flow_construction_result(node, construction_result)
|
||||
},
|
||||
|
||||
// Inline items that are absolutely-positioned contribute inline fragment construction
|
||||
// results with a hypothetical fragment.
|
||||
(Display::Inline, _, Position::Absolute) |
|
||||
|
@ -1958,7 +1956,12 @@ where
|
|||
// properties separately.
|
||||
(_, float_value, _) => {
|
||||
let float_kind = FloatKind::from_property(float_value);
|
||||
let construction_result = self.build_flow_for_block(node, float_kind);
|
||||
// List items contribute their own special flows.
|
||||
let construction_result = if display.is_list_item() {
|
||||
self.build_flow_for_list_item(node, float_value)
|
||||
} else {
|
||||
self.build_flow_for_block(node, float_kind)
|
||||
};
|
||||
self.set_flow_construction_result(node, construction_result)
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue