Open Bug 1856989 Opened 9 months ago Updated 7 months ago

Cross-process iframes are not clicked properly

Categories

(Remote Protocol :: Marionette, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: canadahonk, Unassigned)

References

(Depends on 1 open bug, Blocks 2 open bugs)

Details

(Whiteboard: [webdriver:backlog])

When using Fission, cross-process iframes do not emit any event inside or appear to do anything when clicked by webdriver.

This was also discussed a bit on Matrix in #webdriver.

Olli, would there be a way for privileged code to wait for a click event for a cross-process iframe? Probably we need to handle that on the parent process, which should have access to both the parent frame and the affected one.

Flags: needinfo?(smaug)

Please note afaik flushing the event loop / waiting for a click is not the issue. A click event in the iframe's HTML is not received at all and doesn't trigger any JS event handlers.

Blocks: webdriver
Depends on: 1856688, 1851812
Priority: -- → P3
Whiteboard: [webdriver:backlog]

I don't understand what 'wait for a click event' means here.
Click event is created and dispatched in a single process, it doesn't cross process boundary.
I assume this is about some mousedown/up events and then something should happen, but I don't know what.

Flags: needinfo?(smaug)

The severity field is not set for this bug.
:whimboo, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(hskupin)

(In reply to Olli Pettay [:smaug][bugs@pettay.fi] from comment #3)

I don't understand what 'wait for a click event' means here.

this is actually a Selenium specific feature, which means that our WebDriver:ElementClick command waits for a possible navigation and if that is detected that the target page has finished loading, before sending the response to the WebDriver client.

Click event is created and dispatched in a single process, it doesn't cross process boundary.
I assume this is about some mousedown/up events and then something should happen, but I don't know what.

We have event listeners for unload (window) and click (element) via the parent process and mozSystemGroup set:
https://searchfox.org/mozilla-central/rev/42acdc9cd5ae89222bdceeeaed7bacac755be48f/remote/marionette/interaction.sys.mjs#442-469

This usually works when clicking elements in top-level browsing contexts, but the above scenario seems to fail.

Oliver, do you have a small testcase that exercises this issue and you could attach?

Severity: -- → S3
Flags: needinfo?(hskupin) → needinfo?(omedhurst)

I don't have a small testcase yet, but for now the issue was with this WPT:
html/user-activation/propagation-same-and-cross-origin.sub.html

So it should most likely require the async event dispatching from the parent process including hit testing so that the event is forwarded to the correct browsing context. As such lets block bug 1773393 for that.

No longer depends on: 1851812
Flags: needinfo?(omedhurst)

This might actually be similar or the same as bug 1867810. For now I will keep it open.

See Also: → 1867810
You need to log in before you can comment on or make changes to this bug.