commit | 0b8c8ceda78d3134ada3da1fc3d203988b962ee8 | [log] [tgz] |
---|---|---|
author | L. David Baron <dbaron@chromium.org> | Fri Mar 24 22:25:55 2023 |
committer | Blink WPT Bot <blink-w3c-test-autoroller@chromium.org> | Fri Mar 24 22:43:52 2023 |
tree | f88ceec0d606f70f535878c4e76683a37920284f | |
parent | 52138ad6a21cc6be6d111c1a3258320d548ec832 [diff] |
Improve interaction of pointer-events with scroll gesture hit testing, scrollability decisions, and overlay scrollbars * First, this change stops considering pointer-events when deciding whether a paint layer is scrollable. This avoids pointer-events having strange effects on decisions about whether to show overlay scrollbars. These strange effects include the backdrop of a <dialog> causing the things behind it to become inert (and thus have pointer-events: none) and cause overlay scrollbars to spontaneously appear. This is done by changing a test of ComputedStyle::VisibleToHitTesting() to test only ComputedStyle::Visibility(), which is one of the two parts of VisibleToHitTesting(). This test dates back to https://chromium.googlesource.com/chromium/src/+/9de09a320e201ea651b23587850050a67654271f%5E%21/ and I don't think the pointer-events part of the test makes sense. (I'm somewhat suspicious of the visibility part of the test as well, although the authors of the tests at web_tests/fast/scrolling/scrollable-area-{frame{,-scrolling-no}-visibility-hidden-child,overflow-auto-visibility-hidden{,-in-parent}}.html believed in that part at least enough to write 4 tests for it.) It doesn't seem to me that pointer-events (or, really, visibility) should affect the result of ScrollsOverflow since it doesn't affect whether something can be scrolled programmatically (or, for pointer-events, via the keyboard). Additionally, this CL then undoes the effect that the above change would have on decisions about implicit promotion to the root scroller. On Mac (but not Linux), the two added tests show the bug without this change, when run in virtual/overlay-scrollbar/, but are fixed by this change. * Second, in order to both fix regressions from the above change and fix existing bugs that exist prior to it, this change changes how gesture scrolls are targeted when some but not all elements have pointer-events: none, so that gesture scrolls are reliably hit tested based on the pointer-events values of the elements involved. In particular, it forces a scrollable region that is not visible to hit testing to use the main thread hit testing codepath (since it may have arbitrary descendants, scrollable or not, that are visible to hit testing). It also adjusts the hit testing of scrollbars themselves to match. This is needed to avoid regressing external/wpt/pointerevents/pointerevent_hit_test_scroll.html on Mac only, and to avoid pointerevent_hit_test_scroll_visible_descendant.html starting to fail again (after being fixed by the first part) on Linux and Windows. (I don't fully understand why the regression in pointerevent_hit_test_scroll.html is Mac-only, but I know that on Linux, UpdateNonFastScrollableRegion fails to bail out early in some cases where on Mac it does bail out early because layer.element_id() == scroll_element_id; in these cases, on Linux, layer.element_id() is 0 while scroll_element_id is not zero.) * Third, this change also makes virtual/overlay-scrollbar/ and virtual/non-overlay-scrollbar/ never expire, because they test something that varies based on OS and settings rather than a feature being rolled out (e.g., virtual/overlay-scrollbar/ matches the default behavior on a Mac, whereas running outside that virtual suite does not), and renames the README.txt to README.md to satisfy https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/tools/blinkpy/web_tests/lint_test_expectations.py;l=345-348;drc=fdd1781f121a555a8f4b771b970147e1a7ec4876 Fixed: 1414142 Change-Id: Ic26cfb933948bca55e4042ed360ed07692d14a0e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4237636 Commit-Queue: David Baron <dbaron@chromium.org> Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by: Steve Kobes <skobes@chromium.org> Cr-Commit-Position: refs/heads/main@{#1121965}
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!