Bug 188929 - Avoid calling setUntrusted in SimulatedMouseEvent
Summary: Avoid calling setUntrusted in SimulatedMouseEvent
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: InRadar
Depends on:
Blocks: 170211
  Show dependency treegraph
 
Reported: 2018-08-24 13:46 PDT by Ryosuke Niwa
Modified: 2019-02-06 22:01 PST (History)
10 users (show)

See Also:


Attachments
Cleanup (15.51 KB, patch)
2018-08-24 13:49 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews100 for mac-sierra (2.30 MB, application/zip)
2018-08-24 15:02 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews104 for mac-sierra-wk2 (2.78 MB, application/zip)
2018-08-24 15:11 PDT, EWS Watchlist
no flags Details
Patch for landing (15.41 KB, patch)
2018-08-24 15:13 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2018-08-24 13:46:55 PDT
Pass IsTrusted flag around to superclass' constructors instead.
Comment 1 Ryosuke Niwa 2018-08-24 13:49:12 PDT
Created attachment 348038 [details]
Cleanup
Comment 2 EWS Watchlist 2018-08-24 13:51:27 PDT
Attachment 348038 [details] did not pass style-queue:


ERROR: Source/WebCore/dom/MouseEvent.cpp:84:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/MouseEvent.cpp:84:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/Event.h:146:  The parameter name "isTrusted" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/MouseRelatedEvent.cpp:39:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/MouseRelatedEvent.cpp:39:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/WheelEvent.cpp:51:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/dom/UIEventWithKeyState.h:59:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
Total errors found: 7 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Simon Fraser (smfr) 2018-08-24 14:05:37 PDT
Comment on attachment 348038 [details]
Cleanup

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

> Source/WebCore/ChangeLog:11
> +        This makes EventTarget::dispatchEventForBindings the only caller of setUntrusted().

Can some of these Event members variables be const variables after these changes?

> Source/WebCore/dom/Event.h:146
> +    Event(const AtomicString& type, CanBubble, IsCancelable, IsComposed, MonotonicTime timestamp, IsTrusted isTrusted = IsTrusted::Yes);

You don't need to name the parameter here.
Comment 4 EWS Watchlist 2018-08-24 15:02:21 PDT
Comment on attachment 348038 [details]
Cleanup

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

New failing tests:
imported/w3c/web-platform-tests/shadow-dom/event-composed.html
Comment 5 EWS Watchlist 2018-08-24 15:02:23 PDT
Created attachment 348043 [details]
Archive of layout-test-results from ews100 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 6 EWS Watchlist 2018-08-24 15:11:17 PDT
Comment on attachment 348038 [details]
Cleanup

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

New failing tests:
imported/w3c/web-platform-tests/shadow-dom/event-composed.html
Comment 7 EWS Watchlist 2018-08-24 15:11:18 PDT
Created attachment 348045 [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 8 Ryosuke Niwa 2018-08-24 15:12:39 PDT
Comment on attachment 348038 [details]
Cleanup

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

> Source/WebCore/dom/SimulatedClick.cpp:47
> -        : MouseEvent(eventType, CanBubble::Yes, IsCancelable::Yes, source == SimulatedClickSource::Bindings ? IsComposed::No : IsComposed::Yes,
> +        : MouseEvent(eventType, CanBubble::Yes, IsCancelable::Yes, IsComposed::Yes,

Oh oops, this is the unrelated change causing the test to fail.
Comment 9 Ryosuke Niwa 2018-08-24 15:13:28 PDT
Created attachment 348046 [details]
Patch for landing
Comment 10 Radar WebKit Bug Importer 2018-08-24 15:13:52 PDT
<rdar://problem/43699414>
Comment 11 EWS Watchlist 2018-08-24 15:14:51 PDT
Attachment 348046 [details] did not pass style-queue:


ERROR: Source/WebCore/dom/MouseEvent.cpp:84:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/MouseEvent.cpp:84:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/Event.h:146:  The parameter name "isTrusted" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/MouseRelatedEvent.cpp:39:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/MouseRelatedEvent.cpp:39:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/WheelEvent.cpp:51:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/dom/UIEventWithKeyState.h:59:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
Total errors found: 7 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 12 WebKit Commit Bot 2018-08-24 15:51:40 PDT
Comment on attachment 348046 [details]
Patch for landing

Clearing flags on attachment: 348046

Committed r235335: <https://trac.webkit.org/changeset/235335>
Comment 13 WebKit Commit Bot 2018-08-24 15:51:42 PDT
All reviewed patches have been landed.  Closing bug.
Comment 14 Lucas Forschler 2019-02-06 09:19:04 PST
Mass move bugs into the DOM component.