Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event Timing reports EventTarget for more pointer events #44372

Merged
merged 1 commit into from
Feb 3, 2024

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Feb 2, 2024

Only in cases where there is not a single pointer event registered on a page, blink may entirely optimize out EventDispatch steps, since there are no observers anyway. This optimization should not normally be detectable.

However, the Event Timing API still measures these events and reports them to the performance timeline. Because the EventDispatch steps are where we assign EventTarget to Event objects, the Event Timing API was effectively missing the target value whenever we skipped this step.

This patch plumbs the original HitTest target which we fall back to under such situations.

Bug: 1367329
Change-Id: Icf21e6103c98261e9f6e88cef1ac09f3a683751b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5246848
Commit-Queue: Michal Mocny <mmocny@chromium.org>
Reviewed-by: Aoyuan Zuo <zuoaoyuan@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1255634}

@chromium-wpt-export-bot chromium-wpt-export-bot changed the title Initial patch to add support for pointer target Event Timing reports EventTarget for more pointer events Feb 2, 2024
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-5246848 branch 3 times, most recently from f8ac96e to d1cb6da Compare February 2, 2024 16:43
@chromium-wpt-export-bot chromium-wpt-export-bot marked this pull request as ready for review February 2, 2024 17:48
Only in cases where there is not a single pointer event registered on a page, blink may entirely optimize out EventDispatch steps, since there are no observers anyway.  This optimization should not normally be detectable.

However, the Event Timing API still measures these events and reports them to the performance timeline.  Because the EventDispatch steps are where we assign EventTarget to Event objects, the Event Timing API was effectively missing the target value whenever we skipped this step.

This patch plumbs the original HitTest target which we fall back to under such situations.

Bug: 1367329
Change-Id: Icf21e6103c98261e9f6e88cef1ac09f3a683751b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5246848
Commit-Queue: Michal Mocny <mmocny@chromium.org>
Reviewed-by: Aoyuan Zuo <zuoaoyuan@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1255634}
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@dev-ansung
Copy link
Contributor

Unstable results

Test Subtest Results Messages
/event-timing/duration-with-target-low.html   OK: 7/10, TIMEOUT: 3/10  
/event-timing/duration-with-target-low.html PerformanceObserver with durationThreshold of 300 and processingDelay of 0 doesn't see any entries in the observer FAIL: 7/10, TIMEOUT: 3/10 assert_greater_than_equal: The entry's duration should be greater than or equal to 304 ms. expected a number greater than or equal to 304 but got 300;Test timed out;assert_greater_than_equal: The entry's duration should be greater than or equal to 304 ms. expected a number greater than or equal to 304 but got 301
/event-timing/interactionid-tap.html   OK: 1/10, TIMEOUT: 9/10  
/event-timing/interactionid-tap.html Event Timing: compare event timing interactionId for tap. FAIL: 1/10, TIMEOUT: 9/10 assert_greater_than: Should have a non-trivial interactionId for pointerdown event expected a number but got a "undefined";Test timed out

@dev-ansung
Copy link
Contributor

Filed https://crbug.com/1524539.
@KyleJu @DanielRyanSmith Could you please admin merge? Thanks

@DanielRyanSmith DanielRyanSmith merged commit e1bc60c into master Feb 3, 2024
19 of 21 checks passed
@DanielRyanSmith DanielRyanSmith deleted the chromium-export-cl-5246848 branch February 3, 2024 04:26
mbrodesser-Igalia pushed a commit to mbrodesser-Igalia/wpt that referenced this pull request Feb 19, 2024
…m-tests#44372)

Only in cases where there is not a single pointer event registered on a page, blink may entirely optimize out EventDispatch steps, since there are no observers anyway.  This optimization should not normally be detectable.

However, the Event Timing API still measures these events and reports them to the performance timeline.  Because the EventDispatch steps are where we assign EventTarget to Event objects, the Event Timing API was effectively missing the target value whenever we skipped this step.

This patch plumbs the original HitTest target which we fall back to under such situations.

Bug: 1367329
Change-Id: Icf21e6103c98261e9f6e88cef1ac09f3a683751b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5246848
Commit-Queue: Michal Mocny <mmocny@chromium.org>
Reviewed-by: Aoyuan Zuo <zuoaoyuan@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1255634}

Co-authored-by: Michal Mocny <mmocny@chromium.org>
marcoscaceres pushed a commit that referenced this pull request Feb 23, 2024
Only in cases where there is not a single pointer event registered on a page, blink may entirely optimize out EventDispatch steps, since there are no observers anyway.  This optimization should not normally be detectable.

However, the Event Timing API still measures these events and reports them to the performance timeline.  Because the EventDispatch steps are where we assign EventTarget to Event objects, the Event Timing API was effectively missing the target value whenever we skipped this step.

This patch plumbs the original HitTest target which we fall back to under such situations.

Bug: 1367329
Change-Id: Icf21e6103c98261e9f6e88cef1ac09f3a683751b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5246848
Commit-Queue: Michal Mocny <mmocny@chromium.org>
Reviewed-by: Aoyuan Zuo <zuoaoyuan@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1255634}

Co-authored-by: Michal Mocny <mmocny@chromium.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants