Open Bug 1917867 Opened 10 months ago Updated 4 months ago

Test changes from bug 1917456 non-fatally assert with "event for content that isn't in a document"

Categories

(Core :: DOM: Events, defect)

defect

Tracking

()

ASSIGNED

People

(Reporter: emilio, Assigned: emilio)

References

Details

(Keywords: leave-open)

Attachments

(2 files)

That is, this NS_ASSERTION: https://searchfox.org/mozilla-central/rev/6e6265bd607cbe4c96e714f86d3d9e36620f63d6/layout/base/PresShell.cpp#8422

Masayuki, do you know if this is worrisome? I can change the test to not trigger it if it's just a test issue.

Flags: needinfo?(masayuki)
See Also: → 1918161
Assignee: nobody → emilio
Status: NEW → ASSIGNED

In theory yes because PresShell::EventHandler basically handles user input. Therefore, the event target should be connected to the document in most cases. So, it detects a bug of dispatching event on correct target. From user's point of view, it looks like an input is ignored by web apps. So, I think that it's not serious, but may make users inconvenient.

On the other hand, in this case, the event must be gotpointercapture or lostpointercapture event. According to the spec, they must be fired on the capturing element. So, it may be disconnected. It seems that they should be dispatched without PresShell::EventHandler, but ePointeGotCapture event needs to be handled by EventStateManager to dispatch pointer boundary events. So, for avoiding to duplicate the path, it's reasonable to use PresShell::EventHandler to dispatch them.

So, I think that the assertion should not be tested if the event message is ePointerGotCapture or ePointerLostCapture.

Flags: needinfo?(masayuki)
Severity: -- → S3
Keywords: leave-open

So for PointerLostCapture we already do something different here: https://searchfox.org/mozilla-central/rev/4a8bd8efdfaa43dd14a16d3cb15bf86796fd1def/dom/events/PointerEventHandler.cpp#914

So probably only PointerGotCapture?

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a5780f3e66d4 Simplify PresShell event dispatching asserts. r=smaug

Oh, yeah, so, only ePointerGotCapture may be dispatched to uncomposed element even dispatched via PresShell:EventHandler. So, it should be added to the condition of NS_ASSERTION. (However, I'm not sure whether the event should be fired because the capture should've been being released at least.)

The leave-open keyword is there and there is no activity for 6 months.
:emilio, maybe it's time to close this bug?
For more information, please visit BugBot documentation.

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: