Bug 191238

Summary: Expose a constructor for PointerEvent from PlatformTouchEvent
Product: WebKit Reporter: Dean Jackson <dino>
Component: New BugsAssignee: Dean Jackson <dino>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, dbates, esprehn+autocc, ews-watchlist, graouts, kangil.han, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
graouts: review+, ews-watchlist: commit-queue-
Archive of layout-test-results from ews104 for mac-sierra-wk2 none

Description Dean Jackson 2018-11-04 16:48:24 PST
Expose a constructor for PointerEvent from PlatformTouchEvent
Comment 1 Radar WebKit Bug Importer 2018-11-04 16:49:10 PST
<rdar://problem/45795682>
Comment 2 Dean Jackson 2018-11-04 16:58:42 PST
Created attachment 353813 [details]
Patch
Comment 3 EWS Watchlist 2018-11-04 20:13:39 PST
Comment on attachment 353813 [details]
Patch

Attachment 353813 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/9859507

New failing tests:
imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-tracks.https.html
Comment 4 EWS Watchlist 2018-11-04 20:13:41 PST
Created attachment 353823 [details]
Archive of layout-test-results from ews104 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 5 Antoine Quint 2018-11-05 00:17:03 PST
Comment on attachment 353813 [details]
Patch

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

> Source/WebCore/dom/ios/PointerEventIOS.cpp:59
> +    : MouseEvent(type, CanBubble::Yes, IsCancelable::No, IsComposed::Yes, event.timestamp().approximateMonotonicTime(), WTFMove(view), 0, event.touchLocationAtIndex(index), event.touchLocationAtIndex(index), { }, event.modifiers(), 0, 0, nullptr, 0, 0, nullptr, IsSimulated::No, IsTrusted::Yes)

Only "pointercancel" is non-cancelable, the other types returned by eventType() are cancelable.

> Source/WebCore/dom/ios/PointerEventIOS.cpp:62
> +    , m_height(2 * event.radiusYAtIndex(index))

Where is this 2 coming from?
Comment 6 Dean Jackson 2018-11-05 09:47:42 PST
Looks like the wk2 test failures are unrelated.
Comment 7 Dean Jackson 2018-11-05 10:38:03 PST
Committed r237816: <https://trac.webkit.org/changeset/237816>
Comment 8 Dean Jackson 2018-11-05 10:39:23 PST
Comment on attachment 353813 [details]
Patch

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

>> Source/WebCore/dom/ios/PointerEventIOS.cpp:62
>> +    , m_height(2 * event.radiusYAtIndex(index))
> 
> Where is this 2 coming from?

because the touch region is a circle, and the box around that circle is 2 * radius