Bug 1726485 [wpt PR 30083] - content-visibility: Avoid updating style in hidden subtr...
commit84f784eb5f9f7c9f4842718b3921826dd2c556e4
authorVladimir Levin <vmpstr@chromium.org>
Wed, 1 Sep 2021 14:00:50 +0000 (1 14:00 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Thu, 2 Sep 2021 10:29:42 +0000 (2 10:29 +0000)
treeb5dfa49a171d4cb56f7e0aa8ad74f0df3851bcfa
parente33c107ed979a779f727403923567875900658e0
Bug 1726485 [wpt PR 30083] - content-visibility: Avoid updating style in hidden subtrees for focus., a=testonly

Automatic update from web-platform-tests
content-visibility: Avoid updating style in hidden subtrees for focus.

This patch ensures that we first check whether the element is in a
hidden subtree that prevents focus activation before forcing a style
and layout tree update.

This means that we can now set a content-visibility: hidden on a
container which has a currently focused element and it will clear
that focused element _without_ first updating style and layout
tree in the subtree (due to a check whether the currently focused
element is focusable).

R=chrishtr@chromium.org, futhark@chromium.org

Change-Id: I95a69fa3e89fe317825edcfd5e73bdde58d18cd8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3104325
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#913459}

--

wpt-commits: d97a9fc1e67d00eb5a2725f661df203395dd9ccb
wpt-pr: 30083
testing/web-platform/tests/css/css-contain/content-visibility/container-focus-ref.html [new file with mode: 0644]
testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-055.html
testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-082.html [new file with mode: 0644]