mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 09:39:39 +00:00
LibWeb: Layout text chunks based on their Unicode direction
Append text chunks to either the start or end of the text fragment, depending on the text direction. The direction is determined by what script its code points are from.
This commit is contained in:
parent
2f5b070716
commit
11e7d72686
Notes:
github-actions[bot]
2024-08-31 09:50:41 +00:00
Author: https://github.com/BenJilks
Commit: 11e7d72686
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1133
Reviewed-by: https://github.com/diegoiast
18 changed files with 460 additions and 150 deletions
|
@ -249,8 +249,10 @@ void InlineFormattingContext::generate_line_boxes(LayoutMode layout_mode)
|
|||
auto& line_boxes = m_containing_block_used_values.line_boxes;
|
||||
line_boxes.clear_with_capacity();
|
||||
|
||||
auto direction = m_context_box->computed_values().direction();
|
||||
|
||||
InlineLevelIterator iterator(*this, m_state, containing_block(), m_containing_block_used_values, layout_mode);
|
||||
LineBuilder line_builder(*this, m_state, m_containing_block_used_values);
|
||||
LineBuilder line_builder(*this, m_state, m_containing_block_used_values, direction);
|
||||
|
||||
// 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