Closed Bug 1742107 Opened 3 years ago Closed 2 years ago

Can't click on buttons of paused overlay in an iframe when EFT is enabled and Fission is disabled

Categories

(DevTools :: Debugger, defect)

defect

Tracking

(Fission Milestone:Future, firefox-esr91 wontfix, firefox94 wontfix, firefox95 wontfix, firefox96 fixed)

RESOLVED FIXED
96 Branch
Fission Milestone Future
Tracking Status
firefox-esr91 --- wontfix
firefox94 --- wontfix
firefox95 --- wontfix
firefox96 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

Steps to reproduce

  1. With EFT enabled and Fission disabled
  2. Open a tab with data:text/html,<meta charset=utf8><h1>Top</h1><iframe src="data:text/html,<script>document.addEventListener(click, () => { debugger; })</script><h2>Iframe</iframe>"></iframe>
  3. Open devtools
  4. Click on the Iframe text
  5. The paused overlay should be shown, inside the iframe
  6. Click on the ▶️ button to resume

Expected results

The debugger resumes and the overlay is hidden

Actual results

Nothing happens


The handleEvent method of PausedDebuggerOverlay is not called, but it should.
Looking in C++ code, I found out that the setSuppressedEventListener (https://searchfox.org/mozilla-central/rev/0f3e259c24e52932387318ac503bfad3c82baa44/devtools/server/actors/highlighters/paused-debugger.js#239) we use to get the mouse events while the document is paused doesn't seem to have any effect.
The event should be dispatched from https://searchfox.org/mozilla-central/rev/0f3e259c24e52932387318ac503bfad3c82baa44/layout/base/PresShell.cpp#7704 , but it is blocked at an early line (https://searchfox.org/mozilla-central/rev/0f3e259c24e52932387318ac503bfad3c82baa44/layout/base/PresShell.cpp#7656-7660)
And indeed, if in the highlighter show method I add this.env.window.windowUtils.suppressEventHandling(true); , I do receive the mouse events, and I can resume the page, and hide the overlay.

suppressEventHandling(true) is supposed to be called from https://searchfox.org/mozilla-central/rev/0f3e259c24e52932387318ac503bfad3c82baa44/devtools/server/actors/utils/event-loop.js#191 , but it's not

We're actively filtering out same origin iframes in getAllWindowDebuggees (https://searchfox.org/mozilla-central/rev/0f3e259c24e52932387318ac503bfad3c82baa44/devtools/server/actors/utils/event-loop.js#169-171), so with EFT, we don't get the window, and never call suppressEventHandling on it.

This was causing some issues with PausedDebuggerOverlay with EFT:
As we weren't returning the window to preEnter, we weren't calling
suppressEventHandling on it, which in the end made the call we
have in the overlay to setSuppressedEventListener inoperant.
This wasn't caught by the browser_dbg-paused-overlay-iframe.js test
we have as the method we use to simulate clicking on the button
(highlighterTestFront.clickPausedDebuggerOverlayButton), ends ups calling
the handleEvent method of the highlighter actor directly, bypassing the
regular flow of events in a paused page.

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/31fca3976f3b
[devtools] Don't ignore same-origin iframe in EventLoop#getAllDebuggees. r=bomsy.
Fission Milestone: --- → Future
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch

Setting status-firefox95=wontfix. I assume we don't need to uplift this fix to Beta 95 because EFT is only enabled in Nightly

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: