mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
layout: Prepare for bidi by guarding all access to writing-mode
(#33082)
We want to selectively enable right-to-left writing modes per layout context. This change makes that possible by allowing access to `writing-mode` though an interface that always returns the default horizontal top-to-bottom (implicitly left-to-right) writing mode. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
This commit is contained in:
parent
3d3621b652
commit
0d94a8acd2
14 changed files with 129 additions and 88 deletions
|
@ -976,7 +976,8 @@ impl FloatBox {
|
|||
);
|
||||
children = replaced.contents.make_fragments(
|
||||
&replaced.style,
|
||||
content_size.to_physical_size(containing_block.style.writing_mode),
|
||||
content_size
|
||||
.to_physical_size(containing_block.effective_writing_mode()),
|
||||
)
|
||||
},
|
||||
};
|
||||
|
@ -986,7 +987,7 @@ impl FloatBox {
|
|||
size: content_size,
|
||||
};
|
||||
|
||||
let containing_block_writing_mode = containing_block.style.writing_mode;
|
||||
let containing_block_writing_mode = containing_block.effective_writing_mode();
|
||||
BoxFragment::new(
|
||||
self.contents.base_fragment_info(),
|
||||
style.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue