mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +00:00
LibWeb: Use LineBuilder in IFC to layout line boxes incrementally
This resolves a long-standing architectural problem in LibWeb that made it unable to place CSS floating objects correctly due to not having final vertical position information when computing the amount of available horizontal space for each line.
This commit is contained in:
parent
00bde9ca51
commit
ce8043c6c2
2 changed files with 32 additions and 107 deletions
|
@ -27,14 +27,14 @@ public:
|
|||
|
||||
void dimension_box_on_line(Box&, LayoutMode);
|
||||
|
||||
private:
|
||||
struct AvailableSpaceForLineInfo {
|
||||
float left { 0 };
|
||||
float right { 0 };
|
||||
};
|
||||
|
||||
AvailableSpaceForLineInfo available_space_for_line(size_t line_index) const;
|
||||
AvailableSpaceForLineInfo available_space_for_line(float y) const;
|
||||
|
||||
private:
|
||||
void generate_line_boxes(LayoutMode);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue