Closed Bug 1829021 Opened 2 years ago Closed 2 years ago

Investigate intermittent failures of helper_hittest_iframe_perspective.html and helper_hittest_iframe_perspective-3.html on Windows 11

Categories

(Core :: Panning and Zooming, task, P3)

task

Tracking

()

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: botond, Assigned: botond)

References

Details

Attachments

(2 files)

See bug 1776972 comment 69 and comment bug 1829010 for context.

Blocks: 1776972

I've been investigating the failure of helper_iframe_perspective-3.html in particular, using Try pushes with added logging.

My investigation so far suggests that there is a race between the BrowserParent for the OOP iframe receiving information about the transform it should apply to the coordinates of events targeting the iframe, and receiving one such event (the mousedown whose coordinates the test checks).

I think I've arrived at a diagnosis here.

Informing the BrowserParent about enclosing transforms is triggered by APZ receiving a hit-testing tree update that includes those transforms, which happens as a result of a paint. The waitUntilApzStable() operation performed a the beginning of the subtest does include a promiseAllPaintsDone() which triggers a paint of the subtest root document (including the transforms in question).

However, when this paint reaches APZ, the OOP iframe process's layer tree has not yet been sent to the compositor. So, even though the transforms are present in the compositor layer tree, the remote layer subtree to which they would apply isn't present, so we never enter this branch of SendSubtreeTransformsToChromeMainThread() to compute the transform for the iframe's BrowserParent.

The iframe's layer tree does eventually get painted and the transform eventually gets sent to the BrowserParent, but as mentioned this eventual message races with the event which is supposed to be transformed.

I will try to address this by performing a forceLayerTreeToCompositor() in the iframe's process before sending the event.

(In reply to Botond Ballo [:botond] from comment #2)

I will try to address this by performing a forceLayerTreeToCompositor() in the iframe's process before sending the event.

Looks promising based on this Try push (the failures there are existing intermittents in different subtests).

The race is between the OOP iframe's layer tree being sent to the compositor
(which is a prerequisite for APZ informing the iframe's BrowserParent about
the enclosing transform), and the event synthesized by the test.

The race is resolved by using forceLayerTreeToCompositor in the iframe's
process before sending the event.

Pushed by bballo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c7d38dea535b Fix a race condition in the helper_hittest_iframe_perspective* tests. r=hiro https://hg.mozilla.org/integration/autoland/rev/191dff3efb62 Re-enable test_group_hittest-3.html on Windows 11. r=hiro
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: