commit | e921f8b336061ae8e6d2af3995f2fc4e691ad9f0 | [log] [tgz] |
---|---|---|
author | Alison Maher <almaher@microsoft.com> | Wed Apr 28 21:59:50 2021 |
committer | Blink WPT Bot <blink-w3c-test-autoroller@chromium.org> | Wed Apr 28 22:23:08 2021 |
tree | add495f718c7c75fbd433997fd2cdedcd2401540 | |
parent | dacc75fcce6a1a828d65ceb66ce2124312f19f84 [diff] |
[LayoutNG] Relative offset for fragmented OOF elements There were a couple of issues with how relative positioning was being applied for OOF elements during fragmentation: 1. The relative inline inset was not being applied to the OOF descendants. 2. The relative block inset was being applied, but it was being applied before fragmentation, which is not correct. The reason that the relative inline inset was not being applied was that we were only ever propagating the block offset of the containing block as OOF fragmentainer descendants were being propagated up the tree inside NGContainerFragmentBuilder::PropagateOOFPositionedInfo(). This was incorrect - both the inline and block offset of the containing block should be accumulated as the OOFs propagate up the tree. Because ancestor inline offsets are now applied as the OOF makes its way up the tree, a new issue was identified regarding CL:2836226. In CL:2836226, the fragmentainer offset was applied to the OOF offset in NGOutOfFlowLayoutPart before PropagateOOFPositionedInfo() was called. However, we only want to apply the fragmentainer offset for descendants whose containing block is outside the fragmentation context of the ancestor OOF element. To fix this, the fragmentainer offset is passed into PropagateOOFPositionedInfo() as a separate variable (offset_adjustment) to ensure that this offset is only applied in the correct scenarios. The relative block inset was being applied before fragmentation because the relative ancestor's offset included its insets by the time the OOF element was laid out. To fix this, pass the relative ancestor's un-adjusted offset and relative offset into NGContainerFragmentBuilder:: PropagateChildData()/PropagateOOFPositionedInfo() to ensure that we don't apply the relative offset too early in this case. To ensure the relative offset is applied after fragmentation of an OOF descendant, an additional variable was added to the NGContainingBlock struct stored in NGOutOfFlowPositionedNode for the accumulated relative_offset of the containing block. This is then applied after the OOF descendant is laid out and fragmented. Note: This CL does not handle the case of an inline containing block with relative insets. This will be investigated as a follow-up given that inline CBs have not been addressed in general for fragmented OOF elements. Bug: 1142387,1158756,1158387 Change-Id: I1ac3920234497459e68d5418b992791f8b50badb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2851595 Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Commit-Queue: Alison Maher <almaher@microsoft.com> Cr-Commit-Position: refs/heads/master@{#877243}
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:
#testing
on irc.w3.org; includes participants located around the world, but busiest during the European working day; all discussion is archived hereIf 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 http://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!