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 upImplement `visibility: hidden` in Layout 2020 #26841
Comments
|
Hi! If you have any questions regarding this issue, feel free to make a comment here, or ask it in the If you intend to work on this issue, then add |
In fact it should be enabled (and treated as In … and, new tests will likely pass, so expected results will need to be updated. See https://github.com/servo/servo/wiki/Layout-2020#web-platform-tests for running web-platform-tests locally, but this may take a long time as there are very many tests. It may be easier to submit a pull request and do a "try" run on CI servers. |
|
@highfive: assign me |
|
Hey @MDeiml! Thanks for your interest in working on this issue. It's now assigned to you! |
Implement visibility for layout_2020 <!-- Please describe your changes on the following line: --> Implement the 'visibility: hidden' (and 'visibility: collapse') css properties. --- <!-- 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 #26841 (GitHub issue number if applicable) <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Implement visibility for layout_2020 <!-- Please describe your changes on the following line: --> Implement the 'visibility: hidden' (and 'visibility: collapse') css properties. --- <!-- 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 #26841 (GitHub issue number if applicable) <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Implement visibility for layout_2020 <!-- Please describe your changes on the following line: --> Implement the 'visibility: hidden' (and 'visibility: collapse') css properties. --- <!-- 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 #26841 (GitHub issue number if applicable) <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Implement visibility for layout_2020 <!-- Please describe your changes on the following line: --> Implement the 'visibility: hidden' (and 'visibility: collapse') css properties. --- <!-- 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 #26841 (GitHub issue number if applicable) <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Relevant spec: https://drafts.csswg.org/css2/visufx.html#propdef-visibility
Relevant code: https://github.com/servo/servo/blob/master/components/layout_2020/display_list/mod.rs
Changes needed: when generating display items for a
BoxFragmentorTextFragment, check the valuevisibilityproperty in itsstyleorparent_stylefield respectively:For non-visible fragments, skip emitting display items for backgrounds, borders, or text. Don’t inhibit rendering of descendant fragments: CSS inheritance already propagates the property to descendant elements, and they can override it to be visible again.
See https://github.com/servo/servo/wiki/Layout-2020#using for building with Layout 2020 enabled, to check that your changes compile.