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:
Martin Robinson 2024-08-16 13:38:04 +02:00 committed by GitHub
parent 3d3621b652
commit 0d94a8acd2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 129 additions and 88 deletions

View file

@ -710,7 +710,7 @@ impl<'a> BuilderForBoxFragment<'a> {
painting_area_override: None,
positioning_area_override: Some(
positioning_area
.to_physical(self.fragment.style.writing_mode)
.to_physical(self.fragment.style.effective_writing_mode())
.translate(self.containing_block.origin.to_vector())
.to_webrender(),
),