Bug 1453795 - Widget - Initialize member fields in classes/ structures. r=jimm

--HG--
extra : rebase_source : 594fe9396c450401fab4c17e81a3333124f27f58
This commit is contained in:
Andi-Bogdan Postelnicu 2018-06-15 17:48:51 +03:00
parent 146bb709e4
commit 8cc8f8b517
9 changed files with 32 additions and 1 deletions

View file

@ -237,11 +237,15 @@ struct NativeIMEContext final
uint64_t mOriginProcessID;
NativeIMEContext()
: mRawNativeIMEContext(0)
, mOriginProcessID(0)
{
Init(nullptr);
}
explicit NativeIMEContext(nsIWidget* aWidget)
: mRawNativeIMEContext(0)
, mOriginProcessID(0)
{
Init(aWidget);
}
@ -523,6 +527,7 @@ struct IMENotification final
{
IMENotification()
: mMessage(NOTIFY_IME_OF_NOTHING)
, mSelectionChangeData()
{
}
@ -539,6 +544,7 @@ struct IMENotification final
MOZ_IMPLICIT IMENotification(IMEMessage aMessage)
: mMessage(aMessage)
, mSelectionChangeData()
{
switch (aMessage) {
case NOTIFY_IME_OF_SELECTION_CHANGE:

View file

@ -66,6 +66,9 @@ SingleTouchData::SingleTouchData(int32_t aIdentifier,
}
SingleTouchData::SingleTouchData()
: mIdentifier(0)
, mRotationAngle(0.0)
, mForce(0.0)
{
}
@ -91,6 +94,7 @@ MultiTouchInput::MultiTouchInput(MultiTouchType aType, uint32_t aTime,
MultiTouchInput::MultiTouchInput()
: InputData(MULTITOUCH_INPUT)
, mType(MULTITOUCH_START)
, mHandledByAPZ(false)
{
}
@ -491,6 +495,7 @@ MouseInput::ToWidgetMouseEvent(nsIWidget* aWidget) const
PanGestureInput::PanGestureInput()
: InputData(PANGESTURE_INPUT)
, mType(PANGESTURE_MAYSTART)
, mLineOrPageDeltaX(0)
, mLineOrPageDeltaY(0)
, mUserDeltaMultiplierX(1.0)
@ -591,6 +596,7 @@ PanGestureInput::UserMultipliedLocalPanDisplacement() const
PinchGestureInput::PinchGestureInput()
: InputData(PINCHGESTURE_INPUT)
, mType(PINCHGESTURE_START)
{
}
@ -640,6 +646,7 @@ PinchGestureInput::TransformToLocal(const ScreenToParentLayerMatrix4x4& aTransfo
TapGestureInput::TapGestureInput()
: InputData(TAPGESTURE_INPUT)
, mType(TAPGESTURE_LONG)
{
}
@ -676,7 +683,11 @@ TapGestureInput::TransformToLocal(const ScreenToParentLayerMatrix4x4& aTransform
ScrollWheelInput::ScrollWheelInput()
: InputData(SCROLLWHEEL_INPUT)
, mDeltaType(SCROLLDELTA_LINE)
, mScrollMode(SCROLLMODE_INSTANT)
, mHandledByAPZ(false)
, mDeltaX(0.0)
, mDeltaY(0.0)
, mLineOrPageDeltaX(0)
, mLineOrPageDeltaY(0)
, mScrollSeriesNumber(0)
@ -862,6 +873,7 @@ KeyboardInput::KeyboardInput(const WidgetKeyboardEvent& aEvent)
KeyboardInput::KeyboardInput()
: InputData(KEYBOARD_INPUT)
, mType(KEY_DOWN)
, mKeyCode(0)
, mCharCode(0)
, mHandledByAPZ(false)

View file

@ -187,6 +187,7 @@ public:
protected:
WidgetPluginEvent()
: mRetargetToFocusedDocument(false)
{
}
};

View file

@ -498,6 +498,7 @@ private:
, mLineOrPageDeltaY(0)
, mScrollType(SCROLL_DEFAULT)
, mCustomizedByUserPrefs(false)
, mMayHaveMomentum(false)
, mIsMomentum(false)
, mIsNoLineOrPageDelta(false)
, mViewPortIsOverscrolled(false)

View file

@ -11,7 +11,10 @@ using namespace mozilla::widget;
NS_IMPL_ISUPPORTS(PuppetBidiKeyboard, nsIBidiKeyboard)
PuppetBidiKeyboard::PuppetBidiKeyboard() : nsIBidiKeyboard()
PuppetBidiKeyboard::PuppetBidiKeyboard()
: nsIBidiKeyboard()
, mIsLangRTL(false)
, mHaveBidiKeyboards(false)
{
}

View file

@ -93,6 +93,9 @@ PuppetWidget::PuppetWidget(TabChild* aTabChild)
, mDefaultScale(-1)
, mCursorHotspotX(0)
, mCursorHotspotY(0)
, mEnabled(false)
, mVisible(false)
, mNeedIMEStateInit(false)
, mIgnoreCompositionEvents(false)
{
// Setting 'Unknown' means "not yet cached".

View file

@ -726,6 +726,7 @@ private:
friend class mozilla::dom::PBrowserChild;
WidgetCompositionEvent()
: mOriginalMessage(eVoidEvent)
{
}
@ -1141,6 +1142,7 @@ private:
, mExpandToClusterBoundary(true)
, mSucceeded(false)
, mUseNativeLineBreak(true)
, mReason(nsISelectionListener::NO_REASON)
{
}

View file

@ -33,6 +33,7 @@ nsBaseAppShell::nsBaseAppShell()
, mRunning(false)
, mExiting(false)
, mBlockNativeEvent(false)
, mProcessedGeckoEvents(false)
{
}

View file

@ -36,6 +36,8 @@ nsPrintSettings::nsPrintSettings() :
mPrintReversed(false),
mPrintInColor(true),
mOrientation(kPortraitOrientation),
mResolution(0),
mDuplex(0),
mNumCopies(1),
mPrintToFile(false),
mOutputFormat(kOutputFormatNative),