Bug 1798485 - Add support for the `contentvisibilityautostatechange` event r=emilio
commit97f351c1d417cff32d616b7d8b22e80d23a88190
authorMartin Robinson <mrobinson@igalia.com>
Mon, 19 Dec 2022 11:01:24 +0000 (19 11:01 +0000)
committerMartin Robinson <mrobinson@igalia.com>
Mon, 19 Dec 2022 11:01:24 +0000 (19 11:01 +0000)
tree7ca92290464bb1c710dc970bcb20e7d6f321d47e
parent812f4325ffa8d1bd270be8326f9852c62de70966
Bug 1798485 - Add support for the `contentvisibilityautostatechange` event r=emilio

Add support for the contentvisibilityautostatechange and fire it when
the relevancy of `content-visibility: auto` elements change.

This commit also makes some changes to the
content-visibility-auto-state-changed.html test. Two more subtests are
added which verifies that an event is sent after `content-visibility:
auto` is applied to an element. Finally the `top` element is renamed to
`upper` as `top` can also refer to the top-level Window and it seems
that Gecko has a different precedence when accessing variables in
script.

Differential Revision: https://phabricator.services.mozilla.com/D161140
dom/webidl/ContentVisibilityAutoStateChangeEvent.webidl [new file with mode: 0644]
dom/webidl/moz.build
layout/generic/nsIFrame.cpp
testing/web-platform/meta/css/css-contain/content-visibility/content-visibility-auto-state-changed.html.ini [deleted file]
testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-auto-state-changed.html