Figure out why the content process doesn't see the mouse-up event on the content process in X11 in the test-case for bug 1901764.
Categories
(Core :: DOM: Events, defect)
Tracking
()
People
(Reporter: emilio, Unassigned)
References
Details
I'm not sure why, but having the anonymous text node as the event target makes the content process (well EventStateManager at least) not see the mouseup event...
Masayuki, do you have any idea? I'm fairly baffled at that but I can't dig much into it right now.
Comment 1•3 months ago
|
||
I don't know, but I guess that it's consumed by unexpected capturing or DnD session. Edgar, do you have any ideas?
Comment 2•3 months ago
|
||
Could be consumed by the hidden window mentioned here?
https://searchfox.org/mozilla-central/rev/64ddb621a0d3905fc2e3df475517d4163d377b22/widget/gtk/nsDragService.cpp#828-836
Reporter | ||
Comment 3•3 months ago
|
||
This mouseup happens before the drag session starts, and it happens only if you hit the text, not if you hit the <select>
itself (e.g. the padding or the arrow button)
Comment 4•3 months ago
|
||
Hmm, the target is considered here. However, looks like there is no ifdef. Is the <select>
structure different only on X11 build? I guess, no...
Reporter | ||
Comment 5•3 months ago
|
||
No, that's the puzzling thing
Comment 6•3 months ago
|
||
When I debug on both Windows and X11, capturingContent
here is set to <memupopup>
. Then, eventTargetData.mFrame
is computed to the primary frame for the (probably) right target, <browser>
, once here. However, it's reset to the the primary frame for <menupopup>
here. So, eMouseUp
shouldn't be dispatched in the content process even on Windows.
Then, I check the behavior on Windows, then, I don't see eMouseUp
reached into the content process even on Windows. Did you misunderstand the cause of bug 1901764?
Reporter | ||
Comment 7•3 months ago
|
||
The way I was approaching this was checking wayland vs x11 (or x11 with and without the fix for bug 1901764). In the working case, I see us hitting this codepath on the content process...
Comment 8•3 months ago
|
||
I'm still not sure the platform differences, though.
When you press on the text in the <label>
, eventContent
here is set to the text node. When you press on the button in the <select>
, the eventContent
is set to the <select>
.
Then, DetermineDragTargetAndDefaultData
is called to consider targetContent
. Then, nsContentAreaDragDrop::GetDragData
is called and finally, DragDataProducer::Produce()
is called.
In DragDataProducer::Produce()
, it returns "cannot drag" when the drag target is <select>
because it's a non-<object>
form control. However, it's the text node in the native anonymous subtree, it returns "can drag" as usual. Therefore, when you press the button in <select>
, EventStateManager
cannot find a proper drag target and stop starting to drag. However, when you press the text, it'll reach this loop to find a draggable target in the flattened tree. Then, this loop returns draggable element in the parent tree.
So, I think that this tree should stop the native anonymous subtree boundary and/or parent non-<object>
form control at least.
Updated•3 months ago
|
Description
•