You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
hit_test failed occasionally when the touch event is sent. #35788
reson:
When you slide the carousel image, a new displaylist is generated continuously. The epoch will self-increase. However, the hit_test result may still be the previous epoch, resulting in a matching failure.
We cannot remove this check as it means that the hit testing tree is out of date with the DOM and the node addresses are more likely to be invalid. The ultimate solution here is to move hit testing to layout / script.
We cannot remove this check as it means that the hit testing tree is out of date with the DOM and the node addresses are more likely to be invalid. The ultimate solution here is to move hit testing to layout / script.
Timeline:
A touchevent is triggered.
In step 2, hittest is triggered.
When the eventhandler is executed in step 3, the layout is triggered and the display list of the last name is generated.
In step 5, the display list is sent to the compositor and most_recent_display_list_epoch is updated.
Then send it to the webrender and rebuild the scene in step 6.
At this time, another touchevent is triggered. Most_recent_display_list_epoch has been updated, but the seventh step of the rebuild scene process has not been reached. Therefore, the scene is old and cannot match the current epoch. The hittest fails.The event is not sent to the script.
We cannot remove this check as it means that the hit testing tree is out of date with the DOM and the node addresses are more likely to be invalid.
Although the display list is outdated at this time, the new display list is not updated, and the compositor NewWebRenderFrameReady is not notified, and the repaint is not performed.
Are outdated hit test results really invalid? This is the hit test result of the current page content.
Activity
kongbai1996 commentedon Mar 4, 2025
reson:
When you slide the carousel image, a new displaylist is generated continuously. The epoch will self-increase. However, the hit_test result may still be the previous epoch, resulting in a matching failure.
kongbai1996 commentedon Mar 4, 2025
servo/components/compositing/compositor.rs
Lines 1302 to 1305 in ff56836
kongbai1996 commentedon Mar 4, 2025
servo/components/compositing/compositor.rs
Line 1303 in ff56836
Maybe we shouldn't have this check?
mrobinson commentedon Mar 4, 2025
We cannot remove this check as it means that the hit testing tree is out of date with the DOM and the node addresses are more likely to be invalid. The ultimate solution here is to move hit testing to layout / script.
kongbai1996 commentedon Mar 4, 2025
It's a big job. I'll try it.
kongbai1996 commentedon Mar 4, 2025
Do you have any more detailed suggestions?
kongbai1996 commentedon Mar 4, 2025
Is this check also required if moving to script. There will be the same issue because the epoch was changed in layout2020.
kongbai1996 commentedon Mar 5, 2025
kongbai1996 commentedon Mar 5, 2025
Timeline:
A touchevent is triggered.
In step 2, hittest is triggered.
When the eventhandler is executed in step 3, the layout is triggered and the display list of the last name is generated.
In step 5, the display list is sent to the compositor and most_recent_display_list_epoch is updated.
Then send it to the webrender and rebuild the scene in step 6.
At this time, another touchevent is triggered. Most_recent_display_list_epoch has been updated, but the seventh step of the rebuild scene process has not been reached. Therefore, the scene is old and cannot match the current epoch. The hittest fails.The event is not sent to the script.
kongbai1996 commentedon Mar 5, 2025
Although the display list is outdated at this time, the new display list is not updated, and the compositor NewWebRenderFrameReady is not notified, and the repaint is not performed.
Are outdated hit test results really invalid? This is the hit test result of the current page content.
Add retry for hit tests with expired epoch in result (#37085)
kongbai1996 commentedon Jun 5, 2025
This issue has been resolved by retrying hittest.