commit | 50f932c6ba1dc3347d69c1c4a740a52dbd8ca32a | [log] [tgz] |
---|---|---|
author | David Bokan <bokan@chromium.org> | Fri Jan 05 19:22:11 2024 |
committer | Blink WPT Bot <blink-w3c-test-autoroller@chromium.org> | Fri Jan 05 19:42:38 2024 |
tree | 7cbf7b8e8abdf3c0cf9f8bcde32d2d760691dde0 | |
parent | 50c127ebc8a6f78bbc677aea6f154776503e23d6 [diff] |
view-transition: Fix RuleSet invalidation for VT pseudos The view-transition pseudo elements are manually style invalidated whenever the document element is [1]. This assumes that the document element will be invalidated whenever the view transition pseudo styles need to be recalculated. It seems this was often be the case but due to over-invalidation. https://crrev.com/c3afc7e99450 improved the style system to invalidate only when a matching selector's rules changed, rather than the whole stylesheet. As a consequence, changing a ::view-transition rule in a stylesheet no longer (incidentally) invalidates the document element so the changes aren't made visually. RuleSetChange based invalidation is applied by walking the Element tree[2] which doesn't include pseudo elements. Instead, a pseudo element selector should match its originating element which will cause its invalidation. Setting the `dynamic_pseudo` on the result will prevent the rule from being collected in [3]. The view transition pseudos were only matching when in the context of a pseudo element which prevented this invalidation. [1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/dom/node.cc;l=1307;drc=35cedca3b1ad347c2b576e1d8eed30102a625a31 [2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/css/style_engine.cc;l=2225;drc=36f47fc1f93ac985138ef4579fdead05ae19c9ed [3] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/css/element_rule_collector.cc;l=1178;drc=e5f8ff312fe542f39c7d34b4440f18d1500b15f9 Bug: 1508345 Change-Id: Ia92ecfb2fb5138920eda145f83b5367f9b9ce77d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5147306 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Reviewed-by: Dominic Farolino <dom@chromium.org> Commit-Queue: David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/main@{#1243529}
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.
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!