summarylogtreecommitdiffstats
path: root/0001-Modernize-WebInputEvent.patch
blob: f402f951493d47a07d98e4a11f717f9a99413686 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
From ba38c72a21a6ebde6abf8f19c00c5c4423534106 Mon Sep 17 00:00:00 2001
From: Dave Tapuska <dtapuska@chromium.org>
Date: Mon, 6 Jan 2020 23:48:47 +0000
Subject: [PATCH] Modernize WebInputEvent

Reland 547be4072d5ef59ba1eea93aa0ac6a294f1660d7. It was previously
reverted because CFI bot started to fail. That was fixed here:
crrev.com/2708646cd1a812a84200a1db6208732fe20d49b8

Since the class is no longer memcopied between processes we can
use virtuals.
- Add virtual destructor
- Add pure virtual cloning
- Remove memset
- Remove size attribute

BUG=836826
TBR=nasko@chromium.org,bokan@chromium.org,jbroman@chromium.org

Change-Id: I091683184ada8d693c11f8cb7aff9dae3eaf93e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1988849
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#728694}
---
 .../devtools/protocol/input_handler.cc        |  2 +-
 .../renderer_host/input/input_router_impl.cc  |  3 +-
 .../renderer_host/render_widget_targeter.cc   |  2 +-
 .../site_per_process_hit_test_browsertest.cc  |  2 +-
 .../common/input/event_with_latency_info.h    |  3 -
 content/common/input/input_event.cc           |  3 +-
 .../browser/native_web_keyboard_event.h       |  2 +-
 .../renderer/input/input_event_prediction.cc  |  3 +-
 .../input/main_thread_event_queue_unittest.cc | 33 +---------
 .../input/widget_input_handler_manager.cc     |  3 +-
 third_party/blink/common/BUILD.gn             |  1 +
 .../blink/common/input/web_gesture_event.cc   |  4 ++
 .../blink/common/input/web_keyboard_event.cc  | 13 ++++
 .../blink/common/input/web_mouse_event.cc     |  6 +-
 .../common/input/web_mouse_wheel_event.cc     |  4 ++
 .../blink/common/input/web_pointer_event.cc   | 12 ++--
 .../blink/common/input/web_touch_event.cc     |  4 ++
 .../public/common/input/web_gesture_event.h   | 17 +++---
 .../public/common/input/web_input_event.h     | 53 ++++------------
 .../public/common/input/web_keyboard_event.h  | 24 ++++----
 .../public/common/input/web_mouse_event.h     | 31 +++-------
 .../common/input/web_mouse_wheel_event.h      | 60 ++++++-------------
 .../public/common/input/web_pointer_event.h   | 24 ++++----
 .../common/input/web_pointer_properties.h     | 18 ++----
 .../public/common/input/web_touch_event.h     | 22 +++----
 .../public/common/input/web_touch_point.h     | 16 ++---
 .../platform/web_coalesced_input_event.h      |  7 +--
 .../core/events/web_input_event_conversion.cc |  4 +-
 .../exported/web_coalesced_input_event.cc     | 40 -------------
 .../main_thread_scheduler_impl_unittest.cc    |  7 ++-
 .../blink/compositor_thread_event_queue.cc    |  4 +-
 ui/events/blink/event_with_callback.cc        |  2 +-
 .../blink/input_handler_proxy_unittest.cc     |  8 +--
 ui/events/blink/scroll_predictor_unittest.cc  | 10 ++--
 ui/events/blink/web_input_event_traits.cc     | 35 -----------
 ui/events/blink/web_input_event_traits.h      |  8 +--
 36 files changed, 164 insertions(+), 326 deletions(-)
 create mode 100644 third_party/blink/common/input/web_keyboard_event.cc

diff --git a/content/browser/devtools/protocol/input_handler.cc b/content/browser/devtools/protocol/input_handler.cc
index 3d20f3d4d410..c7a95973d938 100644
--- a/content/browser/devtools/protocol/input_handler.cc
+++ b/content/browser/devtools/protocol/input_handler.cc
@@ -672,7 +672,7 @@ void InputHandler::DispatchMouseEvent(
   modifiers |= button_modifiers;
   base::TimeTicks timestamp = GetEventTimeTicks(maybe_timestamp);
 
-  std::unique_ptr<blink::WebMouseEvent, ui::WebInputEventDeleter> mouse_event;
+  std::unique_ptr<blink::WebMouseEvent> mouse_event;
   blink::WebMouseWheelEvent* wheel_event = nullptr;
 
   if (type == blink::WebInputEvent::kMouseWheel) {
diff --git a/content/browser/renderer_host/input/input_router_impl.cc b/content/browser/renderer_host/input/input_router_impl.cc
index 44c32d2368ee..4b3e15112bdb 100644
--- a/content/browser/renderer_host/input/input_router_impl.cc
+++ b/content/browser/renderer_host/input/input_router_impl.cc
@@ -66,8 +66,7 @@ std::unique_ptr<InputEvent> ScaleEvent(const WebInputEvent& event,
         latency_info.ScaledBy(scale));
   }
 
-  return std::make_unique<InputEvent>(ui::WebInputEventTraits::Clone(event),
-                                      latency_info);
+  return std::make_unique<InputEvent>(event.Clone(), latency_info);
 }
 
 }  // namespace
diff --git a/content/browser/renderer_host/render_widget_targeter.cc b/content/browser/renderer_host/render_widget_targeter.cc
index 5171535dbe68..dd2876a5233c 100644
--- a/content/browser/renderer_host/render_widget_targeter.cc
+++ b/content/browser/renderer_host/render_widget_targeter.cc
@@ -106,7 +106,7 @@ RenderWidgetTargeter::TargetingRequest::TargetingRequest(
     const ui::LatencyInfo& latency) {
   this->root_view = std::move(root_view);
   this->location = ComputeEventLocation(event);
-  this->event = ui::WebInputEventTraits::Clone(event);
+  this->event = event.Clone();
   this->latency = latency;
 }
 
diff --git a/content/browser/site_per_process_hit_test_browsertest.cc b/content/browser/site_per_process_hit_test_browsertest.cc
index 228c8cbc9f3e..48cb1ebc744c 100644
--- a/content/browser/site_per_process_hit_test_browsertest.cc
+++ b/content/browser/site_per_process_hit_test_browsertest.cc
@@ -95,7 +95,7 @@ class TestInputEventObserver : public RenderWidgetHost::InputEventObserver {
 
   void OnInputEvent(const blink::WebInputEvent& event) override {
     events_received_.push_back(event.GetType());
-    event_ = ui::WebInputEventTraits::Clone(event);
+    event_ = event.Clone();
   }
 
   const std::vector<InputEventAckSource>& events_acked() {
diff --git a/content/common/input/event_with_latency_info.h b/content/common/input/event_with_latency_info.h
index e61aa653725e..58e8b8ca2de6 100644
--- a/content/common/input/event_with_latency_info.h
+++ b/content/common/input/event_with_latency_info.h
@@ -41,9 +41,6 @@ class EventWithLatencyInfo {
     if (other.event.GetType() != event.GetType())
       return false;
 
-    DCHECK_EQ(sizeof(T), event.size());
-    DCHECK_EQ(sizeof(T), other.event.size());
-
     return ui::CanCoalesce(other.event, event);
   }
 
diff --git a/content/common/input/input_event.cc b/content/common/input/input_event.cc
index 5204dde65a54..4e11e69a36a1 100644
--- a/content/common/input/input_event.cc
+++ b/content/common/input/input_event.cc
@@ -16,8 +16,7 @@ InputEvent::InputEvent(ui::WebScopedInputEvent event,
 
 InputEvent::InputEvent(const blink::WebInputEvent& web_event,
                        const ui::LatencyInfo& latency_info)
-    : web_event(ui::WebInputEventTraits::Clone(web_event)),
-      latency_info(latency_info) {}
+    : web_event(web_event.Clone()), latency_info(latency_info) {}
 
 InputEvent::~InputEvent() {}
 
diff --git a/content/public/browser/native_web_keyboard_event.h b/content/public/browser/native_web_keyboard_event.h
index 7b10a7402d59..8498d45e54b7 100644
--- a/content/public/browser/native_web_keyboard_event.h
+++ b/content/public/browser/native_web_keyboard_event.h
@@ -57,7 +57,7 @@ struct CONTENT_EXPORT NativeWebKeyboardEvent : public blink::WebKeyboardEvent {
 #endif
 
   NativeWebKeyboardEvent(const NativeWebKeyboardEvent& event);
-  ~NativeWebKeyboardEvent();
+  ~NativeWebKeyboardEvent() override;
 
   NativeWebKeyboardEvent& operator=(const NativeWebKeyboardEvent& event);
 
diff --git a/content/renderer/input/input_event_prediction.cc b/content/renderer/input/input_event_prediction.cc
index bd43bcb389e3..b8a79476e80c 100644
--- a/content/renderer/input/input_event_prediction.cc
+++ b/content/renderer/input/input_event_prediction.cc
@@ -168,8 +168,7 @@ void InputEventPrediction::AddPredictedEvents(
       last_event_timestamp_ + mouse_predictor_->MaxPredictionTime();
   bool success = true;
   while (success) {
-    ui::WebScopedInputEvent predicted_event =
-        ui::WebInputEventTraits::Clone(coalesced_event.Event());
+    ui::WebScopedInputEvent predicted_event = coalesced_event.Event().Clone();
     success = false;
     if (predicted_event->GetType() == WebInputEvent::kTouchMove) {
       WebTouchEvent& touch_event =
diff --git a/content/renderer/input/main_thread_event_queue_unittest.cc b/content/renderer/input/main_thread_event_queue_unittest.cc
index 35a467cf9af2..299833e08d7d 100644
--- a/content/renderer/input/main_thread_event_queue_unittest.cc
+++ b/content/renderer/input/main_thread_event_queue_unittest.cc
@@ -5,6 +5,7 @@
 #include <stddef.h>
 
 #include <new>
+#include <tuple>
 #include <utility>
 #include <vector>
 
@@ -197,8 +198,8 @@ class MainThreadEventQueueTest : public testing::Test,
   void HandleEvent(WebInputEvent& event, InputEventAckState ack_result) {
     base::AutoReset<bool> in_handle_event(&handler_callback_->handling_event_,
                                           true);
-    queue_->HandleEvent(ui::WebInputEventTraits::Clone(event),
-                        ui::LatencyInfo(), DISPATCH_TYPE_BLOCKING, ack_result,
+    queue_->HandleEvent(event.Clone(), ui::LatencyInfo(),
+                        DISPATCH_TYPE_BLOCKING, ack_result,
                         handler_callback_->GetCallback());
   }
 
@@ -354,8 +355,6 @@ TEST_F(MainThreadEventQueueTest, NonBlockingWheel) {
   }
 
   {
-    EXPECT_EQ(kEvents[0].size(),
-              handled_tasks_.at(0)->taskAsEvent()->Event().size());
     EXPECT_EQ(kEvents[0].GetType(),
               handled_tasks_.at(0)->taskAsEvent()->Event().GetType());
     const WebMouseWheelEvent* last_wheel_event =
@@ -446,8 +445,6 @@ TEST_F(MainThreadEventQueueTest, NonBlockingTouch) {
   EXPECT_EQ(0u, event_queue().size());
   EXPECT_EQ(3u, handled_tasks_.size());
 
-  EXPECT_EQ(kEvents[0].size(),
-            handled_tasks_.at(0)->taskAsEvent()->Event().size());
   EXPECT_EQ(kEvents[0].GetType(),
             handled_tasks_.at(0)->taskAsEvent()->Event().GetType());
   const WebTouchEvent* last_touch_event = static_cast<const WebTouchEvent*>(
@@ -464,8 +461,6 @@ TEST_F(MainThreadEventQueueTest, NonBlockingTouch) {
     EXPECT_TRUE(Equal(kEvents[0], *coalesced_touch_event));
   }
 
-  EXPECT_EQ(kEvents[1].size(),
-            handled_tasks_.at(1)->taskAsEvent()->Event().size());
   EXPECT_EQ(kEvents[1].GetType(),
             handled_tasks_.at(1)->taskAsEvent()->Event().GetType());
   last_touch_event = static_cast<const WebTouchEvent*>(
@@ -482,8 +477,6 @@ TEST_F(MainThreadEventQueueTest, NonBlockingTouch) {
     EXPECT_TRUE(Equal(kEvents[1], *coalesced_touch_event));
   }
 
-  EXPECT_EQ(kEvents[2].size(),
-            handled_tasks_.at(1)->taskAsEvent()->Event().size());
   EXPECT_EQ(kEvents[2].GetType(),
             handled_tasks_.at(2)->taskAsEvent()->Event().GetType());
   last_touch_event = static_cast<const WebTouchEvent*>(
@@ -602,8 +595,6 @@ TEST_F(MainThreadEventQueueTest, InterleavedEvents) {
   EXPECT_EQ(0u, event_queue().size());
   EXPECT_EQ(2u, handled_tasks_.size());
   {
-    EXPECT_EQ(kWheelEvents[0].size(),
-              handled_tasks_.at(0)->taskAsEvent()->Event().size());
     EXPECT_EQ(kWheelEvents[0].GetType(),
               handled_tasks_.at(0)->taskAsEvent()->Event().GetType());
     const WebMouseWheelEvent* last_wheel_event =
@@ -618,8 +609,6 @@ TEST_F(MainThreadEventQueueTest, InterleavedEvents) {
     EXPECT_TRUE(Equal(coalesced_event, *last_wheel_event));
   }
   {
-    EXPECT_EQ(kTouchEvents[0].size(),
-              handled_tasks_.at(1)->taskAsEvent()->Event().size());
     EXPECT_EQ(kTouchEvents[0].GetType(),
               handled_tasks_.at(1)->taskAsEvent()->Event().GetType());
     const WebTouchEvent* last_touch_event = static_cast<const WebTouchEvent*>(
@@ -999,8 +988,6 @@ TEST_F(MainThreadEventQueueTest, BlockingTouchesDuringFling) {
   EXPECT_FALSE(main_task_runner_->HasPendingTask());
   EXPECT_EQ(0u, event_queue().size());
   EXPECT_EQ(1u, handled_tasks_.size());
-  EXPECT_EQ(kEvents.size(),
-            handled_tasks_.at(0)->taskAsEvent()->Event().size());
   EXPECT_EQ(kEvents.GetType(),
             handled_tasks_.at(0)->taskAsEvent()->Event().GetType());
   EXPECT_TRUE(last_touch_start_forced_nonblocking_due_to_fling());
@@ -1020,8 +1007,6 @@ TEST_F(MainThreadEventQueueTest, BlockingTouchesDuringFling) {
   EXPECT_FALSE(main_task_runner_->HasPendingTask());
   EXPECT_EQ(0u, event_queue().size());
   EXPECT_EQ(2u, handled_tasks_.size());
-  EXPECT_EQ(kEvents.size(),
-            handled_tasks_.at(1)->taskAsEvent()->Event().size());
   EXPECT_EQ(kEvents.GetType(),
             handled_tasks_.at(1)->taskAsEvent()->Event().GetType());
   EXPECT_TRUE(last_touch_start_forced_nonblocking_due_to_fling());
@@ -1040,8 +1025,6 @@ TEST_F(MainThreadEventQueueTest, BlockingTouchesDuringFling) {
   EXPECT_FALSE(main_task_runner_->HasPendingTask());
   EXPECT_EQ(0u, event_queue().size());
   EXPECT_EQ(3u, handled_tasks_.size());
-  EXPECT_EQ(kEvents.size(),
-            handled_tasks_.at(2)->taskAsEvent()->Event().size());
   EXPECT_EQ(kEvents.GetType(),
             handled_tasks_.at(2)->taskAsEvent()->Event().GetType());
   EXPECT_EQ(kEvents.dispatch_type, WebInputEvent::kBlocking);
@@ -1058,8 +1041,6 @@ TEST_F(MainThreadEventQueueTest, BlockingTouchesDuringFling) {
   EXPECT_FALSE(main_task_runner_->HasPendingTask());
   EXPECT_EQ(0u, event_queue().size());
   EXPECT_EQ(4u, handled_tasks_.size());
-  EXPECT_EQ(kEvents.size(),
-            handled_tasks_.at(3)->taskAsEvent()->Event().size());
   EXPECT_EQ(kEvents.GetType(),
             handled_tasks_.at(3)->taskAsEvent()->Event().GetType());
   EXPECT_EQ(kEvents.dispatch_type, WebInputEvent::kBlocking);
@@ -1086,8 +1067,6 @@ TEST_F(MainThreadEventQueueTest, BlockingTouchesOutsideFling) {
   EXPECT_FALSE(main_task_runner_->HasPendingTask());
   EXPECT_EQ(0u, event_queue().size());
   EXPECT_EQ(1u, handled_tasks_.size());
-  EXPECT_EQ(kEvents.size(),
-            handled_tasks_.at(0)->taskAsEvent()->Event().size());
   EXPECT_EQ(kEvents.GetType(),
             handled_tasks_.at(0)->taskAsEvent()->Event().GetType());
   EXPECT_EQ(kEvents.dispatch_type, WebInputEvent::kBlocking);
@@ -1105,8 +1084,6 @@ TEST_F(MainThreadEventQueueTest, BlockingTouchesOutsideFling) {
   EXPECT_FALSE(main_task_runner_->HasPendingTask());
   EXPECT_EQ(0u, event_queue().size());
   EXPECT_EQ(2u, handled_tasks_.size());
-  EXPECT_EQ(kEvents.size(),
-            handled_tasks_.at(1)->taskAsEvent()->Event().size());
   EXPECT_EQ(kEvents.GetType(),
             handled_tasks_.at(1)->taskAsEvent()->Event().GetType());
   EXPECT_EQ(kEvents.dispatch_type, WebInputEvent::kBlocking);
@@ -1124,8 +1101,6 @@ TEST_F(MainThreadEventQueueTest, BlockingTouchesOutsideFling) {
   EXPECT_FALSE(main_task_runner_->HasPendingTask());
   EXPECT_EQ(0u, event_queue().size());
   EXPECT_EQ(3u, handled_tasks_.size());
-  EXPECT_EQ(kEvents.size(),
-            handled_tasks_.at(2)->taskAsEvent()->Event().size());
   EXPECT_EQ(kEvents.GetType(),
             handled_tasks_.at(2)->taskAsEvent()->Event().GetType());
   EXPECT_EQ(kEvents.dispatch_type, WebInputEvent::kBlocking);
@@ -1143,8 +1118,6 @@ TEST_F(MainThreadEventQueueTest, BlockingTouchesOutsideFling) {
   EXPECT_FALSE(main_task_runner_->HasPendingTask());
   EXPECT_EQ(0u, event_queue().size());
   EXPECT_EQ(4u, handled_tasks_.size());
-  EXPECT_EQ(kEvents.size(),
-            handled_tasks_.at(3)->taskAsEvent()->Event().size());
   EXPECT_EQ(kEvents.GetType(),
             handled_tasks_.at(3)->taskAsEvent()->Event().GetType());
   EXPECT_EQ(kEvents.dispatch_type, WebInputEvent::kBlocking);
diff --git a/content/renderer/input/widget_input_handler_manager.cc b/content/renderer/input/widget_input_handler_manager.cc
index 21a11e35ece0..eafde289309f 100644
--- a/content/renderer/input/widget_input_handler_manager.cc
+++ b/content/renderer/input/widget_input_handler_manager.cc
@@ -258,8 +258,7 @@ void WidgetInputHandlerManager::GenerateScrollBeginAndSendToMainThread(
   blink::WebGestureEvent scroll_begin =
       ui::ScrollBeginFromScrollUpdate(update_event);
 
-  DispatchNonBlockingEventToMainThread(
-      ui::WebInputEventTraits::Clone(scroll_begin), ui::LatencyInfo());
+  DispatchNonBlockingEventToMainThread(scroll_begin.Clone(), ui::LatencyInfo());
 }
 
 void WidgetInputHandlerManager::SetWhiteListedTouchAction(
diff --git a/third_party/blink/common/BUILD.gn b/third_party/blink/common/BUILD.gn
index 2461000838d2..b003d6e6db93 100644
--- a/third_party/blink/common/BUILD.gn
+++ b/third_party/blink/common/BUILD.gn
@@ -48,6 +48,7 @@ jumbo_source_set("common") {
     "indexeddb/indexeddb_key_range.cc",
     "indexeddb/indexeddb_metadata.cc",
     "input/web_gesture_event.cc",
+    "input/web_keyboard_event.cc",
     "input/web_mouse_event.cc",
     "input/web_mouse_wheel_event.cc",
     "input/web_pointer_event.cc",
diff --git a/third_party/blink/common/input/web_gesture_event.cc b/third_party/blink/common/input/web_gesture_event.cc
index 512cd96b073d..85a0dc6acb0f 100644
--- a/third_party/blink/common/input/web_gesture_event.cc
+++ b/third_party/blink/common/input/web_gesture_event.cc
@@ -6,6 +6,10 @@
 
 namespace blink {
 
+std::unique_ptr<WebInputEvent> WebGestureEvent::Clone() const {
+  return std::make_unique<WebGestureEvent>(*this);
+}
+
 float WebGestureEvent::DeltaXInRootFrame() const {
   if (type_ == WebInputEvent::kGestureScrollBegin)
     return data.scroll_begin.delta_x_hint / frame_scale_;
diff --git a/third_party/blink/common/input/web_keyboard_event.cc b/third_party/blink/common/input/web_keyboard_event.cc
new file mode 100644
index 000000000000..a75be6d05e3b
--- /dev/null
+++ b/third_party/blink/common/input/web_keyboard_event.cc
@@ -0,0 +1,13 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "third_party/blink/public/common/input/web_keyboard_event.h"
+
+namespace blink {
+
+std::unique_ptr<WebInputEvent> WebKeyboardEvent::Clone() const {
+  return std::make_unique<WebKeyboardEvent>(*this);
+}
+
+}  // namespace blink
diff --git a/third_party/blink/common/input/web_mouse_event.cc b/third_party/blink/common/input/web_mouse_event.cc
index 1942ad589062..5057d07b0afc 100644
--- a/third_party/blink/common/input/web_mouse_event.cc
+++ b/third_party/blink/common/input/web_mouse_event.cc
@@ -15,7 +15,7 @@ WebMouseEvent::WebMouseEvent(WebInputEvent::Type type,
                              int modifiers,
                              base::TimeTicks time_stamp,
                              PointerId id_param)
-    : WebInputEvent(sizeof(WebMouseEvent), type, modifiers, time_stamp),
+    : WebInputEvent(type, modifiers, time_stamp),
       WebPointerProperties(id_param,
                            WebPointerProperties::PointerType::kMouse,
                            button_param),
@@ -34,6 +34,10 @@ gfx::PointF WebMouseEvent::PositionInRootFrame() const {
          frame_translate_;
 }
 
+std::unique_ptr<WebInputEvent> WebMouseEvent::Clone() const {
+  return std::make_unique<WebMouseEvent>(*this);
+}
+
 WebMouseEvent WebMouseEvent::FlattenTransform() const {
   WebMouseEvent result = *this;
   result.FlattenTransformSelf();
diff --git a/third_party/blink/common/input/web_mouse_wheel_event.cc b/third_party/blink/common/input/web_mouse_wheel_event.cc
index 7de30cb50a63..eea98f9a5387 100644
--- a/third_party/blink/common/input/web_mouse_wheel_event.cc
+++ b/third_party/blink/common/input/web_mouse_wheel_event.cc
@@ -6,6 +6,10 @@
 
 namespace blink {
 
+std::unique_ptr<WebInputEvent> WebMouseWheelEvent::Clone() const {
+  return std::make_unique<WebMouseWheelEvent>(*this);
+}
+
 float WebMouseWheelEvent::DeltaXInRootFrame() const {
   return delta_x / frame_scale_;
 }
diff --git a/third_party/blink/common/input/web_pointer_event.cc b/third_party/blink/common/input/web_pointer_event.cc
index 3cc2213dcb27..aa09d605a7d0 100644
--- a/third_party/blink/common/input/web_pointer_event.cc
+++ b/third_party/blink/common/input/web_pointer_event.cc
@@ -30,8 +30,7 @@ WebInputEvent::Type PointerEventTypeForTouchPointState(
 
 WebPointerEvent::WebPointerEvent(const WebTouchEvent& touch_event,
                                  const WebTouchPoint& touch_point)
-    : WebInputEvent(sizeof(WebPointerEvent),
-                    PointerEventTypeForTouchPointState(touch_point.state),
+    : WebInputEvent(PointerEventTypeForTouchPointState(touch_point.state),
                     touch_event.GetModifiers(),
                     touch_event.TimeStamp()),
 
@@ -58,10 +57,7 @@ WebPointerEvent::WebPointerEvent(const WebTouchEvent& touch_event,
 
 WebPointerEvent::WebPointerEvent(WebInputEvent::Type type,
                                  const WebMouseEvent& mouse_event)
-    : WebInputEvent(sizeof(WebPointerEvent),
-                    type,
-                    mouse_event.GetModifiers(),
-                    mouse_event.TimeStamp()),
+    : WebInputEvent(type, mouse_event.GetModifiers(), mouse_event.TimeStamp()),
       WebPointerProperties(mouse_event),
       hovering(true),
       width(std::numeric_limits<float>::quiet_NaN()),
@@ -72,6 +68,10 @@ WebPointerEvent::WebPointerEvent(WebInputEvent::Type type,
   SetFrameTranslate(mouse_event.FrameTranslate());
 }
 
+std::unique_ptr<WebInputEvent> WebPointerEvent::Clone() const {
+  return std::make_unique<WebPointerEvent>(*this);
+}
+
 WebPointerEvent WebPointerEvent::CreatePointerCausesUaActionEvent(
     WebPointerProperties::PointerType type,
     base::TimeTicks time_stamp) {
diff --git a/third_party/blink/common/input/web_touch_event.cc b/third_party/blink/common/input/web_touch_event.cc
index ed4904625db1..20a55c26329a 100644
--- a/third_party/blink/common/input/web_touch_event.cc
+++ b/third_party/blink/common/input/web_touch_event.cc
@@ -6,6 +6,10 @@
 
 namespace blink {
 
+std::unique_ptr<WebInputEvent> WebTouchEvent::Clone() const {
+  return std::make_unique<WebTouchEvent>(*this);
+}
+
 WebTouchEvent WebTouchEvent::FlattenTransform() const {
   WebTouchEvent transformed_event = *this;
   for (unsigned i = 0; i < touches_length; ++i) {
diff --git a/third_party/blink/public/common/input/web_gesture_event.h b/third_party/blink/public/common/input/web_gesture_event.h
index 581955550705..947c1b601916 100644
--- a/third_party/blink/public/common/input/web_gesture_event.h
+++ b/third_party/blink/public/common/input/web_gesture_event.h
@@ -26,7 +26,7 @@ class BLINK_COMMON_EXPORT WebGestureEvent : public WebInputEvent {
     kMaxValue = kMomentum,
   };
 
-  bool is_source_touch_event_set_non_blocking;
+  bool is_source_touch_event_set_non_blocking = false;
 
   // The pointer type for the first touch point in the gesture.
   WebPointerProperties::PointerType primary_pointer_type =
@@ -38,7 +38,7 @@ class BLINK_COMMON_EXPORT WebGestureEvent : public WebInputEvent {
   // not released through a touch event (e.g. timer-released gesture events or
   // gesture events with source_device != WebGestureDevice::kTouchscreen), the
   // field contains 0. See crbug.com/618738.
-  uint32_t unique_touch_event_id;
+  uint32_t unique_touch_event_id = 0;
 
   union {
     // Tap information must be set for GestureTap, GestureTapUnconfirmed,
@@ -180,23 +180,24 @@ class BLINK_COMMON_EXPORT WebGestureEvent : public WebInputEvent {
   // Screen coordinate
   gfx::PointF position_in_screen_;
 
-  WebGestureDevice source_device_;
+  WebGestureDevice source_device_ = WebGestureDevice::kUninitialized;
 
  public:
   WebGestureEvent(Type type,
                   int modifiers,
                   base::TimeTicks time_stamp,
                   WebGestureDevice device = WebGestureDevice::kUninitialized)
-      : WebInputEvent(sizeof(WebGestureEvent), type, modifiers, time_stamp),
-        source_device_(device) {}
+      : WebInputEvent(type, modifiers, time_stamp), source_device_(device) {
+    memset(&data, 0, sizeof(data));
+  }
 
-  WebGestureEvent()
-      : WebInputEvent(sizeof(WebGestureEvent)),
-        source_device_(WebGestureDevice::kUninitialized) {}
+  WebGestureEvent() { memset(&data, 0, sizeof(data)); }
 
   const gfx::PointF& PositionInWidget() const { return position_in_widget_; }
   const gfx::PointF& PositionInScreen() const { return position_in_screen_; }
 
+  std::unique_ptr<WebInputEvent> Clone() const override;
+
   void SetPositionInWidget(const gfx::PointF& point) {
     position_in_widget_ = point;
   }
diff --git a/third_party/blink/public/common/input/web_input_event.h b/third_party/blink/public/common/input/web_input_event.h
index c137231c75f1..5d30b5eaab6a 100644
--- a/third_party/blink/public/common/input/web_input_event.h
+++ b/third_party/blink/public/common/input/web_input_event.h
@@ -42,7 +42,7 @@ namespace blink {
 
 // WebInputEvent --------------------------------------------------------------
 
-class WebInputEvent {
+class BLINK_COMMON_EXPORT WebInputEvent {
  public:
   // When we use an input method (or an input method editor), we receive
   // two events for a keypress. The former event is a keydown, which
@@ -426,61 +426,30 @@ class WebInputEvent {
   base::TimeTicks TimeStamp() const { return time_stamp_; }
   void SetTimeStamp(base::TimeTicks time_stamp) { time_stamp_ = time_stamp; }
 
-  unsigned size() const { return size_; }
-
   void SetTargetFrameMovedRecently() {
     modifiers_ |= kTargetFrameMovedRecently;
   }
 
+  virtual ~WebInputEvent() = default;
+
+  virtual std::unique_ptr<WebInputEvent> Clone() const = 0;
+
  protected:
   // The root frame scale.
-  float frame_scale_;
+  float frame_scale_ = 1;
 
   // The root frame translation (applied post scale).
   gfx::Vector2dF frame_translate_;
 
-  WebInputEvent(unsigned size,
-                Type type,
-                int modifiers,
-                base::TimeTicks time_stamp) {
-    // TODO(dtapuska): Remove this memset when we remove the chrome IPC of this
-    // struct.
-    memset(this, 0, size);
-    time_stamp_ = time_stamp;
-    size_ = size;
-    type_ = type;
-    modifiers_ = modifiers;
-#if DCHECK_IS_ON()
-    // If dcheck is on force failures if frame scale is not initialized
-    // correctly by causing DIV0.
-    frame_scale_ = 0;
-#else
-    frame_scale_ = 1;
-#endif
-  }
+  WebInputEvent(Type type, int modifiers, base::TimeTicks time_stamp)
+      : time_stamp_(time_stamp), type_(type), modifiers_(modifiers) {}
 
-  explicit WebInputEvent(unsigned size_param) {
-    // TODO(dtapuska): Remove this memset when we remove the chrome IPC of this
-    // struct.
-    memset(this, 0, size_param);
-    time_stamp_ = base::TimeTicks();
-    size_ = size_param;
-    type_ = kUndefined;
-#if DCHECK_IS_ON()
-    // If dcheck is on force failures if frame scale is not initialized
-    // correctly by causing DIV0.
-    frame_scale_ = 0;
-#else
-    frame_scale_ = 1;
-#endif
-  }
+  WebInputEvent() { time_stamp_ = base::TimeTicks(); }
 
   // Event time since platform start with microsecond resolution.
   base::TimeTicks time_stamp_;
-  // The size of this structure, for serialization.
-  unsigned size_;
-  Type type_;
-  int modifiers_;
+  Type type_ = kUndefined;
+  int modifiers_ = kNoModifiers;
 };
 
 }  // namespace blink
diff --git a/third_party/blink/public/common/input/web_keyboard_event.h b/third_party/blink/public/common/input/web_keyboard_event.h
index 18cfb20dbe32..5f38e9ec8fa0 100644
--- a/third_party/blink/public/common/input/web_keyboard_event.h
+++ b/third_party/blink/public/common/input/web_keyboard_event.h
@@ -12,7 +12,7 @@ namespace blink {
 
 // WebKeyboardEvent -----------------------------------------------------------
 
-class WebKeyboardEvent : public WebInputEvent {
+class BLINK_COMMON_EXPORT WebKeyboardEvent : public WebInputEvent {
  public:
   // Caps on string lengths so we can make them static arrays and keep
   // them PODs.
@@ -26,32 +26,32 @@ class WebKeyboardEvent : public WebInputEvent {
   // what is returned by the Windows API. For example, it should
   // store VK_SHIFT instead of VK_RSHIFT. The location information
   // should be stored in |modifiers|.
-  int windows_key_code;
+  int windows_key_code = 0;
 
   // The actual key code genenerated by the platform. The DOM spec runs
   // on Windows-equivalent codes (thus |windows_key_code| above) but it
   // doesn't hurt to have this one around.
-  int native_key_code;
+  int native_key_code = 0;
 
   // The DOM code enum of the key pressed as passed by the embedder. DOM code
   // enums are defined in ui/events/keycodes/dom/keycode_converter_data.inc.
-  int dom_code;
+  int dom_code = 0;
 
   // The DOM key enum of the key pressed as passed by the embedder. DOM
   // key enums are defined in ui/events/keycodes/dom/dom_key_data.inc.
-  int dom_key;
+  int dom_key = 0;
 
   // This identifies whether this event was tagged by the system as being a
   // "system key" event (see
   // https://docs.microsoft.com/en-us/windows/desktop/inputdev/wm-syskeydown for
   // details). Other platforms don't have this concept, but it's just
   // easier to leave it always false than ifdef.
-  bool is_system_key;
+  bool is_system_key = false;
 
   // Whether the event forms part of a browser-handled keyboard shortcut.
   // This can be used to conditionally suppress Char events after a
   // shortcut-triggering RawKeyDown goes unhandled.
-  bool is_browser_shortcut;
+  bool is_browser_shortcut = false;
 
   // |text| is the text generated by this keystroke.  |unmodified_text| is
   // |text|, but unmodified by an concurrently-held modifiers (except
@@ -59,13 +59,15 @@ class WebKeyboardEvent : public WebInputEvent {
   // Windows guarantee one character per event.  The Mac does not, but in
   // reality that's all it ever gives.  We're generous, and cap it a bit
   // longer.
-  base::char16 text[kTextLengthCap];
-  base::char16 unmodified_text[kTextLengthCap];
+  base::char16 text[kTextLengthCap] = {};
+  base::char16 unmodified_text[kTextLengthCap] = {};
 
   WebKeyboardEvent(Type type, int modifiers, base::TimeTicks time_stamp)
-      : WebInputEvent(sizeof(WebKeyboardEvent), type, modifiers, time_stamp) {}
+      : WebInputEvent(type, modifiers, time_stamp) {}
 
-  WebKeyboardEvent() : WebInputEvent(sizeof(WebKeyboardEvent)) {}
+  WebKeyboardEvent() = default;
+
+  std::unique_ptr<WebInputEvent> Clone() const override;
 
   // Please refer to bug http://b/issue?id=961192, which talks about Webkit
   // keyboard event handling changes. It also mentions the list of keys
diff --git a/third_party/blink/public/common/input/web_mouse_event.h b/third_party/blink/public/common/input/web_mouse_event.h
index 25da4f16f58a..957e83c238b9 100644
--- a/third_party/blink/public/common/input/web_mouse_event.h
+++ b/third_party/blink/public/common/input/web_mouse_event.h
@@ -20,10 +20,10 @@ class BLINK_COMMON_EXPORT WebMouseEvent : public WebInputEvent,
  public:
   static constexpr PointerId kMousePointerId = std::numeric_limits<int>::max();
 
-  int click_count;
+  int click_count = {};
 
   // Only used for contextmenu events.
-  WebMenuSourceType menu_source_type;
+  WebMenuSourceType menu_source_type = kMenuSourceNone;
 
   WebMouseEvent(Type type_param,
                 gfx::PointF position,
@@ -34,10 +34,7 @@ class BLINK_COMMON_EXPORT WebMouseEvent : public WebInputEvent,
                 base::TimeTicks time_stamp_param,
                 WebMenuSourceType menu_source_type_param = kMenuSourceNone,
                 PointerId id_param = kMousePointerId)
-      : WebInputEvent(sizeof(WebMouseEvent),
-                      type_param,
-                      modifiers_param,
-                      time_stamp_param),
+      : WebInputEvent(type_param, modifiers_param, time_stamp_param),
         WebPointerProperties(id_param,
                              PointerType::kMouse,
                              button_param,
@@ -53,13 +50,10 @@ class BLINK_COMMON_EXPORT WebMouseEvent : public WebInputEvent,
                 int modifiers_param,
                 base::TimeTicks time_stamp_param,
                 PointerId id_param = kMousePointerId)
-      : WebMouseEvent(sizeof(WebMouseEvent),
-                      type_param,
-                      modifiers_param,
-                      time_stamp_param,
-                      id_param) {}
+      : WebInputEvent(type_param, modifiers_param, time_stamp_param),
+        WebPointerProperties(id_param) {}
 
-  WebMouseEvent() : WebMouseEvent(sizeof(WebMouseEvent), kMousePointerId) {}
+  WebMouseEvent() : WebMouseEvent(kMousePointerId) {}
 
   bool FromTouch() const {
     return (GetModifiers() & kIsCompatibilityEventForTouch) != 0;
@@ -73,6 +67,8 @@ class BLINK_COMMON_EXPORT WebMouseEvent : public WebInputEvent,
                 base::TimeTicks time_stamp_param,
                 PointerId id_param = kMousePointerId);
 
+  std::unique_ptr<WebInputEvent> Clone() const override;
+
   gfx::PointF PositionInRootFrame() const;
 
   // Sets any scaled values to be their computed values and sets |frame_scale_|
@@ -80,16 +76,7 @@ class BLINK_COMMON_EXPORT WebMouseEvent : public WebInputEvent,
   WebMouseEvent FlattenTransform() const;
 
  protected:
-  WebMouseEvent(unsigned size_param, PointerId id_param)
-      : WebInputEvent(size_param), WebPointerProperties(id_param) {}
-
-  WebMouseEvent(unsigned size_param,
-                Type type,
-                int modifiers,
-                base::TimeTicks time_stamp,
-                PointerId id_param)
-      : WebInputEvent(size_param, type, modifiers, time_stamp),
-        WebPointerProperties(id_param) {}
+  WebMouseEvent(PointerId id_param) : WebPointerProperties(id_param) {}
 
   void FlattenTransformSelf();
 
diff --git a/third_party/blink/public/common/input/web_mouse_wheel_event.h b/third_party/blink/public/common/input/web_mouse_wheel_event.h
index 605740b8c01d..79697fe69e08 100644
--- a/third_party/blink/public/common/input/web_mouse_wheel_event.h
+++ b/third_party/blink/public/common/input/web_mouse_wheel_event.h
@@ -52,25 +52,25 @@ class BLINK_COMMON_EXPORT WebMouseWheelEvent : public WebMouseEvent {
     kScrollVertical
   };
 
-  float delta_x;
-  float delta_y;
-  float wheel_ticks_x;
-  float wheel_ticks_y;
+  float delta_x = 0.0f;
+  float delta_y = 0.0f;
+  float wheel_ticks_x = 0.0f;
+  float wheel_ticks_y = 0.0f;
 
-  float acceleration_ratio_x;
-  float acceleration_ratio_y;
+  float acceleration_ratio_x = 1.0f;
+  float acceleration_ratio_y = 1.0f;
 
-  Phase phase;
-  Phase momentum_phase;
+  Phase phase = kPhaseNone;
+  Phase momentum_phase = kPhaseNone;
 
-  RailsMode rails_mode;
+  RailsMode rails_mode = kRailsModeFree;
 
   // Whether the event is blocking, non-blocking, all event
   // listeners were passive or was forced to be non-blocking.
-  DispatchType dispatch_type;
+  DispatchType dispatch_type = kBlocking;
 
   // The expected result of this wheel event (if not canceled).
-  EventAction event_action;
+  EventAction event_action = EventAction::kPageZoom;
 
   // True when phase information is added in mouse_wheel_phase_handler based
   // on its timer.
@@ -80,39 +80,13 @@ class BLINK_COMMON_EXPORT WebMouseWheelEvent : public WebMouseEvent {
   // kScrollByPrecisePixel, kScrollByPixel, and kScrollByPage, as they are
   // the only values expected after converting an OS event to a
   // WebMouseWheelEvent.
-  ui::input_types::ScrollGranularity delta_units;
+  ui::input_types::ScrollGranularity delta_units =
+      ui::input_types::ScrollGranularity::kScrollByPixel;
 
   WebMouseWheelEvent(Type type, int modifiers, base::TimeTicks time_stamp)
-      : WebMouseEvent(sizeof(WebMouseWheelEvent),
-                      type,
-                      modifiers,
-                      time_stamp,
-                      kMousePointerId),
-        delta_x(0.0f),
-        delta_y(0.0f),
-        wheel_ticks_x(0.0f),
-        wheel_ticks_y(0.0f),
-        acceleration_ratio_x(1.0f),
-        acceleration_ratio_y(1.0f),
-        phase(kPhaseNone),
-        momentum_phase(kPhaseNone),
-        rails_mode(kRailsModeFree),
-        dispatch_type(kBlocking),
-        delta_units(ui::input_types::ScrollGranularity::kScrollByPixel) {}
-
-  WebMouseWheelEvent()
-      : WebMouseEvent(sizeof(WebMouseWheelEvent), kMousePointerId),
-        delta_x(0.0f),
-        delta_y(0.0f),
-        wheel_ticks_x(0.0f),
-        wheel_ticks_y(0.0f),
-        acceleration_ratio_x(1.0f),
-        acceleration_ratio_y(1.0f),
-        phase(kPhaseNone),
-        momentum_phase(kPhaseNone),
-        rails_mode(kRailsModeFree),
-        dispatch_type(kBlocking),
-        delta_units(ui::input_types::ScrollGranularity::kScrollByPixel) {}
+      : WebMouseEvent(type, modifiers, time_stamp, kMousePointerId) {}
+
+  WebMouseWheelEvent() : WebMouseEvent(kMousePointerId) {}
 
   float DeltaXInRootFrame() const;
   float DeltaYInRootFrame() const;
@@ -122,6 +96,8 @@ class BLINK_COMMON_EXPORT WebMouseWheelEvent : public WebMouseEvent {
   WebMouseWheelEvent FlattenTransform() const;
 
   bool IsCancelable() const { return dispatch_type == kBlocking; }
+
+  std::unique_ptr<WebInputEvent> Clone() const override;
 };
 
 }  // namespace blink
diff --git a/third_party/blink/public/common/input/web_pointer_event.h b/third_party/blink/public/common/input/web_pointer_event.h
index cdf6b9984dcb..efb5847eb8ec 100644
--- a/third_party/blink/public/common/input/web_pointer_event.h
+++ b/third_party/blink/public/common/input/web_pointer_event.h
@@ -21,14 +21,12 @@ namespace blink {
 class BLINK_COMMON_EXPORT WebPointerEvent : public WebInputEvent,
                                             public WebPointerProperties {
  public:
-  WebPointerEvent()
-      : WebInputEvent(sizeof(WebPointerEvent)), WebPointerProperties(0) {}
+  WebPointerEvent() : WebPointerProperties(0) {}
   WebPointerEvent(WebInputEvent::Type type_param,
                   WebPointerProperties web_pointer_properties_param,
                   float width_param,
                   float height_param)
-      : WebInputEvent(sizeof(WebPointerEvent)),
-        WebPointerProperties(web_pointer_properties_param),
+      : WebPointerProperties(web_pointer_properties_param),
         width(width_param),
         height(height_param) {
     SetType(type_param);
@@ -36,44 +34,46 @@ class BLINK_COMMON_EXPORT WebPointerEvent : public WebInputEvent,
   WebPointerEvent(const WebTouchEvent&, const WebTouchPoint&);
   WebPointerEvent(WebInputEvent::Type, const WebMouseEvent&);
 
+  std::unique_ptr<WebInputEvent> Clone() const override;
+
   static WebPointerEvent CreatePointerCausesUaActionEvent(
       WebPointerProperties::PointerType,
       base::TimeTicks time_stamp);
 
   // ------------ Touch Point Specific ------------
 
-  float rotation_angle;
+  float rotation_angle = 0.0f;
 
   // ------------ Touch Event Specific ------------
 
   // A unique identifier for the touch event. Valid ids start at one and
   // increase monotonically. Zero means an unknown id.
-  uint32_t unique_touch_event_id;
+  uint32_t unique_touch_event_id = 0;
 
   // Whether the event is blocking, non-blocking, all event
   // listeners were passive or was forced to be non-blocking.
-  DispatchType dispatch_type;
+  DispatchType dispatch_type = kBlocking;
 
   // For a single touch, this is true after the touch-point has moved beyond
   // the platform slop region. For a multitouch, this is true after any
   // touch-point has moved (by whatever amount).
-  bool moved_beyond_slop_region;
+  bool moved_beyond_slop_region = false;
 
   // Whether this touch event is a touchstart or a first touchmove event per
   // scroll.
-  bool touch_start_or_first_touch_move;
+  bool touch_start_or_first_touch_move = false;
 
   // ------------ Common fields across pointer types ------------
 
   // True if this pointer was hovering and false otherwise. False value entails
   // the event was processed as part of gesture detection and it may cause
   // scrolling.
-  bool hovering;
+  bool hovering = false;
 
   // TODO(crbug.com/736014): We need a clarified definition of the scale and
   // the coordinate space on these attributes.
-  float width;
-  float height;
+  float width = 0.0f;
+  float height = 0.0f;
 
   bool IsCancelable() const { return dispatch_type == kBlocking; }
   bool HasWidth() const { return !std::isnan(width); }
diff --git a/third_party/blink/public/common/input/web_pointer_properties.h b/third_party/blink/public/common/input/web_pointer_properties.h
index d122090fde30..c642fab9da4c 100644
--- a/third_party/blink/public/common/input/web_pointer_properties.h
+++ b/third_party/blink/public/common/input/web_pointer_properties.h
@@ -60,16 +60,10 @@ class WebPointerProperties {
       int movement_x = 0,
       int movement_y = 0)
       : id(id_param),
-        force(std::numeric_limits<float>::quiet_NaN()),
-        tilt_x(0),
-        tilt_y(0),
-        tangential_pressure(0.0f),
-        twist(0),
         button(button_param),
         pointer_type(pointer_type_param),
         movement_x(movement_x),
         movement_y(movement_y),
-        is_raw_movement_event(false),
         position_in_widget_(position_in_widget),
         position_in_screen_(position_in_screen) {}
 
@@ -96,23 +90,23 @@ class WebPointerProperties {
 
   // The valid range is [0,1], with NaN meaning pressure is not supported by
   // the input device.
-  float force;
+  float force = std::numeric_limits<float>::quiet_NaN();
 
   // Tilt of a pen stylus from surface normal as plane angles in degrees,
   // Values lie in [-90,90]. A positive tiltX is to the right and a positive
   // tiltY is towards the user.
-  int tilt_x;
-  int tilt_y;
+  int tilt_x = 0;
+  int tilt_y = 0;
 
   // The normalized tangential pressure (or barrel pressure), typically set by
   // an additional control of the stylus, which has a range of [-1,1], where 0
   // is the neutral position of the control. Always 0 if the device does not
   // support it.
-  float tangential_pressure;
+  float tangential_pressure = 0.0f;
 
   // The clockwise rotation of a pen stylus around its own major axis, in
   // degrees in the range [0,359]. Always 0 if the device does not support it.
-  int twist;
+  int twist = 0;
 
   // - For pointerup/down events, the button of pointing device that triggered
   // the event.
@@ -128,7 +122,7 @@ class WebPointerProperties {
 
   // True if this event has raw movement value from OS.
   // TODO(crbug.com/982379): Figure out how to avoid using this boolean.
-  bool is_raw_movement_event;
+  bool is_raw_movement_event = false;
 
  protected:
   // Widget coordinate, which is relative to the bound of current RenderWidget
diff --git a/third_party/blink/public/common/input/web_touch_event.h b/third_party/blink/public/common/input/web_touch_event.h
index 795976c6a8f8..9a59b3f63120 100644
--- a/third_party/blink/public/common/input/web_touch_event.h
+++ b/third_party/blink/public/common/input/web_touch_event.h
@@ -19,37 +19,37 @@ class BLINK_COMMON_EXPORT WebTouchEvent : public WebInputEvent {
   // Ash/Aura.
   enum { kTouchesLengthCap = 16 };
 
-  unsigned touches_length;
+  unsigned touches_length = 0;
   // List of all touches, regardless of state.
-  WebTouchPoint touches[kTouchesLengthCap];
+  WebTouchPoint touches[kTouchesLengthCap] = {};
 
   // Whether the event is blocking, non-blocking, all event
   // listeners were passive or was forced to be non-blocking.
-  DispatchType dispatch_type;
+  DispatchType dispatch_type = kBlocking;
 
   // For a single touch, this is true after the touch-point has moved beyond
   // the platform slop region. For a multitouch, this is true after any
   // touch-point has moved (by whatever amount).
-  bool moved_beyond_slop_region;
+  bool moved_beyond_slop_region = false;
 
   // True for events from devices like some pens that support hovering
   // over digitizer and the events are sent while the device was hovering.
-  bool hovering;
+  bool hovering = false;
 
   // Whether this touch event is a touchstart or a first touchmove event per
   // scroll.
-  bool touch_start_or_first_touch_move;
+  bool touch_start_or_first_touch_move = false;
 
   // A unique identifier for the touch event. Valid ids start at one and
   // increase monotonically. Zero means an unknown id.
-  uint32_t unique_touch_event_id;
+  uint32_t unique_touch_event_id = 0;
 
-  WebTouchEvent()
-      : WebInputEvent(sizeof(WebTouchEvent)), dispatch_type(kBlocking) {}
+  WebTouchEvent() = default;
 
   WebTouchEvent(Type type, int modifiers, base::TimeTicks time_stamp)
-      : WebInputEvent(sizeof(WebTouchEvent), type, modifiers, time_stamp),
-        dispatch_type(kBlocking) {}
+      : WebInputEvent(type, modifiers, time_stamp) {}
+
+  std::unique_ptr<WebInputEvent> Clone() const override;
 
   // Sets any scaled values to be their computed values and sets |frame_scale_|
   // back to 1 and |frame_translate_| X and Y coordinates back to 0.
diff --git a/third_party/blink/public/common/input/web_touch_point.h b/third_party/blink/public/common/input/web_touch_point.h
index de8971f66487..939142edb2bc 100644
--- a/third_party/blink/public/common/input/web_touch_point.h
+++ b/third_party/blink/public/common/input/web_touch_point.h
@@ -38,16 +38,12 @@ namespace blink {
 
 // TODO(mustaq): Unify WebTouchPoint & WebMouseEvent into WebPointerEvent.
 // crbug.com/508283
-class WebTouchPoint : public WebPointerProperties {
+class BLINK_COMMON_EXPORT WebTouchPoint : public WebPointerProperties {
  public:
   WebTouchPoint() : WebTouchPoint(WebPointerProperties(0)) {}
 
   WebTouchPoint(WebPointerProperties web_pointer_properties)
-      : WebPointerProperties(web_pointer_properties),
-        state(kStateUndefined),
-        radius_x(0),
-        radius_y(0),
-        rotation_angle(0) {}
+      : WebPointerProperties(web_pointer_properties) {}
 
   enum State {
     kStateUndefined,
@@ -59,11 +55,11 @@ class WebTouchPoint : public WebPointerProperties {
     kStateMax = kStateCancelled
   };
 
-  State state;
+  State state = kStateUndefined;
 
-  float radius_x;
-  float radius_y;
-  float rotation_angle;
+  float radius_x = 0.0f;
+  float radius_y = 0.0f;
+  float rotation_angle = 0.0f;
 };
 
 }  // namespace blink
diff --git a/third_party/blink/public/platform/web_coalesced_input_event.h b/third_party/blink/public/platform/web_coalesced_input_event.h
index bcf0359482c7..3095d0bb524d 100644
--- a/third_party/blink/public/platform/web_coalesced_input_event.h
+++ b/third_party/blink/public/platform/web_coalesced_input_event.h
@@ -42,12 +42,7 @@ class BLINK_PLATFORM_EXPORT WebCoalescedInputEvent {
   WebVector<const WebInputEvent*> GetPredictedEventsPointers() const;
 
  private:
-  struct BLINK_PLATFORM_EXPORT WebInputEventDeleter {
-    void operator()(blink::WebInputEvent*) const;
-  };
-
-  using WebScopedInputEvent =
-      std::unique_ptr<WebInputEvent, WebInputEventDeleter>;
+  using WebScopedInputEvent = std::unique_ptr<WebInputEvent>;
 
   WebScopedInputEvent MakeWebScopedInputEvent(const blink::WebInputEvent&);
 
diff --git a/third_party/blink/renderer/core/events/web_input_event_conversion.cc b/third_party/blink/renderer/core/events/web_input_event_conversion.cc
index 716617985147..fcf3fc6b4aff 100644
--- a/third_party/blink/renderer/core/events/web_input_event_conversion.cc
+++ b/third_party/blink/renderer/core/events/web_input_event_conversion.cc
@@ -120,8 +120,8 @@ unsigned ToWebInputEventModifierFrom(WebMouseEvent::Button button) {
 WebPointerEvent TransformWebPointerEvent(float frame_scale,
                                          gfx::Vector2dF frame_translate,
                                          const WebPointerEvent& event) {
-  // frameScale is default initialized in debug builds to be 0.
-  DCHECK_EQ(0, event.FrameScale());
+  // frameScale is default initialized to 1.
+  DCHECK_EQ(1, event.FrameScale());
   DCHECK_EQ(0, event.FrameTranslate().x());
   DCHECK_EQ(0, event.FrameTranslate().y());
   WebPointerEvent result = event;
diff --git a/third_party/blink/renderer/platform/exported/web_coalesced_input_event.cc b/third_party/blink/renderer/platform/exported/web_coalesced_input_event.cc
index ac42cd792eb1..21edc5fe3070 100644
--- a/third_party/blink/renderer/platform/exported/web_coalesced_input_event.cc
+++ b/third_party/blink/renderer/platform/exported/web_coalesced_input_event.cc
@@ -12,46 +12,6 @@
 
 namespace blink {
 
-namespace {
-
-struct WebInputEventDelete {
-  template <class EventType>
-  bool Execute(WebInputEvent* event) const {
-    if (!event)
-      return false;
-    DCHECK_EQ(sizeof(EventType), event->size());
-    delete static_cast<EventType*>(event);
-    return true;
-  }
-};
-
-template <typename Operator, typename ArgIn>
-bool Apply(Operator op, WebInputEvent::Type type, const ArgIn& arg_in) {
-  if (WebInputEvent::IsMouseEventType(type))
-    return op.template Execute<WebMouseEvent>(arg_in);
-  if (type == WebInputEvent::kMouseWheel)
-    return op.template Execute<WebMouseWheelEvent>(arg_in);
-  if (WebInputEvent::IsKeyboardEventType(type))
-    return op.template Execute<WebKeyboardEvent>(arg_in);
-  if (WebInputEvent::IsTouchEventType(type))
-    return op.template Execute<WebTouchEvent>(arg_in);
-  if (WebInputEvent::IsGestureEventType(type))
-    return op.template Execute<WebGestureEvent>(arg_in);
-  if (WebInputEvent::IsPointerEventType(type))
-    return op.template Execute<WebPointerEvent>(arg_in);
-
-  NOTREACHED() << "Unknown webkit event type " << type;
-  return false;
-}
-}
-
-void WebCoalescedInputEvent::WebInputEventDeleter::operator()(
-    WebInputEvent* event) const {
-  if (!event)
-    return;
-  Apply(WebInputEventDelete(), event->GetType(), event);
-}
-
 WebInputEvent* WebCoalescedInputEvent::EventPointer() {
   return event_.get();
 }
diff --git a/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl_unittest.cc b/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl_unittest.cc
index 63d7ca8fb6e6..c44eecf2c2bd 100644
--- a/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl_unittest.cc
+++ b/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl_unittest.cc
@@ -58,10 +58,13 @@ class FakeInputEvent : public blink::WebInputEvent {
  public:
   explicit FakeInputEvent(blink::WebInputEvent::Type event_type,
                           int modifiers = WebInputEvent::kNoModifiers)
-      : WebInputEvent(sizeof(FakeInputEvent),
-                      event_type,
+      : WebInputEvent(event_type,
                       modifiers,
                       WebInputEvent::GetStaticTimeStampForTests()) {}
+
+  std::unique_ptr<WebInputEvent> Clone() const override {
+    return std::make_unique<FakeInputEvent>(*this);
+  }
 };
 
 class FakeTouchEvent : public blink::WebTouchEvent {
diff --git a/ui/events/blink/compositor_thread_event_queue.cc b/ui/events/blink/compositor_thread_event_queue.cc
index f9c2b4609121..8d4e06475878 100644
--- a/ui/events/blink/compositor_thread_event_queue.cc
+++ b/ui/events/blink/compositor_thread_event_queue.cc
@@ -76,12 +76,12 @@ void CompositorThreadEventQueue::Queue(
 
   std::unique_ptr<EventWithCallback> scroll_event =
       std::make_unique<EventWithCallback>(
-          WebInputEventTraits::Clone(coalesced_events.first), oldest_latency,
+          coalesced_events.first.Clone(), oldest_latency,
           oldest_creation_timestamp, timestamp_now, nullptr);
 
   std::unique_ptr<EventWithCallback> pinch_event =
       std::make_unique<EventWithCallback>(
-          WebInputEventTraits::Clone(coalesced_events.second), oldest_latency,
+          coalesced_events.second.Clone(), oldest_latency,
           oldest_creation_timestamp, timestamp_now,
           std::move(combined_original_events));
 
diff --git a/ui/events/blink/event_with_callback.cc b/ui/events/blink/event_with_callback.cc
index cbed00131204..c3c685dbae2c 100644
--- a/ui/events/blink/event_with_callback.cc
+++ b/ui/events/blink/event_with_callback.cc
@@ -19,7 +19,7 @@ EventWithCallback::EventWithCallback(
     const LatencyInfo& latency,
     base::TimeTicks timestamp_now,
     InputHandlerProxy::EventDispositionCallback callback)
-    : event_(WebInputEventTraits::Clone(*event)),
+    : event_(event->Clone()),
       latency_(latency),
       creation_timestamp_(timestamp_now),
       last_coalesced_timestamp_(timestamp_now) {
diff --git a/ui/events/blink/input_handler_proxy_unittest.cc b/ui/events/blink/input_handler_proxy_unittest.cc
index cf89aaa43cf7..9b2b867f2944 100644
--- a/ui/events/blink/input_handler_proxy_unittest.cc
+++ b/ui/events/blink/input_handler_proxy_unittest.cc
@@ -94,7 +94,7 @@ WebScopedInputEvent CreateGestureScrollPinch(WebInputEvent::Type type,
     gesture.data.pinch_update.scale = delta_y_or_scale;
     gesture.SetPositionInWidget(gfx::PointF(x, y));
   }
-  return WebInputEventTraits::Clone(gesture);
+  return gesture.Clone();
 }
 
 class MockInputHandler : public cc::InputHandler {
@@ -2640,14 +2640,14 @@ class InputHandlerProxyMomentumScrollJankTest : public testing::Test {
     WebGestureEvent gesture(WebInputEvent::kGestureScrollBegin,
                             WebInputEvent::kNoModifiers, tick_clock_.NowTicks(),
                             blink::WebGestureDevice::kTouchscreen);
-    HandleGesture(WebInputEventTraits::Clone(gesture));
+    HandleGesture(gesture.Clone());
   }
 
   void HandleScrollEnd() {
     WebGestureEvent gesture(WebInputEvent::kGestureScrollEnd,
                             WebInputEvent::kNoModifiers, tick_clock_.NowTicks(),
                             blink::WebGestureDevice::kTouchscreen);
-    HandleGesture(WebInputEventTraits::Clone(gesture));
+    HandleGesture(gesture.Clone());
   }
 
   void HandleScrollUpdate(bool is_momentum) {
@@ -2659,7 +2659,7 @@ class InputHandlerProxyMomentumScrollJankTest : public testing::Test {
       gesture.data.scroll_update.inertial_phase =
           blink::WebGestureEvent::InertialPhaseState::kMomentum;
     }
-    HandleGesture(WebInputEventTraits::Clone(gesture));
+    HandleGesture(gesture.Clone());
   }
 
   void AdvanceClock(uint32_t milliseconds) {
diff --git a/ui/events/blink/scroll_predictor_unittest.cc b/ui/events/blink/scroll_predictor_unittest.cc
index cbf1b8830690..e8409d23eb4a 100644
--- a/ui/events/blink/scroll_predictor_unittest.cc
+++ b/ui/events/blink/scroll_predictor_unittest.cc
@@ -58,10 +58,10 @@ class ScrollPredictorTest : public testing::Test {
     gesture.data.scroll_update.delta_y = delta_y;
     gesture.data.scroll_update.inertial_phase = phase;
 
-    original_events_.emplace_back(WebInputEventTraits::Clone(gesture),
-                                  LatencyInfo(), base::NullCallback());
+    original_events_.emplace_back(gesture.Clone(), LatencyInfo(),
+                                  base::NullCallback());
 
-    return WebInputEventTraits::Clone(gesture);
+    return gesture.Clone();
   }
 
   void CoalesceWith(const WebScopedInputEvent& new_event,
@@ -90,7 +90,7 @@ class ScrollPredictorTest : public testing::Test {
         WebInputEvent::GetStaticTimeStampForTests() +
             base::TimeDelta::FromMillisecondsD(time_delta_in_milliseconds));
 
-    event = WebInputEventTraits::Clone(event_with_callback->event());
+    event = event_with_callback->event().Clone();
   }
 
   std::unique_ptr<ui::InputPredictor::InputData> PredictionAvailable(
@@ -203,7 +203,7 @@ TEST_F(ScrollPredictorTest, ScrollResamplingStates) {
                               WebInputEvent::kNoModifiers,
                               WebInputEvent::GetStaticTimeStampForTests(),
                               blink::WebGestureDevice::kTouchscreen);
-  WebScopedInputEvent event = WebInputEventTraits::Clone(gesture_end);
+  WebScopedInputEvent event = gesture_end.Clone();
   HandleResampleScrollEvents(event);
   EXPECT_FALSE(GetResamplingState());
 }
diff --git a/ui/events/blink/web_input_event_traits.cc b/ui/events/blink/web_input_event_traits.cc
index 9734e1d0cd9d..19bd615be35b 100644
--- a/ui/events/blink/web_input_event_traits.cc
+++ b/ui/events/blink/web_input_event_traits.cc
@@ -105,17 +105,6 @@ void ApppendEventDetails(const WebPointerEvent& event, std::string* result) {
       event.rotation_angle, event.tilt_x, event.tilt_y);
 }
 
-struct WebInputEventDelete {
-  template <class EventType>
-  bool Execute(WebInputEvent* event, void*) const {
-    if (!event)
-      return false;
-    DCHECK_EQ(sizeof(EventType), event->size());
-    delete static_cast<EventType*>(event);
-    return true;
-  }
-};
-
 struct WebInputEventToString {
   template <class EventType>
   bool Execute(const WebInputEvent& event, std::string* result) const {
@@ -129,17 +118,6 @@ struct WebInputEventToString {
   }
 };
 
-struct WebInputEventClone {
-  template <class EventType>
-  bool Execute(const WebInputEvent& event,
-               WebScopedInputEvent* scoped_event) const {
-    DCHECK_EQ(sizeof(EventType), event.size());
-    *scoped_event = WebScopedInputEvent(
-        new EventType(static_cast<const EventType&>(event)));
-    return true;
-  }
-};
-
 template <typename Operator, typename ArgIn, typename ArgOut>
 bool Apply(Operator op,
            WebInputEvent::Type type,
@@ -164,25 +142,12 @@ bool Apply(Operator op,
 
 }  // namespace
 
-void WebInputEventDeleter::operator()(WebInputEvent* event) const {
-  if (!event)
-    return;
-  void* temp = nullptr;
-  Apply(WebInputEventDelete(), event->GetType(), event, temp);
-}
-
 std::string WebInputEventTraits::ToString(const WebInputEvent& event) {
   std::string result;
   Apply(WebInputEventToString(), event.GetType(), event, &result);
   return result;
 }
 
-WebScopedInputEvent WebInputEventTraits::Clone(const WebInputEvent& event) {
-  WebScopedInputEvent scoped_event;
-  Apply(WebInputEventClone(), event.GetType(), event, &scoped_event);
-  return scoped_event;
-}
-
 bool WebInputEventTraits::ShouldBlockEventStream(const WebInputEvent& event) {
   switch (event.GetType()) {
     case WebInputEvent::kContextMenu:
diff --git a/ui/events/blink/web_input_event_traits.h b/ui/events/blink/web_input_event_traits.h
index 19f9db8bd44c..10f60ba4eb0b 100644
--- a/ui/events/blink/web_input_event_traits.h
+++ b/ui/events/blink/web_input_event_traits.h
@@ -14,18 +14,12 @@ class WebGestureEvent;
 
 namespace ui {
 
-struct WebInputEventDeleter {
-  void operator()(blink::WebInputEvent*) const;
-};
-
-using WebScopedInputEvent =
-    std::unique_ptr<blink::WebInputEvent, WebInputEventDeleter>;
+using WebScopedInputEvent = std::unique_ptr<blink::WebInputEvent>;
 
 // Utility class for performing operations on and with WebInputEvents.
 class WebInputEventTraits {
  public:
   static std::string ToString(const blink::WebInputEvent& event);
-  static WebScopedInputEvent Clone(const blink::WebInputEvent& event);
   static bool ShouldBlockEventStream(const blink::WebInputEvent& event);
 
   // Return uniqueTouchEventId for WebTouchEvent, otherwise return 0.
-- 
2.24.1