Stop directly accessing `window.top` from OOP iframes in apz_test_native_event_utils.js
Categories
(Core :: Panning and Zooming, defect, P2)
Tracking
()
People
(Reporter: hiro, Assigned: hiro)
References
Details
(Whiteboard: fission-soft-blocker)
Attachments
(4 files)
It won't works if it gets called from OOP iframes.
There are three places we need to handle;
The first one can simply use SpecialPowers.spawn(window.top)
, the rest of the two can't, for instance nested OOP iframes. The rest of the two needs to rewrite with nsIDOMWindowUtils.toScreenRect.
With these changes, most of apz mochitests pass, there are two failures, test_interrupt_reflow.html(bug 1724149) and test_layerization.html. I will file another bug for the latter test.
Here is a try run; https://treeherder.mozilla.org/jobs?repo=try&revision=a76b46aef44051b3ed36af3b9686ec68686d3bf3
Assignee | ||
Comment 1•3 years ago
|
||
A new try run; https://treeherder.mozilla.org/jobs?repo=try&revision=2d64ff84e6e650f05f33a6e919348d4ccfaba355
(I did forget changing a call site of getTargetRect
which was renamed to _getTargetRect
)
(In reply to Hiroyuki Ikezoe (:hiro) from comment #0)
With these changes, most of apz mochitests pass, there are two failures, test_interrupt_reflow.html(bug 1724149) and test_layerization.html. I will file another bug for the latter test.
Filed bug 1725541.
Assignee | ||
Comment 2•3 years ago
|
||
It's not used.
Assignee | ||
Comment 3•3 years ago
|
||
The test function in helper_touch_action_regions.html needs to run as a
generator function, which means it doesn't work with async/await manners, so
once after we make some utility functions as async, it won't work as expected.
To avoid it, getting the scroller position in the screen coords part needs to
be split out from the generator since the part will be async in the next commit,
and nsIDOMWindowUtils.sendNativeTouchPoint needs to be used directly instead of
using synthesizeNativeTouch since synthesizeNativeTouch will also be async.
Depends on D122557
Assignee | ||
Comment 4•3 years ago
|
||
Thus a bunch of relevant functions need to be async.
Depends on D122558
Assignee | ||
Comment 5•3 years ago
|
||
Depends on D122559
Comment 6•3 years ago
|
||
Tracking for Fission Milestone MVP
Comment 8•3 years ago
|
||
These patches seem to break running test_layerization.html locally for me on my mac (not fission, not xorigin, just plain). (I pulled them from autoland.) If these patches are applied test_layerization.html fails, if i remove these patches test_layerization.html passes.
I think the coordinate conversion is wrong. When it passes the mouse pointer gets moved over the various scrollable elements. When it fails the mouse cursor is over the browser chrome.
Assignee | ||
Comment 9•3 years ago
|
||
Thanks! Filed bug 1726638 for the issue.
Comment 10•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ad9eb55de057
https://hg.mozilla.org/mozilla-central/rev/65111930856d
https://hg.mozilla.org/mozilla-central/rev/7e795e95ddda
https://hg.mozilla.org/mozilla-central/rev/575659b876d9
Description
•