Closed Bug 1823359 Opened 1 year ago Closed 1 year ago

Implement beforetoggle event for popover

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: zsun, Assigned: zsun)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

https://html.spec.whatwg.org/multipage/popover.html#the-popover-attribute

showPopover() method steps and hidePopover() method steps involve firing an event named beforetoggle. This is to add beforetoggle event implementation.

Blocks: popover
Assignee: nobody → zsun
Pushed by surkov.alexander@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/d567ffebf337
Implement beforetoggle event for popover. r=emilio,smaug

Backed out for causing failures on popover-light-dismiss.html

[task 2023-03-22T16:04:15.137Z] 16:04:15     INFO - TEST-START | /html/semantics/popovers/popover-light-dismiss.html
[task 2023-03-22T16:04:15.141Z] 16:04:15     INFO - Closing window cba711c2-0339-4cc5-afa6-827e62f0c61a
[task 2023-03-22T16:04:15.350Z] 16:04:15     INFO - PID 21921 | JavaScript error: http://web-platform.test:8000/html/semantics/popovers/popover-light-dismiss.html, line 344: TypeError: can't access property "querySelector", document.querySelector(...).shadowRoot is null
[.....................]
[task 2023-03-22T16:04:16.189Z] 16:04:16     INFO - TEST-FAIL | /html/semantics/popovers/popover-light-dismiss.html | Clicking inside a parent popover should close child popover - promise_test: Unhandled rejection with value: object "InvalidStateError: HTMLElement.showPopover: Element has unexpected visibility state"
[task 2023-03-22T16:04:16.189Z] 16:04:16     INFO - TEST-PASS | /html/semantics/popovers/popover-light-dismiss.html | Clicking on invoking element, after using it for activation, shouldn't close its popover 
[task 2023-03-22T16:04:16.189Z] 16:04:16     INFO - TEST-FAIL | /html/semantics/popovers/popover-light-dismiss.html | Clicking on invoking element, after using it for activation, shouldn't close its popover (nested case) - assert_true: button2 should activate popover2 expected true got false
[task 2023-03-22T16:04:16.189Z] 16:04:16     INFO - @http://web-platform.test:8000/html/semantics/popovers/popover-light-dismiss.html:195:16
[task 2023-03-22T16:04:16.189Z] 16:04:16     INFO - TEST-FAIL | /html/semantics/popovers/popover-light-dismiss.html | Clicking on invoking element, after using it for activation, shouldn't close its popover (nested case, not used for invocation) - promise_test: Unhandled rejection with value: object "InvalidStateError: HTMLElement.showPopover: Element has unexpected visibility state"
[task 2023-03-22T16:04:16.189Z] 16:04:16     INFO - TEST-FAIL | /html/semantics/popovers/popover-light-dismiss.html | Clicking on invoking element, even if it wasn't used for activation, shouldn't close its popover - promise_test: Unhandled rejection with value: object "InvalidStateError: HTMLElement.showPopover: Element has unexpected visibility state"
[task 2023-03-22T16:04:16.189Z] 16:04:16     INFO - TEST-FAIL | /html/semantics/popovers/popover-light-dismiss.html | Clicking on popovertarget element, even if it wasn't used for activation, should hide it exactly once - promise_test: Unhandled rejection with value: object "InvalidStateError: HTMLElement.showPopover: Element has unexpected visibility state"
[task 2023-03-22T16:04:16.189Z] 16:04:16     INFO - TEST-FAIL | /html/semantics/popovers/popover-light-dismiss.html | Clicking on anchor element (that isn't an invoking element) shouldn't prevent its popover from being closed - promise_test: Unhandled rejection with value: object "InvalidStateError: HTMLElement.showPopover: Element has unexpected visibility state"
[task 2023-03-22T16:04:16.189Z] 16:04:16     INFO - TEST-FAIL | /html/semantics/popovers/popover-light-dismiss.html | Dragging from an open popover outside an open popover should leave the popover open - promise_test: Unhandled rejection with value: object "InvalidStateError: HTMLElement.showPopover: Element has unexpected visibility state"
[task 2023-03-22T16:04:16.189Z] 16:04:16     INFO - TEST-FAIL | /html/semantics/popovers/popover-light-dismiss.html | A popover inside an invoking element doesn't participate in that invoker's ancestor chain - assert_true: invoking element should open popover expected true got false
[task 2023-03-22T16:04:16.190Z] 16:04:16     INFO - @http://web-platform.test:8000/html/semantics/popovers/popover-light-dismiss.html:287:16
[task 2023-03-22T16:04:16.190Z] 16:04:16     INFO - TEST-FAIL | /html/semantics/popovers/popover-light-dismiss.html | An invoking element that was not used to invoke the popover can still be part of the ancestor chain - assert_false: expected false got true
[task 2023-03-22T16:04:16.190Z] 16:04:16     INFO - @http://web-platform.test:8000/html/semantics/popovers/popover-light-dismiss.html:303:17
[task 2023-03-22T16:04:16.190Z] 16:04:16     INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:2595:25
[task 2023-03-22T16:04:16.190Z] 16:04:16     INFO - promise_test/tests.promise_tests</<@http://web-platform.test:8000/resources/testharness.js:733:36
[task 2023-03-22T16:04:16.190Z] 16:04:16     INFO - promise_test/tests.promise_tests<@http://web-platform.test:8000/resources/testharness.js:732:20
[task 2023-03-22T16:04:16.190Z] 16:04:16     INFO - TEST-UNEXPECTED-FAIL | /html/semantics/popovers/popover-light-dismiss.html | Scrolling within a popover should not close the popover - assert_equals: popover6 should be scrolled expected 50 but got 0
[task 2023-03-22T16:04:16.190Z] 16:04:16     INFO - @http://web-platform.test:8000/html/semantics/popovers/popover-light-dismiss.html:329:18
[task 2023-03-22T16:04:16.192Z] 16:04:16     INFO - ....
[task 2023-03-22T16:04:16.194Z] 16:04:16     INFO - TEST-ERROR | /html/semantics/popovers/popover-light-dismiss.html | took 1035ms
Flags: needinfo?(zsun)
Pushed by surkov.alexander@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/adc083051939
Implement beforetoggle event for popover. r=emilio,smaug

Backed out for causing wpt failures on popover-light-dismiss.html

Backout link

Push with failures

Failure log

Blocks: 1824350
Pushed by surkov.alexander@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/241d9f6e2457
Implement beforetoggle event for popover. r=emilio,smaug

Backed out for causing wpt failures on popover-light-dismiss.html.

Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/aca1d149ba85
Implement beforetoggle event for popover. r=emilio,smaug
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
Regressions: 1824565
No longer regressions: 1824565
Flags: needinfo?(zsun)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: