mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #16044 - bd339:iss15754, r=emilio
Make writing-mode affect computed display <!-- Please describe your changes on the following line: --> The first manual test-case in #15754 passes now, but the second test-case still renders "Text" horizontally, which is apparently because of servo's experimental support for writing-mode. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #15754 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16044) <!-- Reviewable:end -->
This commit is contained in:
commit
0f2c71aa66
4 changed files with 46 additions and 0 deletions
|
@ -2169,6 +2169,21 @@ pub fn apply_declarations<'a, F, I>(device: &Device,
|
|||
}
|
||||
}
|
||||
|
||||
{
|
||||
use computed_values::display::T as display;
|
||||
// CSS writing modes spec (https://drafts.csswg.org/css-writing-modes-3/#block-flow):
|
||||
//
|
||||
// If a box has a different writing-mode value than its containing block:
|
||||
// - If the box has a specified display of inline, its display computes to inline-block. [CSS21]
|
||||
//
|
||||
// www-style mail regarding above spec: https://lists.w3.org/Archives/Public/www-style/2017Mar/0045.html
|
||||
// See https://github.com/servo/servo/issues/15754
|
||||
if context.layout_parent_style.writing_mode != style.writing_mode &&
|
||||
style.get_box().clone_display() == display::inline {
|
||||
style.mutate_box().set_display(display::inline_block);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
use computed_values::overflow_x::T as overflow;
|
||||
use computed_values::overflow_y;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue