Open Bug 2043764 Opened 6 months ago Updated 8 days ago

Unnecessary delay on sending a content response on touchstart event

Categories

(Core :: Panning and Zooming, defect, P3)

defect

Tracking

()

People

(Reporter: hiro, Unassigned)

References

Details

Attachments

(1 external file)

While I was writing a mochitest for bug 2043349, I realized this issue. The code in question is: https://searchfox.org/firefox-main/rev/e28b34ab33dbf49364999070168cbb7e11e8e5bd/gfx/layers/apz/util/APZEventState.cpp#301-305

APZES_LOG("Event not prevented; pending response for %" PRIu64 " %s\n",
          aInputBlockId, ToString(aGuid).c_str());
mPendingTouchPreventedResponse = true;
mPendingTouchPreventedGuid = aGuid;
mPendingTouchPreventedBlockId = aInputBlockId;

If there's an active touchstart event listener and if the listener does NOT preventDefaulted, then we unconditionally delay the content response until the initial touchmove event was handled in the content regardless whether there's any passive/active touchmove event listener.

I am going to upload a mochitest to see this issue.

Steps to see the issue

  1. Run the browser mochitest in D303513 with MOZ_LOG=apz.controller:5
  2. Find the place where "got a touch-start" is

It would be something like;

  0:05.42 GECKO(327953) ### XPCOM_MEM_BLOAT_LOG defined -- logging bloat/leaks to /tmp/tmpb8g5hah8.mozrunner/runtests_leaks_tab_pid328353.log
  0:08.22 GECKO(327953) [Parent 327953: Main Thread]: D/apz.controller 72055e61c800(root scrollId=2): got a touch-start in state NOTHING

there's alsmost 3s gap as you can see, and in the test there's an artificial 3s busy state inside a passive touchmove event handler. Due to the busy on touchmove, the touchstart arrival to an APZC got delayed.

The severity field is not set for this bug.
:botond, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(botond)
Severity: -- → S3
Priority: -- → P3
Flags: needinfo?(botond)
See Also: → 2092229
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: