Bug 1453795 - Layout/MatchML - Initialize member fields in classes/ structures. r=karlt
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Thu, 14 Jun 2018 08:54:18 +0300
changeset 476742 01fb8307daafc8160fd2eb2a0ce1d44df64ad5e0
parent 476741 99917d1409c200ca6a1fa35894895d89340deb09
child 476743 91db0c695f0272f00bf92c81c471a85101056d96
child 476754 85ff6d02c6a76e4818d3803d1f737eec180e0b50
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs1453795
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1453795 - Layout/MatchML - Initialize member fields in classes/ structures. r=karlt
layout/mathml/nsMathMLChar.cpp
layout/mathml/nsMathMLChar.h
layout/mathml/nsMathMLContainerFrame.cpp
--- a/layout/mathml/nsMathMLChar.cpp
+++ b/layout/mathml/nsMathMLChar.cpp
@@ -455,18 +455,20 @@ public:
   }
 
 private:
   RefPtr<gfxFont> mFont;
   FontFamilyName mFontFamilyName;
   uint32_t mGlyphID;
 
   explicit nsOpenTypeTable(gfxFont* aFont)
-    : mFont(aFont),
-    mFontFamilyName(aFont->GetFontEntry()->FamilyName(), eUnquotedName) {
+    : mFont(aFont)
+    , mFontFamilyName(aFont->GetFontEntry()->FamilyName(), eUnquotedName)
+    , mGlyphID(0)
+  {
     MOZ_COUNT_CTOR(nsOpenTypeTable);
   }
 
   void UpdateCache(DrawTarget*   aDrawTarget,
                    int32_t       aAppUnitsPerDevPixel,
                    gfxFontGroup* aFontGroup,
                    char16_t      aChar);
 };
--- a/layout/mathml/nsMathMLChar.h
+++ b/layout/mathml/nsMathMLChar.h
@@ -87,17 +87,19 @@ struct nsGlyphCode {
 // symbols).
 class nsMathMLChar
 {
 public:
   typedef gfxTextRun::Range Range;
   typedef mozilla::gfx::DrawTarget DrawTarget;
 
   // constructor and destructor
-  nsMathMLChar() {
+  nsMathMLChar()
+    : mDirection(NS_STRETCH_DIRECTION_DEFAULT)
+  {
     MOZ_COUNT_CTOR(nsMathMLChar);
     mComputedStyle = nullptr;
     mUnscaledAscent = 0;
     mScaleX = mScaleY = 1.0;
     mDraw = DRAW_NORMAL;
     mMirrored = false;
   }
 
--- a/layout/mathml/nsMathMLContainerFrame.cpp
+++ b/layout/mathml/nsMathMLContainerFrame.cpp
@@ -1158,23 +1158,24 @@ GetInterFrameSpacing(int32_t           a
 
 static nscoord GetThinSpace(const nsStyleFont* aStyleFont)
 {
   return NSToCoordRound(float(aStyleFont->mFont.size)*float(3) / float(18));
 }
 
 class nsMathMLContainerFrame::RowChildFrameIterator {
 public:
-  explicit RowChildFrameIterator(nsMathMLContainerFrame* aParentFrame) :
-    mParentFrame(aParentFrame),
-    mReflowOutput(aParentFrame->GetWritingMode()),
-    mX(0),
-    mCarrySpace(0),
-    mFromFrameType(eMathMLFrameType_UNKNOWN),
-    mRTL(aParentFrame->StyleVisibility()->mDirection)
+  explicit RowChildFrameIterator(nsMathMLContainerFrame* aParentFrame)
+    : mParentFrame(aParentFrame)
+    , mReflowOutput(aParentFrame->GetWritingMode())
+    , mX(0)
+    , mChildFrameType(eMathMLFrameType_UNKNOWN)
+    , mCarrySpace(0)
+    , mFromFrameType(eMathMLFrameType_UNKNOWN)
+    , mRTL(aParentFrame->StyleVisibility()->mDirection)
   {
     if (!mRTL) {
       mChildFrame = aParentFrame->mFrames.FirstChild();
     } else {
       mChildFrame = aParentFrame->mFrames.LastChild();
     }
 
     if (!mChildFrame)