Bug 196075 - All PointerEvent.isTrusted is always false.
Summary: All PointerEvent.isTrusted is always false.
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Safari Technology Preview
Hardware: Mac macOS 10.14
: P2 Normal
Assignee: Antoine Quint
Keywords: InRadar
Depends on:
Reported: 2019-03-21 07:17 PDT by misinoe.t
Modified: 2019-03-29 08:54 PDT (History)
9 users (show)

See Also:

please ⌥⌘C、The value of PointerEent.isTrusted is displayed (945 bytes, text/html)
2019-03-21 07:17 PDT, misinoe.t
no flags Details
Patch (12.68 KB, patch)
2019-03-28 03:13 PDT, Antoine Quint
cdumez: review+
cdumez: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description misinoe.t 2019-03-21 07:17:53 PDT
Created attachment 365543 [details]
please ⌥⌘C、The value of PointerEent.isTrusted is displayed

* macOS Mojave 10.14.3
* Safari Technology Preview: Release 78 (Safari 12.2, WebKit 14608.1.9.1)
* menu -> Develop -> Experimental Features -> ☑Pointer Events

All PointerEvent.isTrusted values ​​are always false.
This can not really determine if the user has 'pointerdown'.
Can Trusted PointerEvent.isTrusted tobe true?
Comment 1 Radar WebKit Bug Importer 2019-03-22 10:31:12 PDT
Comment 2 Antoine Quint 2019-03-27 06:40:49 PDT
Alas, the MouseEvent constructor we're using does not take in IsTrusted, so we'll need to move to a constructor that does, and the one available does not accepted an initializer.
Comment 3 Antoine Quint 2019-03-27 07:06:30 PDT
This only affects macOS, on iOS we're overriding MouseEvent constructors that already allow for IsTrusted to be passed in and where we always pass IsTrusted::Yes.
Comment 4 Antoine Quint 2019-03-28 03:13:21 PDT
Created attachment 366161 [details]
Comment 5 Chris Dumez 2019-03-28 08:40:41 PDT
Comment on attachment 366161 [details]

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

r=me with comments.

> Source/WebCore/dom/PointerEvent.cpp:87
> +Ref<PointerEvent> PointerEvent::createPointerCancelEvent(PointerID pointerId, String pointerType)

const String& or maybe const AtomicString&.

> Source/WebCore/dom/PointerEvent.cpp:115
> +PointerEvent::PointerEvent(const AtomicString& type, CanBubble canBubble, IsCancelable isCancelable, IsComposed isComposed, PointerID pointerId, String pointerType)

const String& or const AtomicString&, not String.

> Source/WebCore/dom/PointerEvent.h:76
> +    static Ref<PointerEvent> createPointerCancelEvent(PointerID, String pointerType);

const String& or const AtomicString&.
Comment 6 Antoine Quint 2019-03-29 08:54:11 PDT
Committed r243645: <https://trac.webkit.org/changeset/243645>