diff --git a/dom/smil/nsSMILKeySpline.h b/dom/smil/nsSMILKeySpline.h index 36c14fec1fef..c651c278fa5c 100644 --- a/dom/smil/nsSMILKeySpline.h +++ b/dom/smil/nsSMILKeySpline.h @@ -16,7 +16,14 @@ class nsSMILKeySpline { public: - nsSMILKeySpline() { /* caller must call Init later */ } + nsSMILKeySpline() + : mX1(0) + , mY1(0) + , mX2(0) + , mY2(0) + { + /* caller must call Init later */\ + } /** * Creates a new key spline control point description. @@ -26,6 +33,10 @@ public: */ nsSMILKeySpline(double aX1, double aY1, double aX2, double aY2) + : mX1(0) + , mY1(0) + , mX2(0) + , mY2(0) { Init(aX1, aY1, aX2, aY2); } diff --git a/dom/smil/nsSMILValue.cpp b/dom/smil/nsSMILValue.cpp index e5f904bb591e..fe67af84f2f9 100644 --- a/dom/smil/nsSMILValue.cpp +++ b/dom/smil/nsSMILValue.cpp @@ -14,6 +14,7 @@ nsSMILValue::nsSMILValue(const nsISMILType* aType) : mType(nsSMILNullType::Singleton()) { + mU.mBool = false; if (!aType) { NS_ERROR("Trying to construct nsSMILValue with null mType pointer"); return; diff --git a/dom/svg/DOMSVGPathSegList.h b/dom/svg/DOMSVGPathSegList.h index 5683f5f6dd33..84bb5ef036fb 100644 --- a/dom/svg/DOMSVGPathSegList.h +++ b/dom/svg/DOMSVGPathSegList.h @@ -230,7 +230,10 @@ private: * want to create the DOMSVGPathSeg items lazily on demand. */ struct ItemProxy { - ItemProxy(){} + ItemProxy() + : mItem(nullptr) + , mInternalDataIndex(0) + {} ItemProxy(DOMSVGPathSeg *aItem, uint32_t aInternalDataIndex) : mItem(aItem) , mInternalDataIndex(aInternalDataIndex) diff --git a/dom/svg/SVGAnimatedNumberList.h b/dom/svg/SVGAnimatedNumberList.h index 6b5e78c79c81..7300b286e51a 100644 --- a/dom/svg/SVGAnimatedNumberList.h +++ b/dom/svg/SVGAnimatedNumberList.h @@ -43,7 +43,9 @@ class SVGAnimatedNumberList friend class DOMSVGNumberList; public: - SVGAnimatedNumberList() {} + SVGAnimatedNumberList() + : mIsBaseSet(false) + {} /** * Because it's so important that mBaseVal and its DOMSVGNumberList wrapper diff --git a/dom/svg/SVGGeometryElement.h b/dom/svg/SVGGeometryElement.h index cef22975dade..54a7ea61412e 100644 --- a/dom/svg/SVGGeometryElement.h +++ b/dom/svg/SVGGeometryElement.h @@ -112,7 +112,11 @@ public: { public: SimplePath() - : mType(NONE) + : mX(0.0) + , mY(0.0) + , mWidthOrX2(0.0) + , mHeightOrY2(0.0) + , mType(NONE) {} bool IsPath() const { return mType != NONE; diff --git a/dom/svg/SVGLength.h b/dom/svg/SVGLength.h index 12757aa4fb58..6f4847be184e 100644 --- a/dom/svg/SVGLength.h +++ b/dom/svg/SVGLength.h @@ -33,10 +33,8 @@ class SVGLength public: SVGLength() -#ifdef DEBUG : mValue(0.0f) , mUnit(dom::SVGLengthBinding::SVG_LENGTHTYPE_UNKNOWN) // caught by IsValid() -#endif {} SVGLength(float aValue, uint8_t aUnit) diff --git a/dom/svg/SVGLengthList.h b/dom/svg/SVGLengthList.h index f9c8bd35613f..f74fb5ba6cf3 100644 --- a/dom/svg/SVGLengthList.h +++ b/dom/svg/SVGLengthList.h @@ -311,6 +311,8 @@ public: SVGUserUnitList() : mList(nullptr) + , mElement(nullptr) + , mAxis(0) {} void Init(const SVGLengthList *aList, nsSVGElement *aElement, uint8_t aAxis) { diff --git a/dom/svg/SVGMotionSMILType.cpp b/dom/svg/SVGMotionSMILType.cpp index 4b29f882a72f..524d4672bd7e 100644 --- a/dom/svg/SVGMotionSMILType.cpp +++ b/dom/svg/SVGMotionSMILType.cpp @@ -64,7 +64,10 @@ struct MotionSegment // Default constructor just locks us into being a Translation, and leaves // other fields uninitialized (since client is presumably about to set them) MotionSegment() - : mSegmentType(eSegmentType_Translation) + : mRotateType(eRotateType_Auto), + mRotateAngle(0.0), + mSegmentType(eSegmentType_Translation), + mU{} { } // Constructor for a translation diff --git a/dom/svg/nsSVGViewBox.h b/dom/svg/nsSVGViewBox.h index edf511e983d3..a0725a92d305 100644 --- a/dom/svg/nsSVGViewBox.h +++ b/dom/svg/nsSVGViewBox.h @@ -32,7 +32,13 @@ struct nsSVGViewBoxRect float width, height; bool none; - nsSVGViewBoxRect() : none(true) {} + nsSVGViewBoxRect() + : x(0.0) + , y(0.0) + , width(0.0) + , height(0.0) + , none(true) + {} nsSVGViewBoxRect(float aX, float aY, float aWidth, float aHeight) : x(aX), y(aY), width(aWidth), height(aHeight), none(false) {} nsSVGViewBoxRect(const nsSVGViewBoxRect& rhs) : diff --git a/layout/svg/SVGContextPaint.h b/layout/svg/SVGContextPaint.h index 9beba95adb68..277d67df5537 100644 --- a/layout/svg/SVGContextPaint.h +++ b/layout/svg/SVGContextPaint.h @@ -190,7 +190,10 @@ public: float GetStrokeOpacity() const override { return mStrokeOpacity; } struct Paint { - Paint() : mPaintType(eStyleSVGPaintType_None) {} + Paint() + : mPaintDefinition{} + , mPaintType(eStyleSVGPaintType_None) + {} void SetPaintServer(nsIFrame* aFrame, const gfxMatrix& aContextMatrix, diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp index 8aaafcfae26c..f75fbc24867b 100644 --- a/layout/svg/SVGTextFrame.cpp +++ b/layout/svg/SVGTextFrame.cpp @@ -2439,10 +2439,12 @@ CharIterator::CharIterator(SVGTextFrame* aSVGTextFrame, mFrameForTrimCheck(nullptr), mTrimmedOffset(0), mTrimmedLength(0), + mTextRun(nullptr), mTextElementCharIndex(0), mGlyphStartTextElementCharIndex(0), - mLengthAdjustScaleFactor(aSVGTextFrame->mLengthAdjustScaleFactor) - , mPostReflow(aPostReflow) + mGlyphUndisplayedCharacters(0), + mLengthAdjustScaleFactor(aSVGTextFrame->mLengthAdjustScaleFactor), + mPostReflow(aPostReflow) { if (!AtEnd()) { mSkipCharsIterator = TextFrame()->EnsureTextRun(nsTextFrame::eInflated); @@ -2772,7 +2774,8 @@ public: mContext(aContext), mFrame(aFrame), mCanvasTM(aCanvasTM), - mImgParams(aImgParams) + mImgParams(aImgParams), + mColor(0) { }