diff options
author | Matt Brubeck <mbrubeck@limpet.net> | 2015-02-24 16:43:43 -0800 |
---|---|---|
committer | Matt Brubeck <mbrubeck@limpet.net> | 2015-03-09 14:21:26 -0700 |
commit | 8221bfc3ef854d90ecb9a0df3aa490310cbe8469 (patch) | |
tree | dd17d192a5944fafad6875addbd21fc2941360d2 /components/layout/flow.rs | |
parent | 7cd776b74f7996894965deb8700adb6ef46d705d (diff) | |
download | servo-8221bfc3ef854d90ecb9a0df3aa490310cbe8469.tar.gz servo-8221bfc3ef854d90ecb9a0df3aa490310cbe8469.zip |
Layout fixes for RTL child flows in LTR parents
...and vice-versa. This is not a complete fix for all mixed-direction layout
cases, but it fixes enough problems to make some simple test cases pass, like
tha attached reftest.
There are FIXME comments for many of the remaining issues. In particular,
this does not yet handle RTL layout of fixed/absolute elements.
Diffstat (limited to 'components/layout/flow.rs')
-rw-r--r-- | components/layout/flow.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/components/layout/flow.rs b/components/layout/flow.rs index 90cdc8a8030..0633ee43b7d 100644 --- a/components/layout/flow.rs +++ b/components/layout/flow.rs @@ -758,6 +758,13 @@ pub struct BaseFlow { /// automatic values for `width`. pub block_container_inline_size: Au, + /// The writing mode of the block container of this flow. + /// + /// FIXME (mbrubeck): Combine this and block_container_inline_size and maybe + /// block_container_explicit_block_size into a struct, to guarantee they are set at the same + /// time? Or just store a link to the containing block flow. + pub block_container_writing_mode: WritingMode, + /// The block-size of the block container of this flow, if it is an explicit size (does not /// depend on content heights). Used for computing percentage values for `height`. pub block_container_explicit_block_size: Option<Au>, @@ -924,6 +931,7 @@ impl BaseFlow { absolute_static_i_offset: Au(0), fixed_static_i_offset: Au(0), block_container_inline_size: Au(0), + block_container_writing_mode: writing_mode, block_container_explicit_block_size: None, absolute_cb: ContainingBlockLink::new(), display_list_building_result: DisplayListBuildingResult::None, |