mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 09:09:43 +00:00
LibWeb: Layout inline elements respective of writing-mode
Use the `writing-mode` property to determine what values should be used for computing each element's rect on the screen. If it is a vertical mode, swap the inline and block, lengths and offsets. This only lays out whole inline formatting contexts vertically, and does not currently support mixing the two orientations in a single context.
This commit is contained in:
parent
ede9012723
commit
80e7e6dd7d
Notes:
github-actions[bot]
2024-11-03 16:03:04 +00:00
Author: https://github.com/BenJilks
Commit: 80e7e6dd7d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2135
Reviewed-by: https://github.com/kalenikaliaksandr ✅
9 changed files with 65 additions and 12 deletions
|
@ -250,9 +250,10 @@ void InlineFormattingContext::generate_line_boxes()
|
|||
line_boxes.clear_with_capacity();
|
||||
|
||||
auto direction = m_context_box->computed_values().direction();
|
||||
auto writing_mode = m_context_box->computed_values().writing_mode();
|
||||
|
||||
InlineLevelIterator iterator(*this, m_state, containing_block(), m_containing_block_used_values, m_layout_mode);
|
||||
LineBuilder line_builder(*this, m_state, m_containing_block_used_values, direction);
|
||||
LineBuilder line_builder(*this, m_state, m_containing_block_used_values, direction, writing_mode);
|
||||
|
||||
// NOTE: When we ignore collapsible whitespace chunks at the start of a line,
|
||||
// we have to remember how much start margin that chunk had in the inline
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue