@@ -200,7 +200,7 @@ class WebWheelEvent : public WebEvent {
200
200
PhaseMayBegin = 1 << 5 ,
201
201
};
202
202
203
- WebWheelEvent () { }
203
+ WebWheelEvent () = default ;
204
204
205
205
WebWheelEvent (Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::FloatSize& delta, const WebCore::FloatSize& wheelTicks, Granularity, OptionSet<Modifier>, WallTime timestamp);
206
206
#if PLATFORM(COCOA)
@@ -233,13 +233,13 @@ class WebWheelEvent : public WebEvent {
233
233
WebCore::IntPoint m_globalPosition;
234
234
WebCore::FloatSize m_delta;
235
235
WebCore::FloatSize m_wheelTicks;
236
- uint32_t m_granularity; // Granularity
237
- bool m_directionInvertedFromDevice;
236
+ uint32_t m_granularity { ScrollByPageWheelEvent };
237
+ bool m_directionInvertedFromDevice { false } ;
238
238
uint32_t m_phase { Phase::PhaseNone };
239
239
uint32_t m_momentumPhase { Phase::PhaseNone };
240
240
#if PLATFORM(COCOA)
241
- bool m_hasPreciseScrollingDeltas;
242
- uint32_t m_scrollCount;
241
+ bool m_hasPreciseScrollingDeltas { false } ;
242
+ uint32_t m_scrollCount { 0 } ;
243
243
WebCore::FloatSize m_unacceleratedScrollingDelta;
244
244
#endif
245
245
};
@@ -297,11 +297,11 @@ class WebKeyboardEvent : public WebEvent {
297
297
String m_key;
298
298
String m_code;
299
299
String m_keyIdentifier;
300
- int32_t m_windowsVirtualKeyCode;
301
- int32_t m_nativeVirtualKeyCode;
302
- int32_t m_macCharCode;
300
+ int32_t m_windowsVirtualKeyCode { 0 } ;
301
+ int32_t m_nativeVirtualKeyCode { 0 } ;
302
+ int32_t m_macCharCode { 0 } ;
303
303
#if USE(APPKIT) || USE(UIKIT_KEYBOARD_ADDITIONS) || PLATFORM(GTK) || USE(LIBWPE)
304
- bool m_handledByInputMethod;
304
+ bool m_handledByInputMethod { false } ;
305
305
#endif
306
306
#if PLATFORM(GTK) || USE(LIBWPE)
307
307
Optional<Vector<WebCore::CompositionUnderline>> m_preeditUnderlines;
@@ -312,9 +312,9 @@ class WebKeyboardEvent : public WebEvent {
312
312
#elif PLATFORM(GTK)
313
313
Vector<String> m_commands;
314
314
#endif
315
- bool m_isAutoRepeat;
316
- bool m_isKeypad;
317
- bool m_isSystemKey;
315
+ bool m_isAutoRepeat { false } ;
316
+ bool m_isKeypad { false } ;
317
+ bool m_isSystemKey { false } ;
318
318
};
319
319
320
320
#if ENABLE(TOUCH_EVENTS)
@@ -334,7 +334,7 @@ class WebPlatformTouchPoint {
334
334
Stylus
335
335
};
336
336
337
- WebPlatformTouchPoint () { }
337
+ WebPlatformTouchPoint () = default ;
338
338
WebPlatformTouchPoint (unsigned identifier, WebCore::IntPoint location, TouchPointState phase)
339
339
: m_identifier(identifier)
340
340
, m_location(location)
@@ -368,9 +368,9 @@ class WebPlatformTouchPoint {
368
368
static Optional<WebPlatformTouchPoint> decode (IPC::Decoder&);
369
369
370
370
private:
371
- unsigned m_identifier;
371
+ unsigned m_identifier { 0 } ;
372
372
WebCore::IntPoint m_location;
373
- uint32_t m_phase;
373
+ uint32_t m_phase { TouchReleased } ;
374
374
#if ENABLE(IOS_TOUCH_EVENTS)
375
375
double m_radiusX { 0 };
376
376
double m_radiusY { 0 };
@@ -384,7 +384,7 @@ class WebPlatformTouchPoint {
384
384
385
385
class WebTouchEvent : public WebEvent {
386
386
public:
387
- WebTouchEvent () { }
387
+ WebTouchEvent () = default ;
388
388
WebTouchEvent (WebEvent::Type type, OptionSet<Modifier> modifiers, WallTime timestamp, const Vector<WebPlatformTouchPoint>& touchPoints, WebCore::IntPoint position, bool isPotentialTap, bool isGesture, float gestureScale, float gestureRotation)
389
389
: WebEvent(type, modifiers, timestamp)
390
390
, m_touchPoints(touchPoints)
@@ -420,11 +420,11 @@ class WebTouchEvent : public WebEvent {
420
420
Vector<WebPlatformTouchPoint> m_touchPoints;
421
421
422
422
WebCore::IntPoint m_position;
423
- bool m_canPreventNativeGestures;
424
- bool m_isPotentialTap;
425
- bool m_isGesture;
426
- float m_gestureScale;
427
- float m_gestureRotation;
423
+ bool m_canPreventNativeGestures { false } ;
424
+ bool m_isPotentialTap { false } ;
425
+ bool m_isGesture { false } ;
426
+ float m_gestureScale { 0 } ;
427
+ float m_gestureRotation { 0 } ;
428
428
};
429
429
#else
430
430
// FIXME: Move this class to its own header file.
0 commit comments