Touch event isn't received on OOP child frame on GeckoView with fission
Categories
(GeckoView :: General, defect)
Tracking
(firefox103 disabled, firefox104 disabled, firefox105 fixed)
People
(Reporter: m_kato, Assigned: m_kato)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fission:android] [geckoview:2022h2])
Attachments
(1 file)
Step
- Enable fission on Fenix via
fission.autostart=true
- Browse https://wontfix.net/bugs/iframe3.html
- Touch yellow area
Result
No touch event is received.
Expected Result
touch event is received even if OOP. (No OOP version is https://wontfix.dev/bugs/iframe3.html).
Assignee | ||
Comment 1•2 years ago
|
||
Of course, this sample works on Firefox desktop with Surface Pro.
Comment 2•2 years ago
|
||
(In reply to Makoto Kato [:m_kato] from comment #1)
Of course, this sample works on Firefox desktop with Surface Pro.
Meaning the bug can be reproduced on desktop as well? Or the bug does not exist on desktop?
Assignee | ||
Comment 3•2 years ago
|
||
Meaning the bug can be reproduced on desktop as well? Or the bug does not exist on desktop?
This issue is GeckoView only. Firefox Windows doesn't have this issue. (I don't test this on Firefox/Linux).
Updated•2 years ago
|
Comment 4•2 years ago
|
||
From the perspective of APZ hit-testing, it's properly working, I dumped the layer id in question, it looks correct, but it somehow delivers to the top level document for some reasons, I guess it's handled somewhere in EventStateManager? CCing Edgar, I believe he knows very well around the code.
Comment 5•2 years ago
|
||
Moving into GeckoView:Core for now since I can no longer see Widget:Android component. Anyway a problem is here in capturing aInput
value.
The aInput
is MultiTouchInput, in the copy constructor of the class we don't copy over mLayersId so that we loose the information there. I am not sure not copying over the value is intentional or not, below change should fix this issue. There are other places we need to properly copy over the layers id in widget/android/nsWindows.cpp for other types of events.
diff --git a/widget/android/nsWindow.cpp b/widget/android/nsWindow.cpp
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -845,8 +845,9 @@ class NPZCSupport final
}
// Dispatch APZ input event on Gecko thread.
- PostInputEvent([aInput, result](nsWindow* window) {
+ PostInputEvent([aInput, result, layersId = aInput.mLayersId](nsWindow* window) {
WidgetTouchEvent touchEvent = aInput.ToWidgetEvent(window);
+ touchEvent.mLayersId = layersId;
window->ProcessUntransformedAPZEvent(&touchEvent, result);
window->DispatchHitTest(touchEvent);
});
Assignee | ||
Comment 6•2 years ago
|
||
Oh, thanks. We should use std::move
instead of copy constructor.
Assignee | ||
Comment 7•2 years ago
|
||
Assignee | ||
Comment 8•2 years ago
|
||
When turning on fission, OOP child frame doesn't receive touch events such as
touchstart
.
When dispatching touch event from GeckoView side, some informations such as
mLayersId
are missing since copy constructor of MultiTouchInput
doesn't
copy all information.
Anyways, since the structure of Input data has a lot of members, we should use
std::move
instead of copy constructor of InputData
. It can avoid
unnecessary copy.
Updated•2 years ago
|
Comment 9•2 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #5)
The
aInput
is MultiTouchInput, in the copy constructor of the class we don't copy over mLayersId so that we loose the information there. I am not sure not copying over the value is intentional or not, below change should fix this issue. There are other places we need to properly copy over the layers id in widget/android/nsWindows.cpp for other types of events.
If that's not intentional then that seems like a footgun that we should fix. Maybe Botond knows?
Comment 10•2 years ago
|
||
Yeah, totally agree. The mLayersId was introduced in bug 1524239, it looks to me it's unintentional. CCing Masayuki and Henri.
Updated•2 years ago
|
Assignee | ||
Comment 11•2 years ago
|
||
I file new issue as https://bugzilla.mozilla.org/show_bug.cgi?id=1784849 for copy constructor issue.
Comment 12•2 years ago
|
||
Updated•2 years ago
|
Comment 13•2 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #10)
Yeah, totally agree. The mLayersId was introduced in bug 1524239, it looks to me it's unintentional. CCing Masayuki and Henri.
This is unintentional, yes. Sorry about the bug.
Comment 14•2 years ago
|
||
bugherder |
Comment 15•2 years ago
|
||
No need to uplift this fix to Beta because Android Fission is disabled by default.
Updated•7 months ago
|
Description
•