-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autofocus: Change the timing of 'flush autofocus candidates' #19747
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already reviewed downstream.
d411527
to
fd5728c
Compare
Now it runs before "run the resize steps". The previous timing could cause an issue that the auto-focused element didn't have up-to-date appearance even though "update the rendering" was done. Fixes #4992. Tests: web-platform-tests/wpt#19747
* ScriptedAnimationController kicks Document::FlushAutofocusCandidates Now ScriptedAnimationController takes into account of existence of autofocus candidates. * Document::FlushAutofocusCandidates needs to call UpdateStyleAndLayoutTree() for each of candidates. IsFocusable() needs up-to-date style. UpdateStyleAndLayoutTree() was unnecessary because FlushAutofocusCandidates() was called after layout. Bug: 1015275 Change-Id: I06dcb9b3cd2564d35fba3f893e7ce4b8736c91bf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1863067 Commit-Queue: Kent Tamura <tkent@chromium.org> Reviewed-by: Mason Freed <masonfreed@chromium.org> Cr-Commit-Position: refs/heads/master@{#707201}
fd5728c
to
e5113fb
Compare
The following three tests are flaky on Chrome (logs): Unstable results
Reproducible locally via: |
Author pinged via https://chromium-review.googlesource.com/c/chromium/src/+/1863067 |
The flakiness should be resolved when Chrome is updated to a version including r707201. |
@foolip @Hexcles Can we admin merge this, since the flakiness is (hopefully) fixed in Chromium already (but we're blocked on M79 upgrades due to https://crbug.com/1014629), and it isn't flaky on other browsers? |
Confirmed only wpt-chrome-dev-stability is failing in Taskcluster, admin merging now. |
Now it runs before "run the resize steps". The previous timing could cause an issue that the auto-focused element didn't have up-to-date appearance even though "update the rendering" was done. Fixes #4992. Tests: web-platform-tests/wpt#19747
ScriptedAnimationController kicks Document::FlushAutofocusCandidates
Now ScriptedAnimationController takes into account of existence of
autofocus candidates.
Document::FlushAutofocusCandidates needs to call
UpdateStyleAndLayoutTree() for each of candidates.
IsFocusable() needs up-to-date style. UpdateStyleAndLayoutTree() was
unnecessary because FlushAutofocusCandidates() was called after
layout.
Bug: 1015275
Change-Id: I06dcb9b3cd2564d35fba3f893e7ce4b8736c91bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1863067
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Mason Freed <masonfreed@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707201}