Bug 225734 - [iOS] REGRESSION(r271216) pointerevents/ios/pointer-events-no-mousedown-when-prevent-default-called-on-pointerdown.html is consistently failing
Summary: [iOS] REGRESSION(r271216) pointerevents/ios/pointer-events-no-mousedown-when-...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on: 220072
Blocks:
  Show dependency treegraph
 
Reported: 2021-05-12 22:11 PDT by Devin Rousso
Modified: 2021-05-13 16:20 PDT (History)
5 users (show)

See Also:


Attachments
Patch (4.90 KB, patch)
2021-05-12 22:12 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (4.90 KB, patch)
2021-05-13 14:58 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2021-05-12 22:11:18 PDT
```
--- ios-simulator-wk2-tests/build/OpenSource/layout-test-results/pointerevents/ios/pointer-events-no-mousedown-when-prevent-default-called-on-pointerdown-expected.txt
+++ ios-simulator-wk2-tests/build/OpenSource/layout-test-results/pointerevents/ios/pointer-events-no-mousedown-when-prevent-default-called-on-pointerdown-actual.txt
@@ -1,3 +1,7 @@
+CONSOLE MESSAGE: Error: assert_unreached: The mousedown event should not be dispatched after calling preventDefault() during pointerdown. Reached unreachable code
+CONSOLE MESSAGE: Error: assert_unreached: The mouseup event should not be dispatched after calling preventDefault() during pointerdown. Reached unreachable code
+
+Harness Error (FAIL), message = Error: assert_unreached: The mouseup event should not be dispatched after calling preventDefault() during pointerdown. Reached unreachable code
 
 PASS Testing that calling preventDefault() during a "pointerdown" event prevents compatibility events from being dispatched.
```
Comment 1 Devin Rousso 2021-05-12 22:11:35 PDT
<rdar://problem/77070765>
Comment 2 Devin Rousso 2021-05-12 22:12:27 PDT
Created attachment 428459 [details]
Patch
Comment 3 Wenson Hsieh 2021-05-12 23:08:50 PDT
Comment on attachment 428459 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=428459&action=review

> Source/WebCore/ChangeLog:14
> +        Instead of fully removing the `CapturingData` entirely, change it's state such that it's

Nit - the first "it's" should be "its"

> Source/WebCore/page/PointerCaptureController.cpp:329
> -        if (capturingData.pointerType == touchPointerEventType() && capturingData.pointerIsPressed && !capturingData.cancelled)
> +        if (capturingData.pointerType == touchPointerEventType() && capturingData.state == CapturingData::State::Ready)

Was removing the check for `capturingData.pointerIsPressed` intentional?
Comment 4 Devin Rousso 2021-05-12 23:47:52 PDT
Comment on attachment 428459 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=428459&action=review

>> Source/WebCore/page/PointerCaptureController.cpp:329
>> +        if (capturingData.pointerType == touchPointerEventType() && capturingData.state == CapturingData::State::Ready)
> 
> Was removing the check for `capturingData.pointerIsPressed` intentional?

Yes.  This was my attempt at "only include things that are active" in r271216, but as I mentioned in the ChangeLog because mouse events are dispatched after, it'd no longer be `pointerIsPressed` by that point anyways.
Comment 5 Devin Rousso 2021-05-13 14:58:46 PDT
Created attachment 428565 [details]
Patch
Comment 6 EWS 2021-05-13 16:20:14 PDT
Committed r277463 (237706@main): <https://commits.webkit.org/237706@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 428565 [details].