commit | dd695beae0f59651ccbbb26b9c6f73476d643cfe | [log] [tgz] |
---|---|---|
author | Alison Maher <almaher@microsoft.com> | Mon Aug 02 18:28:10 2021 |
committer | Blink WPT Bot <blink-w3c-test-autoroller@chromium.org> | Mon Aug 02 18:56:50 2021 |
tree | 2725f8c1f596e64306004aea8ed24ea9c0d3c2c3 | |
parent | ece9dc6a4c9c5f731c94e342722b71775e725a4b [diff] |
[LayoutNG] OOF with inline CB relative offset This CL started off as a follow-up to CL:2995308. CL:2995308 had added support for handling relative offsets for inline containing blocks when inside a multicol, such that the relative offset is applied to the OOF descendants after fragmentation has taken place. There was a concern around writing mode conversions, so in attempt to find any problems, I updated the tests added in CL:3025848 to apply a relative offset to inline CBs in various writing mode scenarios. No problems were discovered with the property added in CL:2995308, but a more general bug was discovered, unrelated to fragmentation. The bug that this CL addresses is specific to when a relative offset is applied to an inline CB when the writing mode is vertical-lr. The problem appeared to be with the fact that ComputeRelativeOffsetForInline() reverses the offset direction in vertical-lr. This offset is then added to the static position of the OOF descendant, resulting in the OOF shifting in the opposite direction than expected. To fix this, remove any relative offsets from the OOF inline ancestors when calling PropagateChildData() to avoid the incorrect relative offset being added to the static position. Instead, a new method was added, called ComputeRelativeOffsetForOOFInInline(), that will calculate the relative offset to use when applying to an OOF descendant. An accumulated relative offset for OOFs is now calculated in NGInlineLayoutStateStack::ApplyRelativePositioning() using ComputeRelativeOffsetForOOFInInline(). This accumulated offset is then applied to the OOF descendant's static position when it is first discovered. It is also applied to the inline relative_offset stored in OutOfFlowPositionedNode when the OOF's inline_container is discovered (so it can be applied after fragmentation has taken place). Note: ComputeRelativeOffsetForOOFInInline() still reverses the writing mode in the case of RTL. I'm not sure why the reversal is expected in one case and not the other, so I'm open to ideas on why this might be or if there may be a better approach to addressing this bug. The various writing mode tests for OOFs, both with and without a multicol, were updated to add a relative offset to the inline CBs since this bug appeared in both cases. Bug: 1231279 Change-Id: I40038524a70e6eb191790c988b24b476fee2d56e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3039319 Commit-Queue: Alison Maher <almaher@microsoft.com> Reviewed-by: Koji Ishii <kojii@chromium.org> Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#907620}
The web-platform-tests Project is a cross-browser test suite for the Web-platform stack. Writing tests in a way that allows them to be run in all browsers gives browser projects confidence that they are shipping software that is compatible with other implementations, and that later implementations will be compatible with their implementations. This in turn gives Web authors/developers confidence that they can actually rely on the Web platform to deliver on the promise of working across browsers and devices without needing extra layers of abstraction to paper over the gaps left by specification editors and implementors.
The most important sources of information and activity are:
wpt:matrix.org
matrix channel; includes participants located around the world, but busiest during the European working day.If you'd like clarification about anything, don't hesitate to ask in the chat room or on the mailing list.
Clone or otherwise get https://github.com/web-platform-tests/wpt.
Note: because of the frequent creation and deletion of branches in this repo, it is recommended to “prune” stale branches when fetching updates, i.e. use git pull --prune
(or git fetch -p && git merge
).
See the documentation website and in particular the system setup for running tests locally.
The wpt
command provides a frontend to a variety of tools for working with and running web-platform-tests. Some of the most useful commands are:
wpt serve
- For starting the wpt http serverwpt run
- For running tests in a browserwpt lint
- For running the lint against all testswpt manifest
- For updating or generating a MANIFEST.json
test manifestwpt install
- For installing the latest release of a browser or webdriver server on the local machine.wpt serve-wave
- For starting the wpt http server and the WAVE test runner. For more details on how to use the WAVE test runner see the documentation.On Windows wpt
commands must be prefixed with python
or the path to the python binary (if python
is not in your %PATH%
).
python wpt [command]
Alternatively, you may also use Bash on Ubuntu on Windows in the Windows 10 Anniversary Update build, then access your windows partition from there to launch wpt
commands.
Please make sure git and your text editor do not automatically convert line endings, as it will cause lint errors. For git, please set git config core.autocrlf false
in your working tree.
The master branch is automatically synced to wpt.live and w3c-test.org.
Pull requests are automatically mirrored except those that modify sensitive resources (such as .py
). The latter require someone with merge access to comment with “LGTM” or “w3c-test:mirror” to indicate the pull request has been checked.
Save the Web, Write Some Tests!
Absolutely everyone is welcome to contribute to test development. No test is too small or too simple, especially if it corresponds to something for which you've noted an interoperability bug in a browser.
The way to contribute is just as usual:
git checkout -b topic
../wpt lint
as described above.If you spot an issue with a test and are not comfortable providing a pull request per above to fix it, please file a new issue. Thank you!