mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibWeb: Resolve block height correctly after line break with clear: ..
If a block with inline children ends with a line break clearing any floats, we not only need to take the introduced clearance into account for the next line box, but the containing block needs to set the correct height as well. Since the spec calls for using the last line box' bottom as the resolved height (if treated as auto), we now correctly apply the clearance to the previous line box' bottom coordinate. Fixes #4058.
This commit is contained in:
parent
e5db913b0d
commit
6d911a6baa
Notes:
github-actions[bot]
2025-04-01 14:03:58 +00:00
Author: https://github.com/gmta
Commit: 6d911a6baa
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4168
7 changed files with 85 additions and 16 deletions
|
@ -42,13 +42,14 @@ public:
|
|||
void remove_last_line_if_empty();
|
||||
|
||||
CSSPixels current_block_offset() const { return m_current_block_offset; }
|
||||
void set_current_block_offset(CSSPixels block_offset) { m_current_block_offset = block_offset; }
|
||||
|
||||
void recalculate_available_space();
|
||||
CSSPixels y_for_float_to_be_inserted_here(Box const&);
|
||||
|
||||
auto& inline_formatting_context() { return m_context; }
|
||||
|
||||
void did_introduce_clearance(CSSPixels);
|
||||
|
||||
private:
|
||||
void begin_new_line(bool increment_y, bool is_first_break_in_sequence = true);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue