Tests cannot be certain that they can get proper screen coordinates
Categories
(Core :: DOM: UI Events & Focus Handling, task, P1)
Tracking
()
People
(Reporter: handyman, Assigned: handyman)
References
Details
Attachments
(2 files)
|
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
Generally, the DOM cannot be certain it receives correct screen coordinates. privacy.resistFingerprinting, for example, aligns screen and client coordinates. Additionally, content processes asynchronously get the PBrowser::ChildToParentMatrix and tests will sometimes get bad screen coordinates until the message response is processed -- see bug 1764560.
This design is fine for the browser -- it just looks to JS like the user moved the browser when the message arrived. We could have chosen to have content wait for the transformation before sending screen coordinates but this interpretation of the data suggests we don't need to pay for that delay.
It does pose a problem for (content) tests though. There is no decent way to detect the update with certainty. So we should add a SpecialPowers function to let us know when we can count on that data being valid.
We can reinstate test_bug418986-3.html for Windows-e10s once we have that.
| Assignee | ||
Comment 1•4 years ago
|
||
Content processes can provide screen coordinates in e.g. window objects and events without waiting for the proper client-to-screen transforms to be given to them from the parent process. This poses a problem for tests that want to check the screen coordinates, so we add SpecialPowers.ContentTransformsReceived() to allow content processes to wait for these transforms.
| Assignee | ||
Comment 2•4 years ago
|
||
Depends on D144742
Comment 4•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/112793c3b6d7
https://hg.mozilla.org/mozilla-central/rev/172227c66f57
Comment 5•4 years ago
|
||
Comment on attachment 9273901 [details]
Bug 1766082: Allow content to wait for parent screen transforms r=emilio!
Beta/Release Uplift Approval Request
- User impact if declined: None (test-only)
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: none
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Test-only code, needed to avoid some intermittents that bug 1767165 would cause otherwise.
- String changes made/needed: none
- Is Android affected?: No
Comment 6•4 years ago
|
||
Comment on attachment 9273901 [details]
Bug 1766082: Allow content to wait for parent screen transforms r=emilio!
Approved for 101.0b3.
Comment 7•4 years ago
|
||
| bugherder uplift | ||
https://hg.mozilla.org/releases/mozilla-beta/rev/794c7311a546
https://hg.mozilla.org/releases/mozilla-beta/rev/21af293c98c1
Description
•