Bug
1829660: pass `true` for `aFireEvents` and defer hiding the popover and updating the popover states. r=emilio
Pass `true` for `aFireEvents` to match the spec.
Defer hiding the popover because it may run script, which is forbidden,
because `SetAttrAndNotify` runs with a script blocker
(`mozAutoDocUpdate`).
Updated test expectations:
The assertion count increased because
<https://searchfox.org/mozilla-central/rev/
4e6970cd336f1b642c0be6c9b697b4db5f7b6aeb/dom/base/Document.cpp#14948-14949>
is violated more often, which was violated before. No new
`NS_ASSERTION`s are violated.
"[Changing a popover from auto to manual (via attr), and then auto during 'beforetoggle' works]
expected: FAIL" still fails because
<https://searchfox.org/mozilla-central/rev/
4e6970cd336f1b642c0be6c9b697b4db5f7b6aeb/testing/web-platform/tests/html/semantics/popovers/popover-attribute-basic.html#334>
is violated, which is unrelated to this change.
Other instances of
<https://searchfox.org/mozilla-central/rev/
4e6970cd336f1b642c0be6c9b697b4db5f7b6aeb/testing/web-platform/tests/html/semantics/popovers/popover-attribute-basic.html#339>
still fail too, but the general mechanism of firing events seems to
work. Therefore it seems reasonable to investigate the remaining
failures in bug
1816851.
Differential Revision: https://phabricator.services.mozilla.com/
D176660