Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMake writing-mode affect computed display #16044
Conversation
highfive
commented
Mar 20, 2017
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @emilio (or someone else) soon. |
highfive
commented
Mar 20, 2017
highfive
commented
Mar 20, 2017
|
We need to add a test for this. Even if the rendering it's not the expected one, we can test this with |
| use computed_values::display::T as display; | ||
| 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); |
This comment has been minimized.
This comment has been minimized.
emilio
Mar 20, 2017
Member
nit: Indent this and the following line to the left, four spaces from the if.
| @@ -2115,6 +2115,14 @@ pub fn apply_declarations<'a, F, I>(device: &Device, | |||
| } | |||
|
|
|||
| { | |||
| use computed_values::display::T as display; | |||
| if context.layout_parent_style.writing_mode != style.writing_mode && | |||
This comment has been minimized.
This comment has been minimized.
emilio
Mar 20, 2017
Member
Let's add here:
- A quote and link to the spec.
- A link to Boris' www-style mail.
- (optionally) A link to the issue we're fixing to see the discussion.
|
r?@emilio |
|
Awesome, thank you for doing this! @bors-servo r+ |
|
|
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 -->
|
|
|
Was that test failure because of these changes @emilio ? |
|
@bors-servo: retry
|
|
|
|
|
|
@bors-servo: retry |
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 broke a bunch of Gecko tests, because it's examining the value of the "writing mode" as defined at https://drafts.csswg.org/css-writing-modes-3/#writing-mode whereas it should be examining the value of the writing-mode property as defined at https://drafts.csswg.org/css-writing-modes-3/#propdef-writing-mode As a simple example, this testcase: Emilio told me how to fix; I'll create a PR once I verify the fix actually does the right thing. |
|
But I don't have time today to figure out how to run servo reftests and in particular how to add new ones. We really need to figure out some way to share reftests with Gecko. :( |
|
#16123 merged. I really wish the CSS spec didn't have this naming confusion... |
|
For what it's worth, this commit made the following previously-failing Gecko tests pass: layout/reftests/css-display/display-contents-writing-mode-2.html , layout/reftests/writing-mode/1134849-orthogonal-inline.html, layout/reftests/writing-mode/1196887-1-computed-display-inline-block.html which is excellent. ;) |
bd339 commentedMar 20, 2017
•
edited by larsbergstrom
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.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is