mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01: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
|
@ -32,6 +32,7 @@ use style::values::generics::font::LineHeight;
|
|||
use style_traits::{ParsingMode, ToCss};
|
||||
|
||||
use crate::fragment_tree::{BoxFragment, Fragment, FragmentFlags, FragmentTree, Tag};
|
||||
use crate::style_ext::ComputedValuesExt;
|
||||
|
||||
pub fn process_content_box_request(
|
||||
requested_node: OpaqueNode,
|
||||
|
@ -135,7 +136,7 @@ pub fn process_resolved_style_request<'dom>(
|
|||
return style.computed_value_to_string(PropertyDeclarationId::Custom(name));
|
||||
},
|
||||
}
|
||||
.to_physical(style.writing_mode);
|
||||
.to_physical(style.effective_writing_mode());
|
||||
|
||||
let computed_style =
|
||||
|| style.computed_value_to_string(PropertyDeclarationId::Longhand(longhand_id));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue