mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:48:14 +00:00
LibWeb: Move absolute positioning up to FormattingContext
It seems like both BFC and IFC can have absolutely positioned children. It's a bit strange, but consider the following HTML: <html><body>foobar<img style="position: absolute"></body></html> In such a document, the <img> element is an absolutely positioned child of a block-level element (<body>) with no block-level children. An IFC is established for <body>, and needs to handle layout for <img>.
This commit is contained in:
parent
4c98d00bef
commit
0ecefbff57
5 changed files with 281 additions and 215 deletions
|
@ -51,7 +51,6 @@ protected:
|
|||
private:
|
||||
virtual bool is_block_formatting_context() const final { return true; }
|
||||
|
||||
void compute_width_for_absolutely_positioned_block(Box&);
|
||||
void compute_width_for_floating_box(Box&);
|
||||
|
||||
void compute_width_for_block_level_replaced_element_in_normal_flow(ReplacedBox&);
|
||||
|
@ -65,7 +64,6 @@ private:
|
|||
void place_block_level_replaced_element_in_normal_flow(Box& child, Box& container);
|
||||
void place_block_level_non_replaced_element_in_normal_flow(Box& child, Box& container);
|
||||
|
||||
void layout_absolutely_positioned_child(Box&);
|
||||
void layout_floating_child(Box&, Box& containing_block);
|
||||
|
||||
Vector<Box*> m_left_floating_boxes;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue