Bug 1060985 - Fix more bad implicit constructors in layout; r=roc
authorEhsan Akhgari <ehsan@mozilla.com>
Sun, 31 Aug 2014 23:36:37 -0400
changeset 217184 9d4e083655b993f73ba3eca84e0f14cdd270bcda
parent 217183 bb7c757ff1f56cdbd12d8838010eca7e4b4d67a9
child 217185 971f1ff8f6bac45843f7174121e4936f6e104c5c
push id6741
push userraliiev@mozilla.com
push dateTue, 02 Sep 2014 16:57:58 +0000
treeherdermozilla-aurora@aed50d3edf33 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1060985
milestone34.0a1
Bug 1060985 - Fix more bad implicit constructors in layout; r=roc
layout/base/ActiveLayerTracker.cpp
layout/base/FrameLayerBuilder.cpp
layout/base/MaskLayerImageCache.h
layout/base/RestyleManager.h
layout/base/RestyleTracker.h
layout/base/nsBidiPresUtils.h
layout/base/nsCSSFrameConstructor.cpp
layout/base/nsCSSFrameConstructor.h
layout/base/nsCounterManager.cpp
layout/base/nsDisplayList.cpp
layout/base/nsFrameManager.cpp
layout/base/nsGenConList.h
layout/base/nsPresShell.cpp
layout/base/nsPresShell.h
layout/base/nsRefreshDriver.cpp
layout/forms/nsColorControlFrame.h
layout/forms/nsComboboxControlFrame.cpp
layout/forms/nsComboboxControlFrame.h
layout/forms/nsFieldSetFrame.h
layout/forms/nsFileControlFrame.h
layout/forms/nsFormControlFrame.h
layout/forms/nsGfxButtonControlFrame.h
layout/forms/nsGfxCheckboxControlFrame.h
layout/forms/nsGfxRadioControlFrame.h
layout/forms/nsHTMLButtonControlFrame.h
layout/forms/nsImageControlFrame.cpp
layout/forms/nsLegendFrame.h
layout/forms/nsListControlFrame.cpp
layout/forms/nsMeterFrame.h
layout/forms/nsNumberControlFrame.h
layout/forms/nsProgressFrame.h
layout/forms/nsRangeFrame.h
layout/forms/nsSelectsAreaFrame.h
layout/forms/nsTextControlFrame.h
layout/generic/ScrollbarActivity.h
layout/generic/StickyScrollContainer.h
layout/generic/TextOverflow.cpp
layout/generic/nsAbsoluteContainingBlock.h
layout/generic/nsBRFrame.cpp
layout/generic/nsBlockFrame.h
layout/generic/nsBulletFrame.h
layout/generic/nsCanvasFrame.h
layout/generic/nsColumnSetFrame.h
layout/generic/nsFirstLetterFrame.h
layout/generic/nsFlexContainerFrame.cpp
layout/generic/nsFlexContainerFrame.h
layout/generic/nsFloatManager.h
layout/generic/nsFontInflationData.h
layout/generic/nsFrame.cpp
layout/generic/nsFrameSetFrame.cpp
layout/generic/nsFrameSetFrame.h
layout/generic/nsGfxScrollFrame.cpp
layout/generic/nsGfxScrollFrame.h
layout/generic/nsGridContainerFrame.h
layout/generic/nsHTMLCanvasFrame.h
layout/generic/nsIAnonymousContentCreator.h
layout/generic/nsILineIterator.h
layout/generic/nsImageFrame.h
layout/generic/nsImageMap.cpp
layout/generic/nsInlineFrame.h
layout/generic/nsLineBox.h
layout/generic/nsLineLayout.h
layout/generic/nsObjectFrame.h
layout/generic/nsPageContentFrame.h
layout/generic/nsPageFrame.h
layout/generic/nsRubyBaseContainerFrame.h
layout/generic/nsRubyBaseFrame.h
layout/generic/nsRubyFrame.h
layout/generic/nsRubyTextContainerFrame.h
layout/generic/nsRubyTextFrame.h
layout/generic/nsSelection.cpp
layout/generic/nsSimplePageSequenceFrame.h
layout/generic/nsSubDocumentFrame.cpp
layout/generic/nsTextFrame.cpp
layout/generic/nsTextFrame.h
layout/generic/nsVideoFrame.cpp
layout/generic/nsVideoFrame.h
layout/generic/nsViewportFrame.h
layout/inspector/inDOMView.cpp
layout/inspector/inSearchLoop.h
layout/ipc/RenderFrameParent.cpp
layout/mathml/nsMathMLContainerFrame.h
layout/mathml/nsMathMLSelectedFrame.h
layout/mathml/nsMathMLTokenFrame.h
layout/mathml/nsMathMLmactionFrame.h
layout/mathml/nsMathMLmencloseFrame.h
layout/mathml/nsMathMLmfencedFrame.h
layout/mathml/nsMathMLmfracFrame.h
layout/mathml/nsMathMLmmultiscriptsFrame.h
layout/mathml/nsMathMLmoFrame.h
layout/mathml/nsMathMLmpaddedFrame.h
layout/mathml/nsMathMLmphantomFrame.h
layout/mathml/nsMathMLmrootFrame.h
layout/mathml/nsMathMLmrowFrame.h
layout/mathml/nsMathMLmspaceFrame.h
layout/mathml/nsMathMLmsqrtFrame.h
layout/mathml/nsMathMLmtableFrame.h
layout/mathml/nsMathMLmunderoverFrame.h
layout/mathml/nsMathMLsemanticsFrame.h
layout/printing/nsPrintEngine.cpp
layout/printing/nsPrintPreviewListener.h
layout/style/CSSStyleSheet.cpp
layout/style/CSSVariableResolver.cpp
layout/style/CSSVariableResolver.h
layout/style/CounterStyleManager.cpp
layout/style/ImageLoader.h
layout/style/StyleRule.cpp
layout/style/nsCSSDataBlock.h
layout/style/nsCSSParser.cpp
layout/style/nsCSSParser.h
layout/style/nsCSSRuleProcessor.cpp
layout/style/nsCSSRules.cpp
layout/style/nsCSSRules.h
layout/style/nsFontFaceLoader.h
layout/style/nsHTMLStyleSheet.h
layout/style/nsIMediaList.h
layout/style/nsRuleProcessorData.h
layout/style/nsTransitionManager.h
layout/svg/SVGFEContainerFrame.cpp
layout/svg/SVGFEImageFrame.cpp
layout/svg/SVGFELeafFrame.cpp
layout/svg/SVGFEUnstyledLeafFrame.cpp
layout/svg/SVGTextFrame.cpp
layout/svg/SVGTextFrame.h
layout/svg/SVGViewFrame.cpp
layout/svg/nsSVGAFrame.cpp
layout/svg/nsSVGClipPathFrame.h
layout/svg/nsSVGContainerFrame.h
layout/svg/nsSVGEffects.h
layout/svg/nsSVGFilterFrame.cpp
layout/svg/nsSVGFilterFrame.h
layout/svg/nsSVGForeignObjectFrame.h
layout/svg/nsSVGGFrame.h
layout/svg/nsSVGGenericContainerFrame.h
layout/svg/nsSVGGradientFrame.cpp
layout/svg/nsSVGGradientFrame.h
layout/svg/nsSVGImageFrame.cpp
layout/svg/nsSVGInnerSVGFrame.h
layout/svg/nsSVGMarkerFrame.h
layout/svg/nsSVGMaskFrame.h
layout/svg/nsSVGOuterSVGFrame.h
layout/svg/nsSVGPaintServerFrame.h
layout/svg/nsSVGPathGeometryFrame.h
layout/svg/nsSVGPatternFrame.cpp
layout/svg/nsSVGPatternFrame.h
layout/svg/nsSVGStopFrame.cpp
layout/svg/nsSVGSwitchFrame.cpp
layout/svg/nsSVGUseFrame.cpp
layout/tables/BasicTableLayoutStrategy.h
layout/tables/FixedTableLayoutStrategy.h
layout/tables/celldata.h
layout/tables/nsITableLayoutStrategy.h
layout/tables/nsTableCellFrame.h
layout/tables/nsTableColFrame.h
layout/tables/nsTableColGroupFrame.h
layout/tables/nsTableFrame.cpp
layout/tables/nsTableFrame.h
layout/tables/nsTableOuterFrame.h
layout/tables/nsTableRowFrame.h
layout/tables/nsTableRowGroupFrame.h
layout/xul/grid/nsGridLayout2.h
layout/xul/nsBoxFrame.cpp
layout/xul/nsBoxLayoutState.h
layout/xul/nsListBoxBodyFrame.cpp
layout/xul/nsMenuBarListener.h
layout/xul/nsMenuFrame.cpp
layout/xul/nsMenuFrame.h
layout/xul/nsProgressMeterFrame.cpp
layout/xul/nsSliderFrame.h
layout/xul/nsSplitterFrame.cpp
layout/xul/nsTextBoxFrame.cpp
layout/xul/nsXULLabelFrame.h
layout/xul/tree/nsTreeBodyFrame.cpp
layout/xul/tree/nsTreeBodyFrame.h
layout/xul/tree/nsTreeColumns.h
layout/xul/tree/nsTreeImageListener.h
layout/xul/tree/nsTreeSelection.h
--- a/layout/base/ActiveLayerTracker.cpp
+++ b/layout/base/ActiveLayerTracker.cpp
@@ -22,17 +22,17 @@ namespace mozilla {
  * When no changes of *any* kind are detected after 75-100ms we remove this
  * object. Because we only track all kinds of activity with a single
  * nsExpirationTracker, it's possible a frame might remain active somewhat
  * spuriously if different kinds of changes kept happening, but that almost
  * certainly doesn't matter.
  */
 class LayerActivity {
 public:
-  LayerActivity(nsIFrame* aFrame)
+  explicit LayerActivity(nsIFrame* aFrame)
     : mFrame(aFrame)
     , mContent(nullptr)
     , mOpacityRestyleCount(0)
     , mTransformRestyleCount(0)
     , mLeftRestyleCount(0)
     , mTopRestyleCount(0)
     , mRightRestyleCount(0)
     , mBottomRestyleCount(0)
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -179,17 +179,17 @@ FrameLayerBuilder::DisplayItemData::GetF
   return mFrameListChanges;
 }
 
 /**
  * This is the userdata we associate with a layer manager.
  */
 class LayerManagerData : public LayerUserData {
 public:
-  LayerManagerData(LayerManager *aManager)
+  explicit LayerManagerData(LayerManager *aManager)
     : mLayerManager(aManager)
 #ifdef DEBUG_DISPLAY_ITEM_DATA
     , mParent(nullptr)
 #endif
     , mInvalidateAllLayers(false)
   {
     MOZ_COUNT_CTOR(LayerManagerData);
   }
--- a/layout/base/MaskLayerImageCache.h
+++ b/layout/base/MaskLayerImageCache.h
@@ -181,17 +181,17 @@ public:
 protected:
 
   class MaskLayerImageEntry : public PLDHashEntryHdr
   {
   public:
     typedef const MaskLayerImageKey& KeyType;
     typedef const MaskLayerImageKey* KeyTypePointer;
 
-    MaskLayerImageEntry(KeyTypePointer aKey)
+    explicit MaskLayerImageEntry(KeyTypePointer aKey)
       : mKey(aKey)
     {
       MOZ_COUNT_CTOR(MaskLayerImageEntry);
     }
     MaskLayerImageEntry(const MaskLayerImageEntry& aOther)
       : mKey(aOther.mKey.get())
     {
       NS_ERROR("ALLOW_MEMMOVE == true, should never be called");
--- a/layout/base/RestyleManager.h
+++ b/layout/base/RestyleManager.h
@@ -32,17 +32,17 @@ namespace dom {
 
 class RestyleManager MOZ_FINAL {
 public:
   friend class ::nsRefreshDriver;
   friend class RestyleTracker;
 
   typedef mozilla::dom::Element Element;
 
-  RestyleManager(nsPresContext* aPresContext);
+  explicit RestyleManager(nsPresContext* aPresContext);
 
 private:
   // Private destructor, to discourage deletion outside of Release():
   ~RestyleManager()
   {
     MOZ_ASSERT(!mReframingStyleContexts,
                "temporary member should be nulled out before destruction");
   }
--- a/layout/base/RestyleTracker.h
+++ b/layout/base/RestyleTracker.h
@@ -228,17 +228,17 @@ private:
 };
 
 class RestyleTracker {
 public:
   typedef mozilla::dom::Element Element;
 
   friend class ElementRestyler; // for AddPendingRestyleToTable
 
-  RestyleTracker(Element::FlagsType aRestyleBits) :
+  explicit RestyleTracker(Element::FlagsType aRestyleBits) :
     mRestyleBits(aRestyleBits),
     mHaveLaterSiblingRestyles(false)
   {
     NS_PRECONDITION((mRestyleBits & ~ELEMENT_ALL_RESTYLE_FLAGS) == 0,
                     "Why do we have these bits set?");
     NS_PRECONDITION((mRestyleBits & ELEMENT_PENDING_RESTYLE_FLAGS) != 0,
                     "Must have a restyle flag");
     NS_PRECONDITION((mRestyleBits & ELEMENT_PENDING_RESTYLE_FLAGS) !=
--- a/layout/base/nsBidiPresUtils.h
+++ b/layout/base/nsBidiPresUtils.h
@@ -29,17 +29,17 @@ namespace mozilla { class WritingMode; }
 
 /**
  * A structure representing some continuation state for each frame on the line,
  * used to determine the first and the last continuation frame for each
  * continuation chain on the line.
  */
 struct nsFrameContinuationState : public nsVoidPtrHashKey
 {
-  nsFrameContinuationState(const void *aFrame) : nsVoidPtrHashKey(aFrame) {}
+  explicit nsFrameContinuationState(const void *aFrame) : nsVoidPtrHashKey(aFrame) {}
 
   /**
    * The first visual frame in the continuation chain containing this frame, or
    * nullptr if this frame is the first visual frame in the chain.
    */
   nsIFrame* mFirstVisualFrame;
 
   /**
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -667,17 +667,17 @@ nsFrameItems::AddChild(nsIFrame* aChild)
 // -----------------------------------------------------------
 
 // Structure used when constructing formatting object trees. Contains
 // state information needed for absolutely positioned elements
 struct nsAbsoluteItems : nsFrameItems {
   // containing block for absolutely positioned elements
   nsContainerFrame* containingBlock;
 
-  nsAbsoluteItems(nsContainerFrame* aContainingBlock);
+  explicit nsAbsoluteItems(nsContainerFrame* aContainingBlock);
 #ifdef DEBUG
   // XXXbz Does this need a debug-only assignment operator that nulls out the
   // childList in the nsAbsoluteItems we're copying?  Introducing a difference
   // between debug and non-debug behavior seems bad, so I guess not...
   ~nsAbsoluteItems() {
     NS_ASSERTION(!FirstChild(),
                  "Dangling child list.  Someone forgot to insert it?");
   }
--- a/layout/base/nsCSSFrameConstructor.h
+++ b/layout/base/nsCSSFrameConstructor.h
@@ -758,17 +758,17 @@ private:
     void BlockItemAdded() { ++mBlockCount; }
     void LineParticipantItemAdded() { ++mLineParticipantCount; }
 
     class Iterator;
     friend class Iterator;
 
     class Iterator {
     public:
-      Iterator(FrameConstructionItemList& list) :
+      explicit Iterator(FrameConstructionItemList& list) :
         mCurrent(PR_NEXT_LINK(&list.mItems)),
         mEnd(&list.mItems),
         mList(list)
       {}
       Iterator(const Iterator& aOther) :
         mCurrent(aOther.mCurrent),
         mEnd(aOther.mEnd),
         mList(aOther.mList)
--- a/layout/base/nsCounterManager.cpp
+++ b/layout/base/nsCounterManager.cpp
@@ -307,17 +307,17 @@ SetCounterStylesDirty(const nsAString& a
 
 void
 nsCounterManager::SetAllCounterStylesDirty()
 {
     mNames.EnumerateRead(SetCounterStylesDirty, nullptr);
 }
 
 struct DestroyNodesData {
-    DestroyNodesData(nsIFrame *aFrame)
+    explicit DestroyNodesData(nsIFrame *aFrame)
         : mFrame(aFrame)
         , mDestroyedAny(false)
     {
     }
 
     nsIFrame *mFrame;
     bool mDestroyedAny;
 };
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -1436,17 +1436,17 @@ IsFrameReceivingPointerEvents(nsIFrame* 
   return NS_STYLE_POINTER_EVENTS_NONE !=
     aFrame->StyleVisibility()->GetEffectivePointerEvents(aFrame);
 }
 
 // A list of frames, and their z depth. Used for sorting
 // the results of hit testing.
 struct FramesWithDepth
 {
-  FramesWithDepth(float aDepth) :
+  explicit FramesWithDepth(float aDepth) :
     mDepth(aDepth)
   {}
 
   bool operator<(const FramesWithDepth& aOther) const {
     if (mDepth != aOther.mDepth) {
       // We want to sort so that the shallowest item (highest depth value) is first
       return mDepth > aOther.mDepth;
     }
--- a/layout/base/nsFrameManager.cpp
+++ b/layout/base/nsFrameManager.cpp
@@ -79,17 +79,17 @@ static const PLDHashTableOps Placeholder
 
 //----------------------------------------------------------------------
 
 // XXXldb This seems too complicated for what I think it's doing, and it
 // should also be using pldhash rather than plhash to use less memory.
 
 class nsFrameManagerBase::UndisplayedMap {
 public:
-  UndisplayedMap(uint32_t aNumBuckets = 16);
+  explicit UndisplayedMap(uint32_t aNumBuckets = 16);
   ~UndisplayedMap(void);
 
   UndisplayedNode* GetFirstNode(nsIContent* aParentContent);
 
   nsresult AddNodeFor(nsIContent* aParentContent,
                                   nsIContent* aChild, nsStyleContext* aStyle);
 
   void RemoveNodeFor(nsIContent* aParentContent,
--- a/layout/base/nsGenConList.h
+++ b/layout/base/nsGenConList.h
@@ -27,17 +27,17 @@ struct nsGenConNode : public PRCList {
   // which is needed to do 'content: open-quote open-quote' correctly,
   // and needed for similar cases for counters.
   const int32_t mContentIndex;
 
   // null for 'content:no-open-quote', 'content:no-close-quote' and for
   // counter nodes for increments and resets (rather than uses)
   nsRefPtr<nsTextNode> mText;
 
-  nsGenConNode(int32_t aContentIndex)
+  explicit nsGenConNode(int32_t aContentIndex)
     : mPseudoFrame(nullptr)
     , mContentIndex(aContentIndex)
   {
   }
 
   /**
    * Finish initializing the generated content node once we know the
    * relevant text frame. This must be called just after
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -279,17 +279,17 @@ ShowVerifyReflowFlags()
 #ifdef MOZ_REFLOW_PERF
 class ReflowCountMgr;
 
 static const char kGrandTotalsStr[] = "Grand Totals";
 
 // Counting Class
 class ReflowCounter {
 public:
-  ReflowCounter(ReflowCountMgr * aMgr = nullptr);
+  explicit ReflowCounter(ReflowCountMgr * aMgr = nullptr);
   ~ReflowCounter();
 
   void ClearTotals();
   void DisplayTotals(const char * aStr);
   void DisplayDiffTotals(const char * aStr);
   void DisplayHTMLTotals(const char * aStr);
 
   void Add()                { mTotal++;         }
@@ -310,17 +310,17 @@ protected:
   uint32_t mCacheTotal;
 
   ReflowCountMgr * mMgr; // weak reference (don't delete)
 };
 
 // Counting Class
 class IndiReflowCounter {
 public:
-  IndiReflowCounter(ReflowCountMgr * aMgr = nullptr)
+  explicit IndiReflowCounter(ReflowCountMgr * aMgr = nullptr)
     : mFrame(nullptr),
       mCount(0),
       mMgr(aMgr),
       mCounter(aMgr),
       mHasBeenOutput(false)
     {}
   virtual ~IndiReflowCounter() {}
 
@@ -435,17 +435,17 @@ struct nsCallbackEventRequest
 #define ASSERT_REFLOW_SCHEDULED_STATE()                                       \
   NS_ASSERTION(mReflowScheduled ==                                            \
                  GetPresContext()->RefreshDriver()->                          \
                    IsLayoutFlushObserver(this), "Unexpected state")
 
 class nsAutoCauseReflowNotifier
 {
 public:
-  nsAutoCauseReflowNotifier(PresShell* aShell)
+  explicit nsAutoCauseReflowNotifier(PresShell* aShell)
     : mShell(aShell)
   {
     mShell->WillCauseReflow();
   }
   ~nsAutoCauseReflowNotifier()
   {
     // This check should not be needed. Currently the only place that seem
     // to need it is the code that deals with bug 337586.
@@ -458,17 +458,17 @@ public:
   }
 
   PresShell* mShell;
 };
 
 class MOZ_STACK_CLASS nsPresShellEventCB : public EventDispatchingCallback
 {
 public:
-  nsPresShellEventCB(PresShell* aPresShell) : mPresShell(aPresShell) {}
+  explicit nsPresShellEventCB(PresShell* aPresShell) : mPresShell(aPresShell) {}
 
   virtual void HandleEvent(EventChainPostVisitor& aVisitor) MOZ_OVERRIDE
   {
     if (aVisitor.mPresContext && aVisitor.mEvent->mClass != eBasicEventClass) {
       if (aVisitor.mEvent->message == NS_MOUSE_BUTTON_DOWN ||
           aVisitor.mEvent->message == NS_MOUSE_BUTTON_UP) {
         // Mouse-up and mouse-down events call nsFrame::HandlePress/Release
         // which call GetContentOffsetsFromPoint which requires up-to-date layout.
@@ -508,17 +508,17 @@ public:
   }
 
   nsRefPtr<PresShell> mPresShell;
 };
 
 class nsBeforeFirstPaintDispatcher : public nsRunnable
 {
 public:
-  nsBeforeFirstPaintDispatcher(nsIDocument* aDocument)
+  explicit nsBeforeFirstPaintDispatcher(nsIDocument* aDocument)
   : mDocument(aDocument) {}
 
   // Fires the "before-first-paint" event so that interested parties (right now, the
   // mobile browser) are aware of it.
   NS_IMETHOD Run() MOZ_OVERRIDE
   {
     nsCOMPtr<nsIObserverService> observerService =
       mozilla::services::GetObserverService();
@@ -3742,17 +3742,17 @@ PresShell::GetRectVisibility(nsIFrame* a
     return nsRectVisibility_kRightOfViewport;
 
   return nsRectVisibility_kVisible;
 }
 
 class PaintTimerCallBack MOZ_FINAL : public nsITimerCallback
 {
 public:
-  PaintTimerCallBack(PresShell* aShell) : mShell(aShell) {}
+  explicit PaintTimerCallBack(PresShell* aShell) : mShell(aShell) {}
 
   NS_DECL_ISUPPORTS
 
   NS_IMETHODIMP Notify(nsITimer* aTimer) MOZ_FINAL
   {
     mShell->SetNextPaintCompressed();
     mShell->AddInvalidateHiddenPresShellObserver(mShell->GetPresContext()->RefreshDriver());
     mShell->ScheduleViewManagerFlush();
--- a/layout/base/nsPresShell.h
+++ b/layout/base/nsPresShell.h
@@ -435,28 +435,28 @@ protected:
    * @see nsLayoutUtils::sFontSizeInflationLineThreshold
    */
   void SetupFontInflation();
 
   friend struct AutoRenderingStateSaveRestore;
   friend struct RenderingState;
 
   struct RenderingState {
-    RenderingState(PresShell* aPresShell)
+    explicit RenderingState(PresShell* aPresShell)
       : mXResolution(aPresShell->mXResolution)
       , mYResolution(aPresShell->mYResolution)
       , mRenderFlags(aPresShell->mRenderFlags)
     { }
     float mXResolution;
     float mYResolution;
     RenderFlags mRenderFlags;
   };
 
   struct AutoSaveRestoreRenderingState {
-    AutoSaveRestoreRenderingState(PresShell* aPresShell)
+    explicit AutoSaveRestoreRenderingState(PresShell* aPresShell)
       : mPresShell(aPresShell)
       , mOldState(aPresShell)
     {}
 
     ~AutoSaveRestoreRenderingState()
     {
       mPresShell->mRenderFlags = mOldState.mRenderFlags;
       mPresShell->mXResolution = mOldState.mXResolution;
@@ -578,23 +578,23 @@ protected:
     virtual ~DelayedInputEvent();
 
     mozilla::WidgetInputEvent* mEvent;
   };
 
   class DelayedMouseEvent : public DelayedInputEvent
   {
   public:
-    DelayedMouseEvent(mozilla::WidgetMouseEvent* aEvent);
+    explicit DelayedMouseEvent(mozilla::WidgetMouseEvent* aEvent);
   };
 
   class DelayedKeyEvent : public DelayedInputEvent
   {
   public:
-    DelayedKeyEvent(mozilla::WidgetKeyboardEvent* aEvent);
+    explicit DelayedKeyEvent(mozilla::WidgetKeyboardEvent* aEvent);
   };
 
   // Check if aEvent is a mouse event and record the mouse location for later
   // synth mouse moves.
   void RecordMouseLocation(mozilla::WidgetGUIEvent* aEvent);
   class nsSynthMouseMoveEvent MOZ_FINAL : public nsARefreshObserver {
   public:
     nsSynthMouseMoveEvent(PresShell* aPresShell, bool aFromScroll)
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -76,17 +76,17 @@ namespace mozilla {
  * is called at the start of the Tick() implementation to set a time
  * for the next tick.
  */
 class RefreshDriverTimer {
 public:
   /*
    * aRate -- the delay, in milliseconds, requested between timer firings
    */
-  RefreshDriverTimer(double aRate)
+  explicit RefreshDriverTimer(double aRate)
   {
     SetRate(aRate);
   }
 
   virtual ~RefreshDriverTimer()
   {
     NS_ASSERTION(mRefreshDrivers.Length() == 0, "Should have removed all refresh drivers from here by now!");
   }
@@ -195,17 +195,17 @@ protected:
  * implement ScheduleNextTick and intelligently calculate the next time to tick,
  * and to reset mTimer.  Using a repeating nsITimer gets us into a lot of pain
  * with its attempt at intelligent slack removal and such, so we don't do it.
  */
 class SimpleTimerBasedRefreshDriverTimer :
     public RefreshDriverTimer
 {
 public:
-  SimpleTimerBasedRefreshDriverTimer(double aRate)
+  explicit SimpleTimerBasedRefreshDriverTimer(double aRate)
     : RefreshDriverTimer(aRate)
   {
     mTimer = do_CreateInstance(NS_TIMER_CONTRACTID);
   }
 
   virtual ~SimpleTimerBasedRefreshDriverTimer()
   {
     StopTimer();
@@ -241,17 +241,17 @@ protected:
  * will be delayed instead of triggering instantly.  This might not be
  * desired -- there's an #if 0'd block below that we could put behind
  * a pref to control this behaviour.
  */
 class PreciseRefreshDriverTimer :
     public SimpleTimerBasedRefreshDriverTimer
 {
 public:
-  PreciseRefreshDriverTimer(double aRate)
+  explicit PreciseRefreshDriverTimer(double aRate)
     : SimpleTimerBasedRefreshDriverTimer(aRate)
   {
   }
 
 protected:
   virtual void ScheduleNextTick(TimeStamp aNowTime)
   {
     // The number of (whole) elapsed intervals between the last target
@@ -430,17 +430,17 @@ protected:
  * mNextDriverIndex in RemoveRefreshDriver, but there's little need to
  * add that complexity.  All we want is for inactive drivers to tick
  * at some point, but we don't care too much about how often.
  */
 class InactiveRefreshDriverTimer MOZ_FINAL :
     public RefreshDriverTimer
 {
 public:
-  InactiveRefreshDriverTimer(double aRate)
+  explicit InactiveRefreshDriverTimer(double aRate)
     : RefreshDriverTimer(aRate),
       mNextTickDuration(aRate),
       mDisableAfterMilliseconds(-1.0),
       mNextDriverIndex(0)
   {
     mTimer = do_CreateInstance(NS_TIMER_CONTRACTID);
   }
 
@@ -1032,17 +1032,17 @@ nsRefreshDriver::DoTick()
   if (mTestControllingRefreshes) {
     Tick(mMostRecentRefreshEpochTime, mMostRecentRefresh);
   } else {
     Tick(JS_Now(), TimeStamp::Now());
   }
 }
 
 struct DocumentFrameCallbacks {
-  DocumentFrameCallbacks(nsIDocument* aDocument) :
+  explicit DocumentFrameCallbacks(nsIDocument* aDocument) :
     mDocument(aDocument)
   {}
 
   nsCOMPtr<nsIDocument> mDocument;
   nsIDocument::FrameRequestCallbackList mCallbacks;
 };
 
 void
--- a/layout/forms/nsColorControlFrame.h
+++ b/layout/forms/nsColorControlFrame.h
@@ -48,15 +48,15 @@ public:
   virtual nsContainerFrame* GetContentInsertionFrame() MOZ_OVERRIDE;
 
   virtual Element* GetPseudoElement(nsCSSPseudoElements::Type aType) MOZ_OVERRIDE;
 
   // Refresh the color swatch, using associated input's value
   nsresult UpdateColor();
 
 private:
-  nsColorControlFrame(nsStyleContext* aContext);
+  explicit nsColorControlFrame(nsStyleContext* aContext);
 
   nsCOMPtr<Element> mColorContent;
 };
 
 
 #endif // nsColorControlFrame_h___
--- a/layout/forms/nsComboboxControlFrame.cpp
+++ b/layout/forms/nsComboboxControlFrame.cpp
@@ -81,17 +81,17 @@ public:
   NS_DECL_ISUPPORTS
 
   NS_IMETHOD HandleEvent(nsIDOMEvent*) MOZ_OVERRIDE
   {
     mComboBox->ShowDropDown(!mComboBox->IsDroppedDown());
     return NS_OK;
   }
 
-  nsComboButtonListener(nsComboboxControlFrame* aCombobox)
+  explicit nsComboButtonListener(nsComboboxControlFrame* aCombobox)
   {
     mComboBox = aCombobox;
   }
 
   nsComboboxControlFrame* mComboBox;
 };
 
 NS_IMPL_ISUPPORTS(nsComboButtonListener,
@@ -359,17 +359,17 @@ nsComboboxControlFrame::ShowList(bool aS
 
   return weakFrame.IsAlive();
 }
 
 class nsResizeDropdownAtFinalPosition MOZ_FINAL
   : public nsIReflowCallback, public nsRunnable
 {
 public:
-  nsResizeDropdownAtFinalPosition(nsComboboxControlFrame* aFrame)
+  explicit nsResizeDropdownAtFinalPosition(nsComboboxControlFrame* aFrame)
     : mFrame(aFrame)
   {
     MOZ_COUNT_CTOR(nsResizeDropdownAtFinalPosition);
   }
 
 protected:
   ~nsResizeDropdownAtFinalPosition()
   {
@@ -489,32 +489,32 @@ nsComboboxControlFrame::GetCSSTransformT
     }
   }
   return translation;
 }
 
 class nsAsyncRollup : public nsRunnable
 {
 public:
-  nsAsyncRollup(nsComboboxControlFrame* aFrame) : mFrame(aFrame) {}
+  explicit nsAsyncRollup(nsComboboxControlFrame* aFrame) : mFrame(aFrame) {}
   NS_IMETHODIMP Run()
   {
     if (mFrame.IsAlive()) {
       static_cast<nsComboboxControlFrame*>(mFrame.GetFrame())
         ->RollupFromList();
     }
     return NS_OK;
   }
   nsWeakFrame mFrame;
 };
 
 class nsAsyncResize : public nsRunnable
 {
 public:
-  nsAsyncResize(nsComboboxControlFrame* aFrame) : mFrame(aFrame) {}
+  explicit nsAsyncResize(nsComboboxControlFrame* aFrame) : mFrame(aFrame) {}
   NS_IMETHODIMP Run()
   {
     if (mFrame.IsAlive()) {
       nsComboboxControlFrame* combo =
         static_cast<nsComboboxControlFrame*>(mFrame.GetFrame());
       static_cast<nsListControlFrame*>(combo->mDropdownFrame)->
         SetSuppressScrollbarUpdate(true);
       nsCOMPtr<nsIPresShell> shell = mFrame->PresContext()->PresShell();
--- a/layout/forms/nsComboboxControlFrame.h
+++ b/layout/forms/nsComboboxControlFrame.h
@@ -46,17 +46,17 @@ class nsComboboxControlFrame MOZ_FINAL :
                                          public nsIStatefulFrame
 {
 public:
   friend nsContainerFrame* NS_NewComboboxControlFrame(nsIPresShell* aPresShell,
                                                       nsStyleContext* aContext,
                                                       nsFrameState aFlags);
   friend class nsComboboxDisplayFrame;
 
-  nsComboboxControlFrame(nsStyleContext* aContext);
+  explicit nsComboboxControlFrame(nsStyleContext* aContext);
   ~nsComboboxControlFrame();
 
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
   // nsIAnonymousContentCreator
   virtual nsresult CreateAnonymousContent(nsTArray<ContentInfo>& aElements) MOZ_OVERRIDE;
   virtual void AppendAnonymousContentTo(nsTArray<nsIContent*>& aElements,
@@ -218,17 +218,17 @@ protected:
 
   // Helper for GetMinISize/GetPrefISize
   nscoord GetIntrinsicISize(nsRenderingContext* aRenderingContext,
                             nsLayoutUtils::IntrinsicISizeType aType);
 
   class RedisplayTextEvent : public nsRunnable {
   public:
     NS_DECL_NSIRUNNABLE
-    RedisplayTextEvent(nsComboboxControlFrame *c) : mControlFrame(c) {}
+    explicit RedisplayTextEvent(nsComboboxControlFrame *c) : mControlFrame(c) {}
     void Revoke() { mControlFrame = nullptr; }
   private:
     nsComboboxControlFrame *mControlFrame;
   };
   
   /**
    * Show or hide the dropdown list.
    * @note This method might destroy |this|.
--- a/layout/forms/nsFieldSetFrame.h
+++ b/layout/forms/nsFieldSetFrame.h
@@ -9,17 +9,17 @@
 #include "mozilla/Attributes.h"
 #include "nsContainerFrame.h"
 
 class nsFieldSetFrame MOZ_FINAL : public nsContainerFrame
 {
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
-  nsFieldSetFrame(nsStyleContext* aContext);
+  explicit nsFieldSetFrame(nsStyleContext* aContext);
 
   nscoord
     GetIntrinsicISize(nsRenderingContext* aRenderingContext,
                       nsLayoutUtils::IntrinsicISizeType);
   virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
   virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
   virtual mozilla::LogicalSize
   ComputeSize(nsRenderingContext *aRenderingContext,
--- a/layout/forms/nsFileControlFrame.h
+++ b/layout/forms/nsFileControlFrame.h
@@ -16,17 +16,17 @@
 class nsTextControlFrame;
 class nsIDOMDragEvent;
 
 class nsFileControlFrame : public nsBlockFrame,
                            public nsIFormControlFrame,
                            public nsIAnonymousContentCreator
 {
 public:
-  nsFileControlFrame(nsStyleContext* aContext);
+  explicit nsFileControlFrame(nsStyleContext* aContext);
 
   virtual void Init(nsIContent*       aContent,
                     nsContainerFrame* aParent,
                     nsIFrame*         aPrevInFlow) MOZ_OVERRIDE;
 
   virtual void BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                                 const nsRect&           aDirtyRect,
                                 const nsDisplayListSet& aLists) MOZ_OVERRIDE;
@@ -69,17 +69,17 @@ public:
 protected:
 
   class MouseListener;
   friend class MouseListener;
   class MouseListener : public nsIDOMEventListener {
   public:
     NS_DECL_ISUPPORTS
 
-    MouseListener(nsFileControlFrame* aFrame)
+    explicit MouseListener(nsFileControlFrame* aFrame)
      : mFrame(aFrame)
     {}
 
     void ForgetFrame() {
       mFrame = nullptr;
     }
 
   protected:
@@ -88,17 +88,17 @@ protected:
     nsFileControlFrame* mFrame;
   };
 
   class SyncDisabledStateEvent;
   friend class SyncDisabledStateEvent;
   class SyncDisabledStateEvent : public nsRunnable
   {
   public:
-    SyncDisabledStateEvent(nsFileControlFrame* aFrame)
+    explicit SyncDisabledStateEvent(nsFileControlFrame* aFrame)
       : mFrame(aFrame)
     {}
 
     NS_IMETHOD Run() MOZ_OVERRIDE {
       nsFileControlFrame* frame = static_cast<nsFileControlFrame*>(mFrame.GetFrame());
       NS_ENSURE_STATE(frame);
 
       frame->SyncDisabledState();
@@ -106,17 +106,17 @@ protected:
     }
 
   private:
     nsWeakFrame mFrame;
   };
 
   class DnDListener: public MouseListener {
   public:
-    DnDListener(nsFileControlFrame* aFrame)
+    explicit DnDListener(nsFileControlFrame* aFrame)
       : MouseListener(aFrame)
     {}
 
     NS_DECL_NSIDOMEVENTLISTENER
 
     static bool IsValidDropData(nsIDOMDragEvent* aEvent);
   };
 
--- a/layout/forms/nsFormControlFrame.h
+++ b/layout/forms/nsFormControlFrame.h
@@ -19,17 +19,17 @@ class nsFormControlFrame : public nsLeaf
                            public nsIFormControlFrame
 {
 public:
   /**
     * Main constructor
     * @param aContent the content representing this frame
     * @param aParentFrame the parent frame
     */
-  nsFormControlFrame(nsStyleContext*);
+  explicit nsFormControlFrame(nsStyleContext*);
 
   virtual nsIAtom* GetType() const MOZ_OVERRIDE;
 
   virtual bool IsFrameOfType(uint32_t aFlags) const MOZ_OVERRIDE
   {
     return nsLeafFrame::IsFrameOfType(aFlags &
       ~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock));
   }
--- a/layout/forms/nsGfxButtonControlFrame.h
+++ b/layout/forms/nsGfxButtonControlFrame.h
@@ -17,17 +17,17 @@
 // in the ua.css file.
 
 class nsGfxButtonControlFrame : public nsHTMLButtonControlFrame,
                                 public nsIAnonymousContentCreator
 {
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
-  nsGfxButtonControlFrame(nsStyleContext* aContext);
+  explicit nsGfxButtonControlFrame(nsStyleContext* aContext);
 
   virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
 
   virtual nsresult HandleEvent(nsPresContext* aPresContext, 
                                mozilla::WidgetGUIEvent* aEvent,
                                nsEventStatus* aEventStatus) MOZ_OVERRIDE;
 
   virtual nsIAtom* GetType() const MOZ_OVERRIDE;
--- a/layout/forms/nsGfxCheckboxControlFrame.h
+++ b/layout/forms/nsGfxCheckboxControlFrame.h
@@ -8,17 +8,17 @@
 #include "mozilla/Attributes.h"
 #include "nsFormControlFrame.h"
 
 class nsGfxCheckboxControlFrame : public nsFormControlFrame
 {
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
-  nsGfxCheckboxControlFrame(nsStyleContext* aContext);
+  explicit nsGfxCheckboxControlFrame(nsStyleContext* aContext);
   virtual ~nsGfxCheckboxControlFrame();
 
 #ifdef DEBUG_FRAME_DUMP
   virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE {
     return MakeFrameName(NS_LITERAL_STRING("CheckboxControl"), aResult);
   }
 #endif
 
--- a/layout/forms/nsGfxRadioControlFrame.h
+++ b/layout/forms/nsGfxRadioControlFrame.h
@@ -10,17 +10,17 @@
 #include "nsFormControlFrame.h"
 
 
 // nsGfxRadioControlFrame
 
 class nsGfxRadioControlFrame : public nsFormControlFrame
 {
 public:
-  nsGfxRadioControlFrame(nsStyleContext* aContext);
+  explicit nsGfxRadioControlFrame(nsStyleContext* aContext);
   ~nsGfxRadioControlFrame();
 
   NS_DECL_FRAMEARENA_HELPERS
 
 #ifdef ACCESSIBILITY
   virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE;
 #endif
 
--- a/layout/forms/nsHTMLButtonControlFrame.h
+++ b/layout/forms/nsHTMLButtonControlFrame.h
@@ -13,17 +13,17 @@
 
 class nsRenderingContext;
 class nsPresContext;
 
 class nsHTMLButtonControlFrame : public nsContainerFrame,
                                  public nsIFormControlFrame 
 {
 public:
-  nsHTMLButtonControlFrame(nsStyleContext* aContext);
+  explicit nsHTMLButtonControlFrame(nsStyleContext* aContext);
   ~nsHTMLButtonControlFrame();
 
   virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
 
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
   virtual void BuildDisplayList(nsDisplayListBuilder*   aBuilder,
--- a/layout/forms/nsImageControlFrame.cpp
+++ b/layout/forms/nsImageControlFrame.cpp
@@ -15,17 +15,17 @@
 
 using namespace mozilla;
 
 typedef nsImageFrame nsImageControlFrameSuper;
 class nsImageControlFrame : public nsImageControlFrameSuper,
                             public nsIFormControlFrame
 {
 public:
-  nsImageControlFrame(nsStyleContext* aContext);
+  explicit nsImageControlFrame(nsStyleContext* aContext);
   ~nsImageControlFrame();
 
   virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
   virtual void Init(nsIContent*       aContent,
                     nsContainerFrame* aParent,
                     nsIFrame*         aPrevInFlow) MOZ_OVERRIDE;
 
   NS_DECL_QUERYFRAME
--- a/layout/forms/nsLegendFrame.h
+++ b/layout/forms/nsLegendFrame.h
@@ -10,17 +10,17 @@
 #include "nsBlockFrame.h"
 
 class nsLegendFrame : public nsBlockFrame {
 public:
   NS_DECL_QUERYFRAME_TARGET(nsLegendFrame)
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
-  nsLegendFrame(nsStyleContext* aContext) : nsBlockFrame(aContext) {}
+  explicit nsLegendFrame(nsStyleContext* aContext) : nsBlockFrame(aContext) {}
 
   virtual void Reflow(nsPresContext*           aPresContext,
                       nsHTMLReflowMetrics&     aDesiredSize,
                       const nsHTMLReflowState& aReflowState,
                       nsReflowStatus&          aStatus) MOZ_OVERRIDE;
 
   virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
 
--- a/layout/forms/nsListControlFrame.cpp
+++ b/layout/forms/nsListControlFrame.cpp
@@ -57,17 +57,17 @@ DOMTimeStamp nsListControlFrame::gLastKe
  * nsListEventListener
  * This class is responsible for propagating events to the nsListControlFrame.
  * Frames are not refcounted so they can't be used as event listeners.
  *****************************************************************************/
 
 class nsListEventListener MOZ_FINAL : public nsIDOMEventListener
 {
 public:
-  nsListEventListener(nsListControlFrame *aFrame)
+  explicit nsListEventListener(nsListControlFrame *aFrame)
     : mFrame(aFrame) { }
 
   void SetFrame(nsListControlFrame *aFrame) { mFrame = aFrame; }
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDOMEVENTLISTENER
 
 private:
--- a/layout/forms/nsMeterFrame.h
+++ b/layout/forms/nsMeterFrame.h
@@ -17,17 +17,17 @@ class nsMeterFrame : public nsContainerF
 {
   typedef mozilla::dom::Element Element;
 
 public:
   NS_DECL_QUERYFRAME_TARGET(nsMeterFrame)
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
-  nsMeterFrame(nsStyleContext* aContext);
+  explicit nsMeterFrame(nsStyleContext* aContext);
   virtual ~nsMeterFrame();
 
   virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
 
   virtual void Reflow(nsPresContext*           aCX,
                       nsHTMLReflowMetrics&     aDesiredSize,
                       const nsHTMLReflowState& aReflowState,
                       nsReflowStatus&          aStatus) MOZ_OVERRIDE;
--- a/layout/forms/nsNumberControlFrame.h
+++ b/layout/forms/nsNumberControlFrame.h
@@ -33,17 +33,17 @@ class nsNumberControlFrame MOZ_FINAL : p
   friend nsIFrame*
   NS_NewNumberControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 
   typedef mozilla::dom::Element Element;
   typedef mozilla::dom::HTMLInputElement HTMLInputElement;
   typedef mozilla::WidgetEvent WidgetEvent;
   typedef mozilla::WidgetGUIEvent WidgetGUIEvent;
 
-  nsNumberControlFrame(nsStyleContext* aContext);
+  explicit nsNumberControlFrame(nsStyleContext* aContext);
 
 public:
   NS_DECL_QUERYFRAME_TARGET(nsNumberControlFrame)
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
   virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
   virtual void ContentStatesChanged(mozilla::EventStates aStates) MOZ_OVERRIDE;
@@ -199,17 +199,17 @@ private:
                                 nsCSSPseudoElements::Type aPseudoType,
                                 nsStyleContext* aParentContext);
 
   class SyncDisabledStateEvent;
   friend class SyncDisabledStateEvent;
   class SyncDisabledStateEvent : public nsRunnable
   {
   public:
-    SyncDisabledStateEvent(nsNumberControlFrame* aFrame)
+    explicit SyncDisabledStateEvent(nsNumberControlFrame* aFrame)
     : mFrame(aFrame)
     {}
 
     NS_IMETHOD Run() MOZ_OVERRIDE
     {
       nsNumberControlFrame* frame =
         static_cast<nsNumberControlFrame*>(mFrame.GetFrame());
       NS_ENSURE_STATE(frame);
--- a/layout/forms/nsProgressFrame.h
+++ b/layout/forms/nsProgressFrame.h
@@ -18,17 +18,17 @@ class nsProgressFrame : public nsContain
 {
   typedef mozilla::dom::Element Element;
 
 public:
   NS_DECL_QUERYFRAME_TARGET(nsProgressFrame)
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
-  nsProgressFrame(nsStyleContext* aContext);
+  explicit nsProgressFrame(nsStyleContext* aContext);
   virtual ~nsProgressFrame();
 
   virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
 
   virtual void BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                                 const nsRect&           aDirtyRect,
                                 const nsDisplayListSet& aLists) MOZ_OVERRIDE;
 
--- a/layout/forms/nsRangeFrame.h
+++ b/layout/forms/nsRangeFrame.h
@@ -19,17 +19,17 @@ class nsDisplayRangeFocusRing;
 class nsRangeFrame : public nsContainerFrame,
                      public nsIAnonymousContentCreator
 {
   friend nsIFrame*
   NS_NewRangeFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 
   friend class nsDisplayRangeFocusRing;
 
-  nsRangeFrame(nsStyleContext* aContext);
+  explicit nsRangeFrame(nsStyleContext* aContext);
   virtual ~nsRangeFrame();
 
   typedef mozilla::dom::Element Element;
 
 public:
   NS_DECL_QUERYFRAME_TARGET(nsRangeFrame)
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
--- a/layout/forms/nsSelectsAreaFrame.h
+++ b/layout/forms/nsSelectsAreaFrame.h
@@ -28,17 +28,17 @@ public:
   virtual void Reflow(nsPresContext*           aCX,
                       nsHTMLReflowMetrics&     aDesiredSize,
                       const nsHTMLReflowState& aReflowState,
                       nsReflowStatus&          aStatus) MOZ_OVERRIDE;
 
   nscoord HeightOfARow() const { return mHeightOfARow; }
   
 protected:
-  nsSelectsAreaFrame(nsStyleContext* aContext) :
+  explicit nsSelectsAreaFrame(nsStyleContext* aContext) :
     nsBlockFrame(aContext),
     mHeightOfARow(0)
   {}
 
   // We cache the height of a single row so that changes to the "size"
   // attribute, padding, etc. can all be handled with only one reflow.  We'll
   // have to reflow twice if someone changes our font size or something like
   // that, so that the heights of our options will change.
--- a/layout/forms/nsTextControlFrame.h
+++ b/layout/forms/nsTextControlFrame.h
@@ -199,17 +199,17 @@ public: //for methods who access nsTextC
 
 protected:
   class EditorInitializer;
   friend class EditorInitializer;
   friend class nsTextEditorState; // needs access to UpdateValueDisplay
 
   class EditorInitializer : public nsRunnable {
   public:
-    EditorInitializer(nsTextControlFrame* aFrame) :
+    explicit EditorInitializer(nsTextControlFrame* aFrame) :
       mFrame(aFrame) {}
 
     NS_IMETHOD Run() MOZ_OVERRIDE;
 
     // avoids use of nsWeakFrame
     void Revoke() {
       mFrame = nullptr;
     }
@@ -218,17 +218,17 @@ protected:
     nsTextControlFrame* mFrame;
   };
 
   class ScrollOnFocusEvent;
   friend class ScrollOnFocusEvent;
 
   class ScrollOnFocusEvent : public nsRunnable {
   public:
-    ScrollOnFocusEvent(nsTextControlFrame* aFrame) :
+    explicit ScrollOnFocusEvent(nsTextControlFrame* aFrame) :
       mFrame(aFrame) {}
 
     NS_DECL_NSIRUNNABLE
 
     void Revoke() {
       mFrame = nullptr;
     }
 
--- a/layout/generic/ScrollbarActivity.h
+++ b/layout/generic/ScrollbarActivity.h
@@ -53,17 +53,17 @@ namespace layout {
  * ScrollbarActivity falls into hibernation after the scrollbars have faded
  * out. It only starts acting after the next call to ActivityOccurred() /
  * ActivityStarted().
  */
 
 class ScrollbarActivity MOZ_FINAL : public nsIDOMEventListener,
                                     public nsARefreshObserver {
 public:
-  ScrollbarActivity(nsIScrollbarMediator* aScrollableFrame)
+  explicit ScrollbarActivity(nsIScrollbarMediator* aScrollableFrame)
    : mScrollableFrame(aScrollableFrame)
    , mNestedActivityCounter(0)
    , mIsActive(false)
    , mIsFading(false)
    , mListeningForScrollbarEvents(false)
    , mListeningForScrollAreaEvents(false)
    , mHScrollbarHovered(false)
    , mVScrollbarHovered(false)
--- a/layout/generic/StickyScrollContainer.h
+++ b/layout/generic/StickyScrollContainer.h
@@ -82,17 +82,17 @@ public:
    */
   void UpdatePositions(nsPoint aScrollPosition, nsIFrame* aSubtreeRoot);
 
   // nsIScrollPositionListener
   virtual void ScrollPositionWillChange(nscoord aX, nscoord aY) MOZ_OVERRIDE;
   virtual void ScrollPositionDidChange(nscoord aX, nscoord aY) MOZ_OVERRIDE;
 
 private:
-  StickyScrollContainer(nsIScrollableFrame* aScrollFrame);
+  explicit StickyScrollContainer(nsIScrollableFrame* aScrollFrame);
   ~StickyScrollContainer();
 
   /**
    * Compute two rectangles that determine sticky positioning: |aStick|, based
    * on the scroll container, and |aContain|, based on the containing block.
    * Sticky positioning keeps the frame position (its upper-left corner) always
    * within |aContain| and secondarily within |aStick|.
    */
--- a/layout/generic/TextOverflow.cpp
+++ b/layout/generic/TextOverflow.cpp
@@ -25,17 +25,17 @@
 #include "nsISelection.h"
 
 namespace mozilla {
 namespace css {
 
 class LazyReferenceRenderingContextGetterFromFrame MOZ_FINAL :
     public gfxFontGroup::LazyReferenceContextGetter {
 public:
-  LazyReferenceRenderingContextGetterFromFrame(nsIFrame* aFrame)
+  explicit LazyReferenceRenderingContextGetterFromFrame(nsIFrame* aFrame)
     : mFrame(aFrame) {}
   virtual already_AddRefed<gfxContext> GetRefContext() MOZ_OVERRIDE
   {
     nsRefPtr<nsRenderingContext> rc =
       mFrame->PresContext()->PresShell()->CreateReferenceRenderingContext();
     nsRefPtr<gfxContext> ctx = rc->ThebesContext();
     return ctx.forget();
   }
--- a/layout/generic/nsAbsoluteContainingBlock.h
+++ b/layout/generic/nsAbsoluteContainingBlock.h
@@ -31,17 +31,17 @@ class nsPresContext;
  * All functions include as the first argument the frame that is delegating
  * the request.
  */
 class nsAbsoluteContainingBlock
 {
 public:
   typedef nsIFrame::ChildListID ChildListID;
 
-  nsAbsoluteContainingBlock(ChildListID aChildListID)
+  explicit nsAbsoluteContainingBlock(ChildListID aChildListID)
 #ifdef DEBUG
     : mChildListID(aChildListID)
 #endif
   {
     MOZ_ASSERT(mChildListID == nsIFrame::kAbsoluteList ||
                mChildListID == nsIFrame::kFixedList,
                "should either represent position:fixed or absolute content");
   }
--- a/layout/generic/nsBRFrame.cpp
+++ b/layout/generic/nsBRFrame.cpp
@@ -54,17 +54,17 @@ public:
                                              nsIFrame::eLineParticipant));
   }
 
 #ifdef ACCESSIBILITY
   virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE;
 #endif
 
 protected:
-  BRFrame(nsStyleContext* aContext) : nsFrame(aContext) {}
+  explicit BRFrame(nsStyleContext* aContext) : nsFrame(aContext) {}
   virtual ~BRFrame();
 
   nscoord mAscent;
 };
 
 nsIFrame*
 NS_NewBRFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
 {
--- a/layout/generic/nsBlockFrame.h
+++ b/layout/generic/nsBlockFrame.h
@@ -347,17 +347,17 @@ public:
   static nsBlockFrame* GetNearestAncestorBlock(nsIFrame* aCandidate);
   
   struct FrameLines {
     nsLineList mLines;
     nsFrameList mFrames;
   };
 
 protected:
-  nsBlockFrame(nsStyleContext* aContext)
+  explicit nsBlockFrame(nsStyleContext* aContext)
     : nsContainerFrame(aContext)
     , mMinWidth(NS_INTRINSIC_WIDTH_UNKNOWN)
     , mPrefWidth(NS_INTRINSIC_WIDTH_UNKNOWN)
   {
 #ifdef DEBUG
   InitDebugFlags();
 #endif
   }
@@ -800,17 +800,17 @@ protected:
    * This class is useful for efficiently modifying the out of flow
    * overflow list. It gives the client direct writable access to
    * the frame list temporarily but ensures that property is only
    * written back if absolutely necessary.
    */
   struct nsAutoOOFFrameList {
     nsFrameList mList;
 
-    nsAutoOOFFrameList(nsBlockFrame* aBlock)
+    explicit nsAutoOOFFrameList(nsBlockFrame* aBlock)
       : mPropValue(aBlock->GetOverflowOutOfFlows())
       , mBlock(aBlock) {
       if (mPropValue) {
         mList = *mPropValue;
       }
     }
     ~nsAutoOOFFrameList() {
       mBlock->SetOverflowOutOfFlows(mList, mPropValue);
@@ -893,17 +893,17 @@ public:
 protected:
   static void InitDebugFlags();
 #endif
 };
 
 #ifdef DEBUG
 class AutoNoisyIndenter {
 public:
-  AutoNoisyIndenter(bool aDoIndent) : mIndented(aDoIndent) {
+  explicit AutoNoisyIndenter(bool aDoIndent) : mIndented(aDoIndent) {
     if (mIndented) {
       nsBlockFrame::gNoiseIndent++;
     }
   }
   ~AutoNoisyIndenter() {
     if (mIndented) {
       nsBlockFrame::gNoiseIndent--;
     }
--- a/layout/generic/nsBulletFrame.h
+++ b/layout/generic/nsBulletFrame.h
@@ -41,17 +41,17 @@ private:
 class nsBulletFrame MOZ_FINAL : public nsFrame {
 public:
   NS_DECL_FRAMEARENA_HELPERS
 #ifdef DEBUG
   NS_DECL_QUERYFRAME_TARGET(nsBulletFrame)
   NS_DECL_QUERYFRAME
 #endif
 
-  nsBulletFrame(nsStyleContext* aContext)
+  explicit nsBulletFrame(nsStyleContext* aContext)
     : nsFrame(aContext)
     , mPadding(GetWritingMode())
     , mIntrinsicSize(GetWritingMode())
   {
   }
   virtual ~nsBulletFrame();
 
   NS_IMETHOD Notify(imgIRequest *aRequest, int32_t aType, const nsIntRect* aData);
--- a/layout/generic/nsCanvasFrame.h
+++ b/layout/generic/nsCanvasFrame.h
@@ -25,17 +25,17 @@ class nsRenderingContext;
  * It only supports having a single child frame which must be an area
  * frame
  */
 class nsCanvasFrame MOZ_FINAL : public nsContainerFrame,
                                 public nsIScrollPositionListener,
                                 public nsIAnonymousContentCreator
 {
 public:
-  nsCanvasFrame(nsStyleContext* aContext)
+  explicit nsCanvasFrame(nsStyleContext* aContext)
   : nsContainerFrame(aContext),
     mDoPaintFocus(false),
     mAddedScrollPositionListener(false) {}
 
   NS_DECL_QUERYFRAME_TARGET(nsCanvasFrame)
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
--- a/layout/generic/nsColumnSetFrame.h
+++ b/layout/generic/nsColumnSetFrame.h
@@ -11,17 +11,17 @@
 #include "mozilla/Attributes.h"
 #include "nsContainerFrame.h"
 #include "nsIFrameInlines.h" // for methods used by IS_TRUE_OVERFLOW_CONTAINER
 
 class nsColumnSetFrame MOZ_FINAL : public nsContainerFrame {
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
-  nsColumnSetFrame(nsStyleContext* aContext);
+  explicit nsColumnSetFrame(nsStyleContext* aContext);
 
   virtual void Reflow(nsPresContext* aPresContext,
                       nsHTMLReflowMetrics& aDesiredSize,
                       const nsHTMLReflowState& aReflowState,
                       nsReflowStatus& aStatus) MOZ_OVERRIDE;
 
 #ifdef DEBUG
   virtual void SetInitialChildList(ChildListID     aListID,
--- a/layout/generic/nsFirstLetterFrame.h
+++ b/layout/generic/nsFirstLetterFrame.h
@@ -12,17 +12,17 @@
 #include "nsContainerFrame.h"
 
 class nsFirstLetterFrame MOZ_FINAL : public nsContainerFrame {
 public:
   NS_DECL_QUERYFRAME_TARGET(nsFirstLetterFrame)
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
-  nsFirstLetterFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
+  explicit nsFirstLetterFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
 
   virtual void BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                                 const nsRect&           aDirtyRect,
                                 const nsDisplayListSet& aLists) MOZ_OVERRIDE;
 
   virtual void Init(nsIContent*       aContent,
                     nsContainerFrame* aParent,
                     nsIFrame*         aPrevInFlow) MOZ_OVERRIDE;
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -167,17 +167,17 @@ PhysicalPosFromLogicalPos(nscoord aLogic
   IsAxisHorizontal((axisTracker_).GetMainAxis()) ? (width_) : (height_)
 
 #define GET_CROSS_COMPONENT(axisTracker_, width_, height_)  \
   IsAxisHorizontal((axisTracker_).GetCrossAxis()) ? (width_) : (height_)
 
 // Encapsulates our flex container's main & cross axes.
 class MOZ_STACK_CLASS nsFlexContainerFrame::FlexboxAxisTracker {
 public:
-  FlexboxAxisTracker(nsFlexContainerFrame* aFlexContainerFrame);
+  explicit FlexboxAxisTracker(nsFlexContainerFrame* aFlexContainerFrame);
 
   // Accessors:
   AxisOrientationType GetMainAxis() const  { return mMainAxis;  }
   AxisOrientationType GetCrossAxis() const { return mCrossAxis; }
 
   nscoord GetMainComponent(const nsSize& aSize) const {
     return GET_MAIN_COMPONENT(*this, aSize.width, aSize.height);
   }
@@ -1654,17 +1654,17 @@ public:
   void ExitChildFrame(nscoord aChildFrameSize)
   {
     if (AxisGrowsInPositiveDirection(mAxis))
       mPosition += aChildFrameSize;
   }
 
 protected:
   // Protected constructor, to be sure we're only instantiated via a subclass.
-  PositionTracker(AxisOrientationType aAxis)
+  explicit PositionTracker(AxisOrientationType aAxis)
     : mPosition(0),
       mAxis(aAxis)
   {}
 
 private:
   // Private copy-constructor, since we don't want any instances of our
   // subclasses to be accidentally copied.
   PositionTracker(const PositionTracker& aOther)
@@ -1741,17 +1741,17 @@ private:
   uint32_t mNumPackingSpacesRemaining;
   uint8_t  mAlignContent;
 };
 
 // Utility class for managing our position along the cross axis, *within* a
 // single flex line.
 class MOZ_STACK_CLASS SingleLineCrossAxisPositionTracker : public PositionTracker {
 public:
-  SingleLineCrossAxisPositionTracker(const FlexboxAxisTracker& aAxisTracker);
+  explicit SingleLineCrossAxisPositionTracker(const FlexboxAxisTracker& aAxisTracker);
 
   void ResolveAutoMarginsInCrossAxis(const FlexLine& aLine,
                                      FlexItem& aItem);
 
   void EnterAlignPackingSpace(const FlexLine& aLine,
                               const FlexItem& aItem,
                               const FlexboxAxisTracker& aAxisTracker);
 
@@ -3438,18 +3438,18 @@ nsFlexContainerFrame::Reflow(nsPresConte
 }
 
 // RAII class to clean up a list of FlexLines.
 // Specifically, this removes each line from the list, deletes all the
 // FlexItems in its list, and deletes the FlexLine.
 class MOZ_STACK_CLASS AutoFlexLineListClearer
 {
 public:
-  AutoFlexLineListClearer(LinkedList<FlexLine>& aLines
-                          MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
+  explicit AutoFlexLineListClearer(LinkedList<FlexLine>& aLines
+                                   MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
   : mLines(aLines)
   {
     MOZ_GUARD_OBJECT_NOTIFIER_INIT;
   }
 
   ~AutoFlexLineListClearer()
   {
     while (FlexLine* line = mLines.popFirst()) {
--- a/layout/generic/nsFlexContainerFrame.h
+++ b/layout/generic/nsFlexContainerFrame.h
@@ -56,17 +56,17 @@ public:
 #ifdef DEBUG_FRAME_DUMP
   virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
 #endif
   // Flexbox-specific public methods
   bool IsHorizontal();
 
 protected:
   // Protected constructor & destructor
-  nsFlexContainerFrame(nsStyleContext* aContext) :
+  explicit nsFlexContainerFrame(nsStyleContext* aContext) :
     nsFlexContainerFrameSuper(aContext)
   {}
   virtual ~nsFlexContainerFrame();
 
   /*
    * This method does the bulk of the flex layout, implementing the algorithm
    * described at:
    *   http://dev.w3.org/csswg/css-flexbox/#layout-algorithm
--- a/layout/generic/nsFloatManager.h
+++ b/layout/generic/nsFloatManager.h
@@ -37,17 +37,17 @@ struct nsFlowAreaRect {
                  bool aHasFloats)
     : mRect(aX, aY, aWidth, aHeight), mHasFloats(aHasFloats) {}
 };
 
 #define NS_FLOAT_MANAGER_CACHE_SIZE 4
 
 class nsFloatManager {
 public:
-  nsFloatManager(nsIPresShell* aPresShell);
+  explicit nsFloatManager(nsIPresShell* aPresShell);
   ~nsFloatManager();
 
   void* operator new(size_t aSize) CPP_THROW_NEW;
   void operator delete(void* aPtr, size_t aSize);
 
   static void Shutdown();
 
   /**
@@ -320,17 +320,17 @@ private:
 
 /**
  * A helper class to manage maintenance of the float manager during
  * nsBlockFrame::Reflow. It automatically restores the old float
  * manager in the reflow state when the object goes out of scope.
  */
 class nsAutoFloatManager {
 public:
-  nsAutoFloatManager(nsHTMLReflowState& aReflowState)
+  explicit nsAutoFloatManager(nsHTMLReflowState& aReflowState)
     : mReflowState(aReflowState),
       mNew(nullptr),
       mOld(nullptr) {}
 
   ~nsAutoFloatManager();
 
   /**
    * Create a new float manager for the specified frame. This will
--- a/layout/generic/nsFontInflationData.h
+++ b/layout/generic/nsFontInflationData.h
@@ -33,17 +33,17 @@ public:
   }
 
   nscoord EffectiveWidth() const {
     return mNCAWidth;
   }
 
 private:
 
-  nsFontInflationData(nsIFrame* aBFCFrame);
+  explicit nsFontInflationData(nsIFrame* aBFCFrame);
 
   nsFontInflationData(const nsFontInflationData&) MOZ_DELETE;
   void operator=(const nsFontInflationData&) MOZ_DELETE;
 
   void UpdateWidth(const nsHTMLReflowState &aReflowState);
   enum SearchDirection { eFromStart, eFromEnd };
   static nsIFrame* FindEdgeInflatableFrameIn(nsIFrame *aFrame,
                                              SearchDirection aDirection);
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -1870,17 +1870,17 @@ WrapPreserve3DList(nsIFrame* aFrame, nsD
   return rv;
 }
 
 class AutoSaveRestoreBlendMode
 {
   nsDisplayListBuilder& mBuilder;
   EnumSet<gfx::CompositionOp> mSavedBlendModes;
 public:
-  AutoSaveRestoreBlendMode(nsDisplayListBuilder& aBuilder)
+  explicit AutoSaveRestoreBlendMode(nsDisplayListBuilder& aBuilder)
     : mBuilder(aBuilder)
     , mSavedBlendModes(aBuilder.ContainedBlendModes())
   { }
 
   ~AutoSaveRestoreBlendMode() {
     mBuilder.SetContainsBlendModes(mSavedBlendModes);
   }
 };
@@ -8954,17 +8954,17 @@ struct DR_State
   // reflow specific state
   nsTArray<DR_FrameTreeNode*> mFrameTreeLeaves;
 };
 
 static DR_State *DR_state; // the one and only DR_State
 
 struct DR_RulePart 
 {
-  DR_RulePart(nsIAtom* aFrameType) : mFrameType(aFrameType), mNext(0) {}
+  explicit DR_RulePart(nsIAtom* aFrameType) : mFrameType(aFrameType), mNext(0) {}
   void Destroy();
 
   nsIAtom*     mFrameType;
   DR_RulePart* mNext;
 };
 
 void DR_RulePart::Destroy()
 {
--- a/layout/generic/nsFrameSetFrame.cpp
+++ b/layout/generic/nsFrameSetFrame.cpp
@@ -148,17 +148,17 @@ public:
                                 const nsDisplayListSet& aLists) MOZ_OVERRIDE;
 
   virtual void Reflow(nsPresContext*           aPresContext,
                           nsHTMLReflowMetrics&     aDesiredSize,
                           const nsHTMLReflowState& aReflowState,
                           nsReflowStatus&          aStatus) MOZ_OVERRIDE;
 
 protected:
-  nsHTMLFramesetBlankFrame(nsStyleContext* aContext) : nsLeafFrame(aContext) {}
+  explicit nsHTMLFramesetBlankFrame(nsStyleContext* aContext) : nsLeafFrame(aContext) {}
   virtual ~nsHTMLFramesetBlankFrame();
   virtual nscoord GetIntrinsicISize() MOZ_OVERRIDE;
   virtual nscoord GetIntrinsicBSize() MOZ_OVERRIDE;
 
   friend class nsHTMLFramesetFrame;
   friend class nsHTMLFrameset;
 };
 
--- a/layout/generic/nsFrameSetFrame.h
+++ b/layout/generic/nsFrameSetFrame.h
@@ -63,17 +63,17 @@ struct nsFramesetDrag {
  ******************************************************************************/
 class nsHTMLFramesetFrame : public nsContainerFrame
 {
 public:
   NS_DECL_QUERYFRAME_TARGET(nsHTMLFramesetFrame)
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
-  nsHTMLFramesetFrame(nsStyleContext* aContext);
+  explicit nsHTMLFramesetFrame(nsStyleContext* aContext);
 
   virtual ~nsHTMLFramesetFrame();
 
   virtual void Init(nsIContent*       aContent,
                     nsContainerFrame* aParent,
                     nsIFrame*         aPrevInFlow) MOZ_OVERRIDE;
 
   virtual void SetInitialChildList(ChildListID  aListID,
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -1481,17 +1481,17 @@ private:
 };
 
 // AsyncScroll has ref counting.
 class ScrollFrameHelper::AsyncScroll MOZ_FINAL : public nsARefreshObserver {
 public:
   typedef mozilla::TimeStamp TimeStamp;
   typedef mozilla::TimeDuration TimeDuration;
 
-  AsyncScroll(nsPoint aStartPos)
+  explicit AsyncScroll(nsPoint aStartPos)
     : mIsFirstIteration(true)
     , mStartPos(aStartPos)
     , mCallee(nullptr)
   {}
 
 private:
   // Private destructor, to discourage deletion outside of Release():
   ~AsyncScroll() {
--- a/layout/generic/nsGfxScrollFrame.h
+++ b/layout/generic/nsGfxScrollFrame.h
@@ -90,35 +90,35 @@ public:
   void PostScrollEvent();
   void FireScrollEvent();
   void PostScrolledAreaEvent();
   void FireScrolledAreaEvent();
 
   class ScrollEvent : public nsRunnable {
   public:
     NS_DECL_NSIRUNNABLE
-    ScrollEvent(ScrollFrameHelper *helper) : mHelper(helper) {}
+    explicit ScrollEvent(ScrollFrameHelper *helper) : mHelper(helper) {}
     void Revoke() { mHelper = nullptr; }
   private:
     ScrollFrameHelper *mHelper;
   };
 
   class AsyncScrollPortEvent : public nsRunnable {
   public:
     NS_DECL_NSIRUNNABLE
-    AsyncScrollPortEvent(ScrollFrameHelper *helper) : mHelper(helper) {}
+    explicit AsyncScrollPortEvent(ScrollFrameHelper *helper) : mHelper(helper) {}
     void Revoke() { mHelper = nullptr; }
   private:
     ScrollFrameHelper *mHelper;
   };
 
   class ScrolledAreaEvent : public nsRunnable {
   public:
     NS_DECL_NSIRUNNABLE
-    ScrolledAreaEvent(ScrollFrameHelper *helper) : mHelper(helper) {}
+    explicit ScrolledAreaEvent(ScrollFrameHelper *helper) : mHelper(helper) {}
     void Revoke() { mHelper = nullptr; }
   private:
     ScrollFrameHelper *mHelper;
   };
 
   /**
    * @note This method might destroy the frame, pres shell and other objects.
    */
--- a/layout/generic/nsGridContainerFrame.h
+++ b/layout/generic/nsGridContainerFrame.h
@@ -34,16 +34,16 @@ public:
 
 #ifdef DEBUG_FRAME_DUMP
   virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
 #endif
 
 protected:
   friend nsContainerFrame* NS_NewGridContainerFrame(nsIPresShell* aPresShell,
                                                     nsStyleContext* aContext);
-  nsGridContainerFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
+  explicit nsGridContainerFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
 
 #ifdef DEBUG
   void SanityCheckAnonymousGridItems() const;
 #endif // DEBUG
 };
 
 #endif /* nsGridContainerFrame_h___ */
--- a/layout/generic/nsHTMLCanvasFrame.h
+++ b/layout/generic/nsHTMLCanvasFrame.h
@@ -31,17 +31,17 @@ public:
   typedef mozilla::layers::Layer Layer;
   typedef mozilla::layers::LayerManager LayerManager;
   typedef mozilla::ContainerLayerParameters ContainerLayerParameters;
 
   NS_DECL_QUERYFRAME_TARGET(nsHTMLCanvasFrame)
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
-  nsHTMLCanvasFrame(nsStyleContext* aContext)
+  explicit nsHTMLCanvasFrame(nsStyleContext* aContext)
   : nsContainerFrame(aContext)
     , mBorderPadding(GetWritingMode()) {}
 
   virtual void Init(nsIContent*       aContent,
                     nsContainerFrame* aParent,
                     nsIFrame*         aPrevInFlow) MOZ_OVERRIDE;
 
   virtual void BuildDisplayList(nsDisplayListBuilder*   aBuilder,
--- a/layout/generic/nsIAnonymousContentCreator.h
+++ b/layout/generic/nsIAnonymousContentCreator.h
@@ -26,17 +26,17 @@ class nsIFrame;
  * @see nsCSSFrameConstructor
  */
 class nsIAnonymousContentCreator
 {
 public:
   NS_DECL_QUERYFRAME_TARGET(nsIAnonymousContentCreator)
 
   struct ContentInfo {
-    ContentInfo(nsIContent* aContent) :
+    explicit ContentInfo(nsIContent* aContent) :
       mContent(aContent)
     {}
 
     ContentInfo(nsIContent* aContent, nsStyleContext* aStyleContext) :
       mContent(aContent), mStyleContext(aStyleContext)
     {}
 
     nsIContent* mContent;
--- a/layout/generic/nsILineIterator.h
+++ b/layout/generic/nsILineIterator.h
@@ -2,16 +2,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #ifndef nsILineIterator_h___
 #define nsILineIterator_h___
 
 #include "nscore.h"
 #include "nsCoord.h"
+#include "mozilla/Attributes.h"
 
 class nsIFrame;
 struct nsRect;
 
 // Line Flags (see GetLine below)
 
 // This bit is set when the line is wrapping up a block frame. When
 // clear, it means that the line contains inline elements.
@@ -100,17 +101,17 @@ public:
                             nsIFrame                 **aFirstVisual,
                             nsIFrame                 **aLastVisual) = 0;
 };
 
 class nsAutoLineIterator
 {
 public:
   nsAutoLineIterator() : mRawPtr(nullptr) { }
-  nsAutoLineIterator(nsILineIterator *i) : mRawPtr(i) { }
+  MOZ_IMPLICIT nsAutoLineIterator(nsILineIterator *i) : mRawPtr(i) { }
 
   ~nsAutoLineIterator() {
     if (mRawPtr)
       mRawPtr->DisposeLineIterator();
   }
 
   operator nsILineIterator*() { return mRawPtr; }
   nsILineIterator* operator->() { return mRawPtr; }
--- a/layout/generic/nsImageFrame.h
+++ b/layout/generic/nsImageFrame.h
@@ -41,17 +41,17 @@ namespace layers {
 }
 
 class nsImageListener : public imgINotificationObserver
 {
 protected:
   virtual ~nsImageListener();
 
 public:
-  nsImageListener(nsImageFrame *aFrame);
+  explicit nsImageListener(nsImageFrame *aFrame);
 
   NS_DECL_ISUPPORTS
   NS_DECL_IMGINOTIFICATIONOBSERVER
 
   void SetFrame(nsImageFrame *frame) { mFrame = frame; }
 
 private:
   nsImageFrame *mFrame;
@@ -63,17 +63,17 @@ class nsImageFrame : public ImageFrameSu
                      public nsIReflowCallback {
 public:
   typedef mozilla::layers::ImageContainer ImageContainer;
   typedef mozilla::layers::ImageLayer ImageLayer;
   typedef mozilla::layers::LayerManager LayerManager;
 
   NS_DECL_FRAMEARENA_HELPERS
 
-  nsImageFrame(nsStyleContext* aContext);
+  explicit nsImageFrame(nsStyleContext* aContext);
 
   NS_DECL_QUERYFRAME_TARGET(nsImageFrame)
   NS_DECL_QUERYFRAME
 
   virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
   virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) MOZ_OVERRIDE;
 
   virtual void Init(nsIContent*       aContent,
--- a/layout/generic/nsImageMap.cpp
+++ b/layout/generic/nsImageMap.cpp
@@ -24,17 +24,17 @@
 #ifdef ACCESSIBILITY
 #include "nsAccessibilityService.h"
 #endif
 
 using namespace mozilla;
 
 class Area {
 public:
-  Area(nsIContent* aArea);
+  explicit Area(nsIContent* aArea);
   virtual ~Area();
 
   virtual void ParseCoords(const nsAString& aSpec);
 
   virtual bool IsInside(nscoord x, nscoord y) const = 0;
   virtual void Draw(nsIFrame* aFrame, nsRenderingContext& aRC) = 0;
   virtual void GetRect(nsIFrame* aFrame, nsRect& aRect) = 0;
 
@@ -259,17 +259,17 @@ void Area::HasFocus(bool aHasFocus)
 {
   mHasFocus = aHasFocus;
 }
 
 //----------------------------------------------------------------------
 
 class DefaultArea : public Area {
 public:
-  DefaultArea(nsIContent* aArea);
+  explicit DefaultArea(nsIContent* aArea);
 
   virtual bool IsInside(nscoord x, nscoord y) const MOZ_OVERRIDE;
   virtual void Draw(nsIFrame* aFrame, nsRenderingContext& aRC) MOZ_OVERRIDE;
   virtual void GetRect(nsIFrame* aFrame, nsRect& aRect) MOZ_OVERRIDE;
 };
 
 DefaultArea::DefaultArea(nsIContent* aArea)
   : Area(aArea)
@@ -304,17 +304,17 @@ void DefaultArea::GetRect(nsIFrame* aFra
   aRect = aFrame->GetRect();
   aRect.MoveTo(0, 0);
 }
 
 //----------------------------------------------------------------------
 
 class RectArea : public Area {
 public:
-  RectArea(nsIContent* aArea);
+  explicit RectArea(nsIContent* aArea);
 
   virtual void ParseCoords(const nsAString& aSpec) MOZ_OVERRIDE;
   virtual bool IsInside(nscoord x, nscoord y) const MOZ_OVERRIDE;
   virtual void Draw(nsIFrame* aFrame, nsRenderingContext& aRC) MOZ_OVERRIDE;
   virtual void GetRect(nsIFrame* aFrame, nsRect& aRect) MOZ_OVERRIDE;
 };
 
 RectArea::RectArea(nsIContent* aArea)
@@ -406,17 +406,17 @@ void RectArea::GetRect(nsIFrame* aFrame,
     aRect.SetRect(x1, y1, x2, y2);
   }
 }
 
 //----------------------------------------------------------------------
 
 class PolyArea : public Area {
 public:
-  PolyArea(nsIContent* aArea);
+  explicit PolyArea(nsIContent* aArea);
 
   virtual void ParseCoords(const nsAString& aSpec) MOZ_OVERRIDE;
   virtual bool IsInside(nscoord x, nscoord y) const MOZ_OVERRIDE;
   virtual void Draw(nsIFrame* aFrame, nsRenderingContext& aRC) MOZ_OVERRIDE;
   virtual void GetRect(nsIFrame* aFrame, nsRect& aRect) MOZ_OVERRIDE;
 };
 
 PolyArea::PolyArea(nsIContent* aArea)
@@ -546,17 +546,17 @@ void PolyArea::GetRect(nsIFrame* aFrame,
     aRect.SetRect(x1, y1, x2, y2);
   }
 }
 
 //----------------------------------------------------------------------
 
 class CircleArea : public Area {
 public:
-  CircleArea(nsIContent* aArea);
+  explicit CircleArea(nsIContent* aArea);
 
   virtual void ParseCoords(const nsAString& aSpec) MOZ_OVERRIDE;
   virtual bool IsInside(nscoord x, nscoord y) const MOZ_OVERRIDE;
   virtual void Draw(nsIFrame* aFrame, nsRenderingContext& aRC) MOZ_OVERRIDE;
   virtual void GetRect(nsIFrame* aFrame, nsRect& aRect) MOZ_OVERRIDE;
 };
 
 CircleArea::CircleArea(nsIContent* aArea)
--- a/layout/generic/nsInlineFrame.h
+++ b/layout/generic/nsInlineFrame.h
@@ -127,17 +127,17 @@ protected:
       mPrevFrame = nullptr;
       mNextInFlow = nullptr;
       mLineContainer = nullptr;
       mLineLayout = nullptr;
       mSetParentPointer = false;
     }
   };
 
-  nsInlineFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
+  explicit nsInlineFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
 
   virtual LogicalSides GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
 
   void ReflowFrames(nsPresContext* aPresContext,
                     const nsHTMLReflowState& aReflowState,
                     InlineReflowState& rs,
                     nsHTMLReflowMetrics& aMetrics,
                     nsReflowStatus& aStatus);
@@ -212,16 +212,16 @@ public:
 
   virtual void Init(nsIContent*       aContent,
                     nsContainerFrame* aParent,
                     nsIFrame*         aPrevInFlow) MOZ_OVERRIDE;
   virtual void PullOverflowsFromPrevInFlow() MOZ_OVERRIDE;
   virtual bool DrainSelfOverflowList() MOZ_OVERRIDE;
 
 protected:
-  nsFirstLineFrame(nsStyleContext* aContext) : nsInlineFrame(aContext) {}
+  explicit nsFirstLineFrame(nsStyleContext* aContext) : nsInlineFrame(aContext) {}
 
   virtual nsIFrame* PullOneFrame(nsPresContext* aPresContext,
                                  InlineReflowState& rs,
                                  bool* aIsComplete) MOZ_OVERRIDE;
 };
 
 #endif /* nsInlineFrame_h___ */
--- a/layout/generic/nsLineBox.h
+++ b/layout/generic/nsLineBox.h
@@ -634,32 +634,32 @@ public:
     // Indicates that this line *may* have a placeholder for a float
     // that was pushed to a later column or page.
     uint32_t mHadFloatPushed : 1;
     uint32_t mHasHashedFrames: 1;
     uint32_t mBreakType : 4;
   };
 
   struct ExtraData {
-    ExtraData(const nsRect& aBounds) : mOverflowAreas(aBounds, aBounds) {
+    explicit ExtraData(const nsRect& aBounds) : mOverflowAreas(aBounds, aBounds) {
     }
     nsOverflowAreas mOverflowAreas;
   };
 
   struct ExtraBlockData : public ExtraData {
-    ExtraBlockData(const nsRect& aBounds)
+    explicit ExtraBlockData(const nsRect& aBounds)
       : ExtraData(aBounds),
         mCarriedOutBEndMargin()
     {
     }
     nsCollapsingMargin mCarriedOutBEndMargin;
   };
 
   struct ExtraInlineData : public ExtraData {
-    ExtraInlineData(const nsRect& aBounds) : ExtraData(aBounds) {
+    explicit ExtraInlineData(const nsRect& aBounds) : ExtraData(aBounds) {
     }
     nsFloatCacheList mFloats;
   };
 
 protected:
   nscoord mAscent;           // see |SetAscent| / |GetAscent|
   union {
     uint32_t mAllFlags;
--- a/layout/generic/nsLineLayout.h
+++ b/layout/generic/nsLineLayout.h
@@ -352,17 +352,17 @@ protected:
   // justification and relative positioning).
 
   struct PerSpanData;
   struct PerFrameData;
   friend struct PerSpanData;
   friend struct PerFrameData;
   struct PerFrameData
   {
-    PerFrameData(mozilla::WritingMode aWritingMode)
+    explicit PerFrameData(mozilla::WritingMode aWritingMode)
       : mBounds(aWritingMode)
       , mMargin(aWritingMode)
       , mBorderPadding(aWritingMode)
       , mOffsets(aWritingMode)
     {}
 
     // link to next/prev frame in same span
     PerFrameData* mNext;
--- a/layout/generic/nsObjectFrame.h
+++ b/layout/generic/nsObjectFrame.h
@@ -206,17 +206,17 @@ public:
   /*
    * Sets up the plugin window and calls SetWindow on the plugin.
    */
   nsresult CallSetWindow(bool aCheckIsHidden = true);
 
   void SetInstanceOwner(nsPluginInstanceOwner* aOwner);
 
 protected:
-  nsObjectFrame(nsStyleContext* aContext);
+  explicit nsObjectFrame(nsStyleContext* aContext);
   virtual ~nsObjectFrame();
 
   // NOTE:  This frame class does not inherit from |nsLeafFrame|, so
   // this is not a virtual method implementation.
   void GetDesiredSize(nsPresContext* aPresContext,
                       const nsHTMLReflowState& aReflowState,
                       nsHTMLReflowMetrics& aDesiredSize);
 
@@ -255,17 +255,17 @@ private:
   void RegisterPluginForGeometryUpdates();
 
   // Unregisters the plugin for geometry updated with the root pres context
   // stored in mRootPresContextRegisteredWith.
   void UnregisterPluginForGeometryUpdates();
 
   class PluginEventNotifier : public nsRunnable {
   public:
-    PluginEventNotifier(const nsString &aEventType) : 
+    explicit PluginEventNotifier(const nsString &aEventType) : 
       mEventType(aEventType) {}
     
     NS_IMETHOD Run() MOZ_OVERRIDE;
   private:
     nsString mEventType;
   };
 
   nsPluginInstanceOwner*          mInstanceOwner; // WEAK
--- a/layout/generic/nsPageContentFrame.h
+++ b/layout/generic/nsPageContentFrame.h
@@ -44,15 +44,15 @@ public:
   virtual nsIAtom* GetType() const MOZ_OVERRIDE;
   
 #ifdef DEBUG_FRAME_DUMP
   // Debugging
   virtual nsresult  GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
 #endif
 
 protected:
-  nsPageContentFrame(nsStyleContext* aContext) : ViewportFrame(aContext) {}
+  explicit nsPageContentFrame(nsStyleContext* aContext) : ViewportFrame(aContext) {}
 
   nsSharedPageData*         mPD;
 };
 
 #endif /* nsPageContentFrame_h___ */
 
--- a/layout/generic/nsPageFrame.h
+++ b/layout/generic/nsPageFrame.h
@@ -52,17 +52,17 @@ public:
   // We must allow Print Preview UI to have a background, no matter what the
   // user's settings
   virtual bool HonorPrintBackgroundSettings() MOZ_OVERRIDE { return false; }
 
   void PaintHeaderFooter(nsRenderingContext& aRenderingContext,
                          nsPoint aPt);
 
 protected:
-  nsPageFrame(nsStyleContext* aContext);
+  explicit nsPageFrame(nsStyleContext* aContext);
   virtual ~nsPageFrame();
 
   typedef enum {
     eHeader,
     eFooter
   } nsHeaderFooterEnum;
 
   nscoord GetXPosition(nsRenderingContext& aRenderingContext, 
@@ -96,17 +96,17 @@ protected:
   nsSharedPageData* mPD;
 };
 
 
 class nsPageBreakFrame : public nsLeafFrame
 {
   NS_DECL_FRAMEARENA_HELPERS
 
-  nsPageBreakFrame(nsStyleContext* aContext);
+  explicit nsPageBreakFrame(nsStyleContext* aContext);
   ~nsPageBreakFrame();
 
   virtual void Reflow(nsPresContext*          aPresContext,
                           nsHTMLReflowMetrics&     aDesiredSize,
                           const nsHTMLReflowState& aReflowState,
                           nsReflowStatus&          aStatus) MOZ_OVERRIDE;
 
   virtual nsIAtom* GetType() const MOZ_OVERRIDE;
--- a/layout/generic/nsRubyBaseContainerFrame.h
+++ b/layout/generic/nsRubyBaseContainerFrame.h
@@ -43,17 +43,17 @@ public:
 
   void AppendTextContainer(nsIFrame* aFrame);
   void ClearTextContainers();
 
 protected:
   friend nsContainerFrame*
     NS_NewRubyBaseContainerFrame(nsIPresShell* aPresShell,
                                  nsStyleContext* aContext);
-  nsRubyBaseContainerFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
+  explicit nsRubyBaseContainerFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
   /*
    * The ruby text containers that belong to the ruby segment defined by
    * this ruby base container. These text containers are located at the start
    * of reflow for the ruby frame (parent) and cleared at the end of that
    * reflow.
    */
   nsTArray<nsRubyTextContainerFrame*> mTextContainers;
 };
--- a/layout/generic/nsRubyBaseFrame.h
+++ b/layout/generic/nsRubyBaseFrame.h
@@ -44,13 +44,13 @@ public:
 
 #ifdef DEBUG_FRAME_DUMP
   virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
 #endif
 
 protected:
   friend nsContainerFrame* NS_NewRubyBaseFrame(nsIPresShell* aPresShell,
                                                nsStyleContext* aContext);
-  nsRubyBaseFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
+  explicit nsRubyBaseFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
   nscoord mBaseline;
 };
 
 #endif /* nsRubyBaseFrame_h___ */
--- a/layout/generic/nsRubyFrame.h
+++ b/layout/generic/nsRubyFrame.h
@@ -42,15 +42,15 @@ public:
 
 #ifdef DEBUG_FRAME_DUMP
   virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
 #endif
 
 protected:
   friend nsContainerFrame* NS_NewRubyFrame(nsIPresShell* aPresShell,
                                            nsStyleContext* aContext);
-  nsRubyFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
+  explicit nsRubyFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
   void CalculateColSizes(nsRenderingContext* aRenderingContext,
                          nsTArray<nscoord>& aColSizes);
   nscoord mBaseline;
 };
 
 #endif /* nsRubyFrame_h___ */
--- a/layout/generic/nsRubyTextContainerFrame.h
+++ b/layout/generic/nsRubyTextContainerFrame.h
@@ -49,17 +49,17 @@ public:
   void BeginRTCLineLayout(nsPresContext* aPresContext,
                           const nsHTMLReflowState& aReflowState);
   nsLineLayout* GetLineLayout() { return mLineLayout.get(); };
 
 protected:
   friend nsContainerFrame*
     NS_NewRubyTextContainerFrame(nsIPresShell* aPresShell,
                                  nsStyleContext* aContext);
-  nsRubyTextContainerFrame(nsStyleContext* aContext) : nsBlockFrame(aContext) {}
+  explicit nsRubyTextContainerFrame(nsStyleContext* aContext) : nsBlockFrame(aContext) {}
   // This pointer is active only during reflow of the ruby structure. It gets
   // created when the corresponding ruby base container is reflowed, and it is
   // destroyed when the ruby text container itself is reflowed.
   mozilla::UniquePtr<nsLineLayout> mLineLayout;
   // The intended dimensions of the ruby text container. These are modified
   // whenever a ruby text box is reflowed and used when the ruby text container
   // is reflowed.
   nscoord mISize;
--- a/layout/generic/nsRubyTextFrame.h
+++ b/layout/generic/nsRubyTextFrame.h
@@ -43,13 +43,13 @@ public:
 
 #ifdef DEBUG_FRAME_DUMP
   virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
 #endif
 
 protected:
   friend nsContainerFrame* NS_NewRubyTextFrame(nsIPresShell* aPresShell,
                                                nsStyleContext* aContext);
-  nsRubyTextFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
+  explicit nsRubyTextFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
   nscoord mBaseline;
 };
 
 #endif /* nsRubyTextFrame_h___ */
--- a/layout/generic/nsSelection.cpp
+++ b/layout/generic/nsSelection.cpp
@@ -146,17 +146,17 @@ struct CachedOffsetForFrame {
 };
 
 // Stack-class to turn on/off selection batching for table selection
 class MOZ_STACK_CLASS nsSelectionBatcher MOZ_FINAL
 {
 private:
   nsCOMPtr<nsISelectionPrivate> mSelection;
 public:
-  nsSelectionBatcher(nsISelectionPrivate *aSelection) : mSelection(aSelection)
+  explicit nsSelectionBatcher(nsISelectionPrivate *aSelection) : mSelection(aSelection)
   {
     if (mSelection) mSelection->StartBatchChanges();
   }
   ~nsSelectionBatcher() 
   { 
     if (mSelection) mSelection->EndBatchChanges();
   }
 };
--- a/layout/generic/nsSimplePageSequenceFrame.h
+++ b/layout/generic/nsSimplePageSequenceFrame.h
@@ -109,17 +109,17 @@ public:
    */
   virtual nsIAtom* GetType() const MOZ_OVERRIDE;
 
 #ifdef DEBUG_FRAME_DUMP
   virtual nsresult  GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
 #endif
 
 protected:
-  nsSimplePageSequenceFrame(nsStyleContext* aContext);
+  explicit nsSimplePageSequenceFrame(nsStyleContext* aContext);
   virtual ~nsSimplePageSequenceFrame();
 
   void SetPageNumberFormat(const char* aPropName, const char* aDefPropVal, bool aPageNumOnly);
 
   // SharedPageData Helper methods
   void SetDateTimeStr(const nsAString& aDateTimeStr);
   void SetPageNumberFormat(const nsAString& aFormatStr, bool aForPageNumOnly);
 
--- a/layout/generic/nsSubDocumentFrame.cpp
+++ b/layout/generic/nsSubDocumentFrame.cpp
@@ -71,17 +71,17 @@ nsSubDocumentFrame::AccessibleType()
 
 NS_QUERYFRAME_HEAD(nsSubDocumentFrame)
   NS_QUERYFRAME_ENTRY(nsSubDocumentFrame)
 NS_QUERYFRAME_TAIL_INHERITING(nsLeafFrame)
 
 class AsyncFrameInit : public nsRunnable
 {
 public:
-  AsyncFrameInit(nsIFrame* aFrame) : mFrame(aFrame) {}
+  explicit AsyncFrameInit(nsIFrame* aFrame) : mFrame(aFrame) {}
   NS_IMETHOD Run()
   {
     if (mFrame.IsAlive()) {
       static_cast<nsSubDocumentFrame*>(mFrame.GetFrame())->ShowViewer();
     }
     return NS_OK;
   }
 private:
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -93,17 +93,17 @@ struct TabWidth {
     : mOffset(aOffset), mWidth(float(aWidth))
   { }
 
   uint32_t mOffset; // DOM offset relative to the current frame's offset.
   float    mWidth;  // extra space to be added at this position (in app units)
 };
 
 struct TabWidthStore {
-  TabWidthStore(int32_t aValidForContentOffset)
+  explicit TabWidthStore(int32_t aValidForContentOffset)
     : mLimit(0)
     , mValidForContentOffset(aValidForContentOffset)
   { }
 
   // Apply tab widths to the aSpacing array, which corresponds to characters
   // beginning at aOffset and has length aLength. (Width records outside this
   // range will be ignored.)
   void ApplySpacing(gfxTextRun::PropertyProvider::Spacing *aSpacing,
@@ -271,17 +271,17 @@ struct TextRunUserData {
 
 /**
  * This helper object computes colors used for painting, and also IME
  * underline information. The data is computed lazily and cached as necessary.
  * These live for just the duration of one paint operation.
  */
 class nsTextPaintStyle {
 public:
-  nsTextPaintStyle(nsTextFrame* aFrame);
+  explicit nsTextPaintStyle(nsTextFrame* aFrame);
 
   void SetResolveColors(bool aResolveColors) {
     NS_ASSERTION(mFrame->IsSVGText() || aResolveColors,
                  "must resolve colors is frame is not for SVG text");
     mResolveColors = aResolveColors;
   }
 
   nscolor GetTextColor();
@@ -3974,17 +3974,17 @@ public:
   virtual nsresult GetRenderedText(nsAString* aString = nullptr,
                                    gfxSkipChars* aSkipChars = nullptr,
                                    gfxSkipCharsIterator* aSkipIter = nullptr,
                                    uint32_t aSkippedStartOffset = 0,
                                    uint32_t aSkippedMaxLength = UINT32_MAX) MOZ_OVERRIDE
   { return NS_ERROR_NOT_IMPLEMENTED; } // Call on a primary text frame only
 
 protected:
-  nsContinuingTextFrame(nsStyleContext* aContext) : nsTextFrame(aContext) {}
+  explicit nsContinuingTextFrame(nsStyleContext* aContext) : nsTextFrame(aContext) {}
   nsIFrame* mPrevContinuation;
 };
 
 void
 nsContinuingTextFrame::Init(nsIContent*       aContent,
                             nsContainerFrame* aParent,
                             nsIFrame*         aPrevInFlow)
 {
--- a/layout/generic/nsTextFrame.h
+++ b/layout/generic/nsTextFrame.h
@@ -34,17 +34,17 @@ class nsTextFrame : public nsTextFrameBa
 public:
   NS_DECL_QUERYFRAME_TARGET(nsTextFrame)
   NS_DECL_FRAMEARENA_HELPERS
 
   friend class nsContinuingTextFrame;
   friend class nsDisplayTextGeometry;
   friend class nsDisplayText;
 
-  nsTextFrame(nsStyleContext* aContext)
+  explicit nsTextFrame(nsStyleContext* aContext)
     : nsTextFrameBase(aContext)
   {
     NS_ASSERTION(mContentOffset == 0, "Bogus content offset");
   }
   
   // nsQueryFrame
   NS_DECL_QUERYFRAME
 
@@ -313,17 +313,17 @@ public:
    * NS_TRANSPARENT, NS_SAME_AS_FOREGROUND_COLOR and
    * NS_40PERCENT_FOREGROUND_COLOR.
    */
   struct DrawPathCallbacks : gfxTextRunDrawCallbacks
   {
     /**
      * @param aShouldPaintSVGGlyphs Whether SVG glyphs should be painted.
      */
-    DrawPathCallbacks(bool aShouldPaintSVGGlyphs = false)
+    explicit DrawPathCallbacks(bool aShouldPaintSVGGlyphs = false)
       : gfxTextRunDrawCallbacks(aShouldPaintSVGGlyphs)
     {
     }
 
     /**
      * Called just before any paths have been emitted to the gfxContext
      * for the glyphs of the frame's text.
      */
--- a/layout/generic/nsVideoFrame.cpp
+++ b/layout/generic/nsVideoFrame.cpp
@@ -229,17 +229,17 @@ nsVideoFrame::BuildLayer(nsDisplayListBu
   layer->SetBaseTransform(gfx::Matrix4x4::From2D(transform));
   nsRefPtr<Layer> result = layer.forget();
   return result.forget();
 }
 
 class DispatchResizeToControls : public nsRunnable
 {
 public:
-  DispatchResizeToControls(nsIContent* aContent)
+  explicit DispatchResizeToControls(nsIContent* aContent)
     : mContent(aContent) {}
   NS_IMETHOD Run() MOZ_OVERRIDE {
     nsContentUtils::DispatchTrustedEvent(mContent->OwnerDoc(), mContent,
                                          NS_LITERAL_STRING("resizevideocontrols"),
                                          false, false);
     return NS_OK;
   }
   nsCOMPtr<nsIContent> mContent;
--- a/layout/generic/nsVideoFrame.h
+++ b/layout/generic/nsVideoFrame.h
@@ -28,17 +28,17 @@ class nsDisplayItem;
 
 class nsVideoFrame : public nsContainerFrame, public nsIAnonymousContentCreator
 {
 public:
   typedef mozilla::layers::Layer Layer;
   typedef mozilla::layers::LayerManager LayerManager;
   typedef mozilla::ContainerLayerParameters ContainerLayerParameters;
 
-  nsVideoFrame(nsStyleContext* aContext);
+  explicit nsVideoFrame(nsStyleContext* aContext);
 
   NS_DECL_QUERYFRAME
   NS_DECL_QUERYFRAME_TARGET(nsVideoFrame)
   NS_DECL_FRAMEARENA_HELPERS
 
   virtual void BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                                 const nsRect&           aDirtyRect,
                                 const nsDisplayListSet& aLists) MOZ_OVERRIDE;
--- a/layout/generic/nsViewportFrame.h
+++ b/layout/generic/nsViewportFrame.h
@@ -24,17 +24,17 @@ class nsPresContext;
 class ViewportFrame : public nsContainerFrame {
 public:
   NS_DECL_QUERYFRAME_TARGET(ViewportFrame)
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
   typedef nsContainerFrame Super;
 
-  ViewportFrame(nsStyleContext* aContext)
+  explicit ViewportFrame(nsStyleContext* aContext)
     : nsContainerFrame(aContext)
   {}
   virtual ~ViewportFrame() { } // useful for debugging
 
   virtual void Init(nsIContent*       aContent,
                     nsContainerFrame* aParent,
                     nsIFrame*         aPrevInFlow) MOZ_OVERRIDE;
 
--- a/layout/inspector/inDOMView.cpp
+++ b/layout/inspector/inDOMView.cpp
@@ -35,17 +35,17 @@ using namespace mozilla;
 
 ////////////////////////////////////////////////////////////////////////
 // inDOMViewNode
 
 class inDOMViewNode
 {
 public:
   inDOMViewNode() {}
-  inDOMViewNode(nsIDOMNode* aNode);
+  explicit inDOMViewNode(nsIDOMNode* aNode);
   ~inDOMViewNode();
 
   nsCOMPtr<nsIDOMNode> node;
 
   inDOMViewNode* parent;
   inDOMViewNode* next;
   inDOMViewNode* previous;
 
--- a/layout/inspector/inSearchLoop.h
+++ b/layout/inspector/inSearchLoop.h
@@ -7,17 +7,17 @@
 
 #include "nsCOMPtr.h"
 #include "nsITimer.h"
 #include "inISearchProcess.h"
 
 class inSearchLoop
 {
 public:
-  inSearchLoop(inISearchProcess* aSearchProcess);
+  explicit inSearchLoop(inISearchProcess* aSearchProcess);
   virtual ~inSearchLoop();
 
   nsresult Start();
   nsresult Step();
   nsresult Stop();
   static void TimerCallback(nsITimer *aTimer, void *aClosure);
 
 protected:
--- a/layout/ipc/RenderFrameParent.cpp
+++ b/layout/ipc/RenderFrameParent.cpp
@@ -73,17 +73,17 @@ already_AddRefed<LayerManager>
 GetFrom(nsFrameLoader* aFrameLoader)
 {
   nsIDocument* doc = aFrameLoader->GetOwnerDoc();
   return nsContentUtils::LayerManagerForDocument(doc);
 }
 
 class RemoteContentController : public GeckoContentController {
 public:
-  RemoteContentController(RenderFrameParent* aRenderFrame)
+  explicit RemoteContentController(RenderFrameParent* aRenderFrame)
     : mUILoop(MessageLoop::current())
     , mRenderFrame(aRenderFrame)
     , mHaveZoomConstraints(false)
   { }
 
   virtual void RequestContentRepaint(const FrameMetrics& aFrameMetrics) MOZ_OVERRIDE
   {
     // We always need to post requests into the "UI thread" otherwise the
--- a/layout/mathml/nsMathMLContainerFrame.h
+++ b/layout/mathml/nsMathMLContainerFrame.h
@@ -26,17 +26,17 @@
 // Options for the preferred size at which to stretch our stretchy children 
 #define STRETCH_CONSIDER_ACTUAL_SIZE    0x00000001 // just use our current size
 #define STRETCH_CONSIDER_EMBELLISHMENTS 0x00000002 // size calculations include embellishments
 
 class nsMathMLContainerFrame : public nsContainerFrame,
                                public nsMathMLFrame {
   friend class nsMathMLmfencedFrame;
 public:
-  nsMathMLContainerFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
+  explicit nsMathMLContainerFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
 
   NS_DECL_QUERYFRAME_TARGET(nsMathMLContainerFrame)
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
   // --------------------------------------------------------------------------
   // Overloaded nsMathMLFrame methods -- see documentation in nsIMathMLFrame.h
 
@@ -467,17 +467,17 @@ public:
 
   // See nsIMathMLFrame.h
   bool IsMrowLike() {
     return mFrames.FirstChild() != mFrames.LastChild() ||
            !mFrames.FirstChild();
   }
 
 protected:
-  nsMathMLmathBlockFrame(nsStyleContext* aContext) : nsBlockFrame(aContext) {
+  explicit nsMathMLmathBlockFrame(nsStyleContext* aContext) : nsBlockFrame(aContext) {
     // We should always have a float manager.  Not that things can really try
     // to float out of us anyway, but we need one for line layout.
     AddStateBits(NS_BLOCK_FLOAT_MGR);
   }
   virtual ~nsMathMLmathBlockFrame() {}
 };
 
 // --------------
@@ -543,13 +543,13 @@ public:
 
   bool
   IsMrowLike() MOZ_OVERRIDE {
     return mFrames.FirstChild() != mFrames.LastChild() ||
            !mFrames.FirstChild();
   }
 
 protected:
-  nsMathMLmathInlineFrame(nsStyleContext* aContext) : nsInlineFrame(aContext) {}
+  explicit nsMathMLmathInlineFrame(nsStyleContext* aContext) : nsInlineFrame(aContext) {}
   virtual ~nsMathMLmathInlineFrame() {}
 };
 
 #endif /* nsMathMLContainerFrame_h___ */
--- a/layout/mathml/nsMathMLSelectedFrame.h
+++ b/layout/mathml/nsMathMLSelectedFrame.h
@@ -38,17 +38,17 @@ public:
   Reflow(nsPresContext*          aPresContext,
          nsHTMLReflowMetrics&     aDesiredSize,
          const nsHTMLReflowState& aReflowState,
          nsReflowStatus&          aStatus) MOZ_OVERRIDE;
 
   virtual nsQueryFrame::FrameIID GetFrameId() = 0;
 
 protected:
-  nsMathMLSelectedFrame(nsStyleContext* aContext) :
+  explicit nsMathMLSelectedFrame(nsStyleContext* aContext) :
     nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLSelectedFrame();
   
   virtual nsIFrame* GetSelectedFrame() = 0;
   nsIFrame*       mSelectedFrame;
 
   bool            mInvalidMarkup;
   
--- a/layout/mathml/nsMathMLTokenFrame.h
+++ b/layout/mathml/nsMathMLTokenFrame.h
@@ -54,15 +54,15 @@ public:
          nsReflowStatus&          aStatus) MOZ_OVERRIDE;
 
   virtual nsresult
   Place(nsRenderingContext& aRenderingContext,
         bool                 aPlaceOrigin,
         nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE;
 
 protected:
-  nsMathMLTokenFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
+  explicit nsMathMLTokenFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLTokenFrame();
 
   void MarkTextFramesAsTokenMathML();
 };
 
 #endif /* nsMathMLTokentFrame_h___ */
--- a/layout/mathml/nsMathMLmactionFrame.h
+++ b/layout/mathml/nsMathMLmactionFrame.h
@@ -47,23 +47,23 @@ private:
   {
   private:
     ~MouseListener() {}
 
   public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIDOMEVENTLISTENER
 
-    MouseListener(nsMathMLmactionFrame* aOwner) : mOwner(aOwner) { }
+    explicit MouseListener(nsMathMLmactionFrame* aOwner) : mOwner(aOwner) { }
 
     nsMathMLmactionFrame* mOwner;
   };
 
 protected:
-  nsMathMLmactionFrame(nsStyleContext* aContext) :
+  explicit nsMathMLmactionFrame(nsStyleContext* aContext) :
     nsMathMLSelectedFrame(aContext) {}
   virtual ~nsMathMLmactionFrame();
   
 private:
   int32_t         mActionType;
   int32_t         mChildCount;
   int32_t         mSelection;
   nsRefPtr<MouseListener> mListener;
--- a/layout/mathml/nsMathMLmencloseFrame.h
+++ b/layout/mathml/nsMathMLmencloseFrame.h
@@ -84,17 +84,17 @@ public:
 
   bool
   IsMrowLike() MOZ_OVERRIDE {
     return mFrames.FirstChild() != mFrames.LastChild() ||
            !mFrames.FirstChild();
   }
 
 protected:
-  nsMathMLmencloseFrame(nsStyleContext* aContext);
+  explicit nsMathMLmencloseFrame(nsStyleContext* aContext);
   virtual ~nsMathMLmencloseFrame();
 
   nsresult PlaceInternal(nsRenderingContext& aRenderingContext,
                          bool                 aPlaceOrigin,
                          nsHTMLReflowMetrics& aDesiredSize,
                          bool                 aWidthOnly);
   
   // functions to parse the "notation" attribute.
--- a/layout/mathml/nsMathMLmfencedFrame.h
+++ b/layout/mathml/nsMathMLmfencedFrame.h
@@ -87,17 +87,17 @@ public:
     // <mfenced> <mo>%</mo> </mfenced>
     // renders equivalently to
     // <mrow> <mo> ( </mo> <mo>%</mo> <mo> ) </mo> </mrow>
     // This also holds with multiple children.  (MathML3 3.3.8.1)
     return true;
   }
 
 protected:
-  nsMathMLmfencedFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
+  explicit nsMathMLmfencedFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLmfencedFrame();
   
   nsMathMLChar* mOpenChar;
   nsMathMLChar* mCloseChar;
   nsMathMLChar* mSeparatorsChar;
   int32_t       mSeparatorsCount;
 
   // clean up
--- a/layout/mathml/nsMathMLmfracFrame.h
+++ b/layout/mathml/nsMathMLmfracFrame.h
@@ -84,17 +84,17 @@ public:
                     nsString&        aThicknessAttribute,
                     nscoord          onePixel,
                     nscoord          aDefaultRuleThickness);
 
   uint8_t
   ScriptIncrement(nsIFrame* aFrame) MOZ_OVERRIDE;
 
 protected:
-  nsMathMLmfracFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
+  explicit nsMathMLmfracFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLmfracFrame();
   
   nsresult PlaceInternal(nsRenderingContext& aRenderingContext,
                          bool                 aPlaceOrigin,
                          nsHTMLReflowMetrics& aDesiredSize,
                          bool                 aWidthOnly);
 
   // Display a slash
--- a/layout/mathml/nsMathMLmmultiscriptsFrame.h
+++ b/layout/mathml/nsMathMLmmultiscriptsFrame.h
@@ -38,15 +38,15 @@ public:
                     nsMathMLContainerFrame* aForFrame,
                     nscoord              aUserSubScriptShift,
                     nscoord              aUserSupScriptShift);
 
   uint8_t
   ScriptIncrement(nsIFrame* aFrame) MOZ_OVERRIDE;
 
 protected:
-  nsMathMLmmultiscriptsFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
+  explicit nsMathMLmmultiscriptsFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLmmultiscriptsFrame();
   
 
 };
 
 #endif /* nsMathMLmmultiscriptsFrame_h___ */
--- a/layout/mathml/nsMathMLmoFrame.h
+++ b/layout/mathml/nsMathMLmoFrame.h
@@ -70,17 +70,17 @@ public:
   virtual nsresult
   ChildListChanged(int32_t aModType) MOZ_OVERRIDE
   {
     ProcessTextData();
     return nsMathMLContainerFrame::ChildListChanged(aModType);
   }
 
 protected:
-  nsMathMLmoFrame(nsStyleContext* aContext) : nsMathMLTokenFrame(aContext) {}
+  explicit nsMathMLmoFrame(nsStyleContext* aContext) : nsMathMLTokenFrame(aContext) {}
   virtual ~nsMathMLmoFrame();
   
   nsMathMLChar     mMathMLChar; // Here is the MathMLChar that will deal with the operator.
   nsOperatorFlags  mFlags;
   float            mMinSize;
   float            mMaxSize;
 
   bool UseMathMLChar();
--- a/layout/mathml/nsMathMLmpaddedFrame.h
+++ b/layout/mathml/nsMathMLmpaddedFrame.h
@@ -40,17 +40,17 @@ public:
 
   bool
   IsMrowLike() MOZ_OVERRIDE {
     return mFrames.FirstChild() != mFrames.LastChild() ||
            !mFrames.FirstChild();
   }
 
 protected:
-  nsMathMLmpaddedFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
+  explicit nsMathMLmpaddedFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLmpaddedFrame();
   
   virtual nsresult
   MeasureForWidth(nsRenderingContext& aRenderingContext,
                   nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE;
 
 private:
   nsCSSValue mWidth;
--- a/layout/mathml/nsMathMLmphantomFrame.h
+++ b/layout/mathml/nsMathMLmphantomFrame.h
@@ -33,14 +33,14 @@ public:
 
   bool
   IsMrowLike() MOZ_OVERRIDE {
     return mFrames.FirstChild() != mFrames.LastChild() ||
            !mFrames.FirstChild();
   }
 
 protected:
-  nsMathMLmphantomFrame(nsStyleContext* aContext)
+  explicit nsMathMLmphantomFrame(nsStyleContext* aContext)
     : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLmphantomFrame();
 };
 
 #endif /* nsMathMLmphantomFrame_h___ */
--- a/layout/mathml/nsMathMLmrootFrame.h
+++ b/layout/mathml/nsMathMLmrootFrame.h
@@ -56,16 +56,16 @@ public:
 
   uint8_t
   ScriptIncrement(nsIFrame* aFrame) MOZ_OVERRIDE
   {
     return (aFrame && aFrame == mFrames.LastChild()) ? 2 : 0;
   }
 
 protected:
-  nsMathMLmrootFrame(nsStyleContext* aContext);
+  explicit nsMathMLmrootFrame(nsStyleContext* aContext);
   virtual ~nsMathMLmrootFrame();
   
   nsMathMLChar mSqrChar;
   nsRect       mBarRect;
 };
 
 #endif /* nsMathMLmrootFrame_h___ */
--- a/layout/mathml/nsMathMLmrowFrame.h
+++ b/layout/mathml/nsMathMLmrowFrame.h
@@ -40,13 +40,13 @@ public:
     // <mrow> elements with a single child are treated identically to the case
     // where the child wasn't within an mrow, so we pretend the mrow isn't an
     // mrow in that situation.
     return mFrames.FirstChild() != mFrames.LastChild() ||
            !mFrames.FirstChild();
   }
 
 protected:
-  nsMathMLmrowFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
+  explicit nsMathMLmrowFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLmrowFrame();
 };
 
 #endif /* nsMathMLmrowFrame_h___ */
--- a/layout/mathml/nsMathMLmspaceFrame.h
+++ b/layout/mathml/nsMathMLmspaceFrame.h
@@ -31,17 +31,17 @@ public:
 
   virtual void
   Reflow(nsPresContext*          aPresContext,
          nsHTMLReflowMetrics&     aDesiredSize,
          const nsHTMLReflowState& aReflowState,
          nsReflowStatus&          aStatus) MOZ_OVERRIDE;
   
 protected:
-  nsMathMLmspaceFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
+  explicit nsMathMLmspaceFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLmspaceFrame();
 
   virtual nsresult
   MeasureForWidth(nsRenderingContext& aRenderingContext,
                   nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE;
 
 private:
   nscoord mWidth;
--- a/layout/mathml/nsMathMLmsqrtFrame.h
+++ b/layout/mathml/nsMathMLmsqrtFrame.h
@@ -55,14 +55,14 @@ public:
   virtual bool
   IsMrowLike() MOZ_OVERRIDE
   {
     return mFrames.FirstChild() != mFrames.LastChild() ||
            !mFrames.FirstChild();
   }
 
 protected:
-  nsMathMLmsqrtFrame(nsStyleContext* aContext);
+  explicit nsMathMLmsqrtFrame(nsStyleContext* aContext);
   virtual ~nsMathMLmsqrtFrame();
 };
 
 #endif /* nsMathMLmsqrtFrame_h___ */
 
--- a/layout/mathml/nsMathMLmtableFrame.h
+++ b/layout/mathml/nsMathMLmtableFrame.h
@@ -41,17 +41,17 @@ public:
                    int32_t  aModType) MOZ_OVERRIDE;
 
   virtual bool IsFrameOfType(uint32_t aFlags) const MOZ_OVERRIDE
   {
     return nsTableOuterFrame::IsFrameOfType(aFlags & ~(nsIFrame::eMathML));
   }
 
 protected:
-  nsMathMLmtableOuterFrame(nsStyleContext* aContext) : nsTableOuterFrame(aContext) {}
+  explicit nsMathMLmtableOuterFrame(nsStyleContext* aContext) : nsTableOuterFrame(aContext) {}
   virtual ~nsMathMLmtableOuterFrame();
 
   // helper to find the row frame at a given index, positive or negative, e.g.,
   // 1..n means the first row down to the last row, -1..-n means the last row
   // up to the first row. Used for alignments that are relative to a given row
   nsIFrame*
   GetRowFrameAt(nsPresContext* aPresContext,
                 int32_t         aRowIndex);
@@ -152,17 +152,17 @@ public:
   void SetUseCSSSpacing();
 
   bool GetUseCSSSpacing()
   {
     return mUseCSSSpacing;
   }
 
 protected:
-  nsMathMLmtableFrame(nsStyleContext* aContext) : nsTableFrame(aContext) {}
+  explicit nsMathMLmtableFrame(nsStyleContext* aContext) : nsTableFrame(aContext) {}
   virtual ~nsMathMLmtableFrame();
 
 private:
   nsTArray<nscoord> mColSpacing;
   nsTArray<nscoord> mRowSpacing;
   nscoord mFrameSpacingX;
   nscoord mFrameSpacingY;
   bool mUseCSSSpacing;
@@ -221,17 +221,17 @@ public:
     nsTableFrame* tableFrame = nsTableFrame::GetTableFrame(this);
     if (tableFrame && tableFrame->IsFrameOfType(nsIFrame::eMathML)) {
       // relayout the table
       ((nsMathMLmtableFrame*)tableFrame)->RestyleTable();
     }
   }
 
 protected:
-  nsMathMLmtrFrame(nsStyleContext* aContext) : nsTableRowFrame(aContext) {}
+  explicit nsMathMLmtrFrame(nsStyleContext* aContext) : nsTableRowFrame(aContext) {}
   virtual ~nsMathMLmtrFrame();
 }; // class nsMathMLmtrFrame
 
 // --------------
 
 class nsMathMLmtdFrame : public nsTableCellFrame
 {
 public:
@@ -259,17 +259,17 @@ public:
     return nsTableCellFrame::IsFrameOfType(aFlags & ~(nsIFrame::eMathML));
   }
 
   virtual nsMargin* GetBorderWidth(nsMargin& aBorder) const MOZ_OVERRIDE;
 
   virtual nsMargin GetBorderOverflow() MOZ_OVERRIDE;
 
 protected:
-  nsMathMLmtdFrame(nsStyleContext* aContext) : nsTableCellFrame(aContext) {}
+  explicit nsMathMLmtdFrame(nsStyleContext* aContext) : nsTableCellFrame(aContext) {}
   virtual ~nsMathMLmtdFrame();
 }; // class nsMathMLmtdFrame
 
 // --------------
 
 class nsMathMLmtdInnerFrame : public nsBlockFrame,
                               public nsMathMLFrame {
 public:
@@ -308,16 +308,16 @@ public:
 
   bool
   IsMrowLike() MOZ_OVERRIDE {
     return mFrames.FirstChild() != mFrames.LastChild() ||
            !mFrames.FirstChild();
   }
 
 protected:
-  nsMathMLmtdInnerFrame(nsStyleContext* aContext);
+  explicit nsMathMLmtdInnerFrame(nsStyleContext* aContext);
   virtual ~nsMathMLmtdInnerFrame();
 
   nsStyleText* mUniqueStyleText;
 
 };  // class nsMathMLmtdInnerFrame
 
 #endif /* nsMathMLmtableFrame_h___ */
--- a/layout/mathml/nsMathMLmunderoverFrame.h
+++ b/layout/mathml/nsMathMLmunderoverFrame.h
@@ -38,19 +38,19 @@ public:
   AttributeChanged(int32_t         aNameSpaceID,
                    nsIAtom*        aAttribute,
                    int32_t         aModType) MOZ_OVERRIDE;
 
   uint8_t
   ScriptIncrement(nsIFrame* aFrame) MOZ_OVERRIDE;
 
 protected:
-  nsMathMLmunderoverFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext),
-                                                      mIncrementUnder(false),
-                                                      mIncrementOver(false) {}
+  explicit nsMathMLmunderoverFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext),
+                                                               mIncrementUnder(false),
+                                                               mIncrementOver(false) {}
   virtual ~nsMathMLmunderoverFrame();
 
 private:
   bool mIncrementUnder;
   bool mIncrementOver;
 };
 
 
--- a/layout/mathml/nsMathMLsemanticsFrame.h
+++ b/layout/mathml/nsMathMLsemanticsFrame.h
@@ -16,16 +16,16 @@
 class nsMathMLsemanticsFrame : public nsMathMLSelectedFrame {
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
   friend nsIFrame* NS_NewMathMLsemanticsFrame(nsIPresShell* aPresShell,
                                               nsStyleContext* aContext);
 
 protected:
-  nsMathMLsemanticsFrame(nsStyleContext* aContext) :
+  explicit nsMathMLsemanticsFrame(nsStyleContext* aContext) :
     nsMathMLSelectedFrame(aContext) {}
   virtual ~nsMathMLsemanticsFrame();
 
   nsIFrame* GetSelectedFrame() MOZ_OVERRIDE;
 };
 
 #endif /* nsMathMLsemanticsFrame_h___ */
--- a/layout/printing/nsPrintEngine.cpp
+++ b/layout/printing/nsPrintEngine.cpp
@@ -183,17 +183,17 @@ static void DumpPrintObjectsTreeLayout(n
 #define DUMP_DOC_LIST(_title)
 #define DUMP_DOC_TREE
 #define DUMP_DOC_TREELAYOUT
 #endif
 
 class nsScriptSuppressor
 {
 public:
-  nsScriptSuppressor(nsPrintEngine* aPrintEngine)
+  explicit nsScriptSuppressor(nsPrintEngine* aPrintEngine)
   : mPrintEngine(aPrintEngine), mSuppressed(false) {}
 
   ~nsScriptSuppressor() { Unsuppress(); }
 
   void Suppress()
   {
     if (mPrintEngine) {
       mSuppressed = true;
@@ -3596,17 +3596,17 @@ nsPrintEngine::Observe(nsISupports *aSub
 
 }
 
 //---------------------------------------------------------------
 //-- PLEvent Notification
 //---------------------------------------------------------------
 class nsPrintCompletionEvent : public nsRunnable {
 public:
-  nsPrintCompletionEvent(nsIDocumentViewerPrint *docViewerPrint)
+  explicit nsPrintCompletionEvent(nsIDocumentViewerPrint *docViewerPrint)
     : mDocViewerPrint(docViewerPrint) {
     NS_ASSERTION(mDocViewerPrint, "mDocViewerPrint is null.");
   }
 
   NS_IMETHOD Run() MOZ_OVERRIDE {
     if (mDocViewerPrint)
       mDocViewerPrint->OnDonePrinting();
     return NS_OK;
--- a/layout/printing/nsPrintPreviewListener.h
+++ b/layout/printing/nsPrintPreviewListener.h
@@ -29,17 +29,17 @@ class EventTarget;
 //
 class nsPrintPreviewListener MOZ_FINAL : public nsIDOMEventListener
 
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDOMEVENTLISTENER
 
-  nsPrintPreviewListener(mozilla::dom::EventTarget* aTarget);
+  explicit nsPrintPreviewListener(mozilla::dom::EventTarget* aTarget);
 
   // Add/remove the relevant listeners, based on what interfaces
   // the embedding chrome implements.
   nsresult AddListeners();
   nsresult RemoveListeners();
 
 private:
   ~nsPrintPreviewListener();
--- a/layout/style/CSSStyleSheet.cpp
+++ b/layout/style/CSSStyleSheet.cpp
@@ -48,17 +48,17 @@ using namespace mozilla;
 using namespace mozilla::dom;
 
 // -------------------------------
 // Style Rule List for the DOM
 //
 class CSSRuleListImpl MOZ_FINAL : public CSSRuleList
 {
 public:
-  CSSRuleListImpl(CSSStyleSheet *aStyleSheet);
+  explicit CSSRuleListImpl(CSSStyleSheet *aStyleSheet);
 
   virtual CSSStyleSheet* GetParentObject() MOZ_OVERRIDE;
 
   virtual nsIDOMCSSRule*
   IndexedGetter(uint32_t aIndex, bool& aFound) MOZ_OVERRIDE;
   virtual uint32_t
   Length() MOZ_OVERRIDE;
 
--- a/layout/style/CSSVariableResolver.cpp
+++ b/layout/style/CSSVariableResolver.cpp
@@ -18,17 +18,17 @@ namespace mozilla {
 
 /**
  * Data used by the EnumerateVariableReferences callback.  Reset must be called
  * on it before it is used.
  */
 class EnumerateVariableReferencesData
 {
 public:
-  EnumerateVariableReferencesData(CSSVariableResolver& aResolver)
+  explicit EnumerateVariableReferencesData(CSSVariableResolver& aResolver)
     : mResolver(aResolver)
     , mReferences(new bool[aResolver.mVariables.Length()])
   {
   }
 
   /**
    * Resets the data so that it can be passed to another call of
    * EnumerateVariableReferences for a different variable.
--- a/layout/style/CSSVariableResolver.h
+++ b/layout/style/CSSVariableResolver.h
@@ -27,17 +27,17 @@ class CSSVariableResolver
   friend class CSSVariableDeclarations;
   friend class CSSVariableValues;
   friend class EnumerateVariableReferencesData;
 public:
   /**
    * Creates a new CSSVariableResolver that will output a set of resolved,
    * computed variables into aOutput.
    */
-  CSSVariableResolver(CSSVariableValues* aOutput)
+  explicit CSSVariableResolver(CSSVariableValues* aOutput)
     : mOutput(aOutput)
 #ifdef DEBUG
     , mResolved(false)
 #endif
   {
     MOZ_ASSERT(aOutput);
   }
 
--- a/layout/style/CounterStyleManager.cpp
+++ b/layout/style/CounterStyleManager.cpp
@@ -549,17 +549,17 @@ public:
 
   // will be initialized by CounterStyleManager::InitializeBuiltinCounterStyles
   MOZ_CONSTEXPR BuiltinCounterStyle()
     : CounterStyle(NS_STYLE_LIST_STYLE_NONE)
   {
   }
 
 protected:
-  MOZ_CONSTEXPR BuiltinCounterStyle(int32_t aStyle)
+  MOZ_CONSTEXPR explicit BuiltinCounterStyle(int32_t aStyle)
     : CounterStyle(aStyle)
   {
   }
 
 public:
   virtual void GetPrefix(nsSubstring& aResult) MOZ_OVERRIDE;
   virtual void GetSuffix(nsSubstring& aResult) MOZ_OVERRIDE;
   virtual void GetSpokenCounterText(CounterValue aOrdinal,
--- a/layout/style/ImageLoader.h
+++ b/layout/style/ImageLoader.h
@@ -28,17 +28,17 @@ namespace css {
 
 struct ImageValue;
 
 class ImageLoader MOZ_FINAL : public imgINotificationObserver,
                               public imgIOnloadBlocker {
 public:
   typedef mozilla::css::ImageValue Image;
 
-  ImageLoader(nsIDocument* aDocument)
+  explicit ImageLoader(nsIDocument* aDocument)
   : mDocument(aDocument),
     mInClone(false)
   {
     MOZ_ASSERT(mDocument);
   }
 
   NS_DECL_ISUPPORTS
   NS_DECL_IMGIONLOADBLOCKER
--- a/layout/style/StyleRule.cpp
+++ b/layout/style/StyleRule.cpp
@@ -996,17 +996,17 @@ class DOMCSSStyleRule;
 }
 
 class DOMCSSDeclarationImpl : public nsDOMCSSDeclaration
 {
 protected:
   virtual ~DOMCSSDeclarationImpl(void);
 
 public:
-  DOMCSSDeclarationImpl(css::StyleRule *aRule);
+  explicit DOMCSSDeclarationImpl(css::StyleRule *aRule);
 
   NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent) MOZ_OVERRIDE;
   void DropReference(void);
   virtual css::Declaration* GetCSSDeclaration(bool aAllocate) MOZ_OVERRIDE;
   virtual nsresult SetCSSDeclaration(css::Declaration* aDecl) MOZ_OVERRIDE;
   virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv) MOZ_OVERRIDE;
   virtual nsIDocument* DocToUpdate() MOZ_OVERRIDE;
 
@@ -1037,17 +1037,17 @@ private:
 };
 
 namespace mozilla {
 namespace css {
 
 class DOMCSSStyleRule : public nsICSSStyleRuleDOMWrapper
 {
 public:
-  DOMCSSStyleRule(StyleRule *aRule);
+  explicit DOMCSSStyleRule(StyleRule *aRule);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMCSSStyleRule)
   NS_DECL_NSIDOMCSSRULE
   NS_DECL_NSIDOMCSSSTYLERULE
 
   // nsICSSStyleRuleDOMWrapper
   NS_IMETHOD GetCSSStyleRule(StyleRule **aResult);
--- a/layout/style/nsCSSDataBlock.h
+++ b/layout/style/nsCSSDataBlock.h
@@ -33,17 +33,17 @@ class Declaration;
  * |nsCSSExpandedDataBlock| or in some cases via direct slot access.
  */
 class nsCSSCompressedDataBlock {
 private:
     friend class nsCSSExpandedDataBlock;
 
     // Only this class (via |CreateEmptyBlock|) or nsCSSExpandedDataBlock
     // (in |Compress|) can create compressed data blocks.
-    nsCSSCompressedDataBlock(uint32_t aNumProps)
+    explicit nsCSSCompressedDataBlock(uint32_t aNumProps)
       : mStyleBits(0), mNumProps(aNumProps)
     {}
 
 public:
     ~nsCSSCompressedDataBlock();
 
     /**
      * Do what |nsIStyleRule::MapRuleInfoInto| needs to do for a style
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -321,17 +321,17 @@ protected:
   friend void AppendRuleToSheet(css::Rule*, void*); // calls AppendRule
 
   /**
    * This helper class automatically calls SetParsingCompoundProperty in its
    * constructor and takes care of resetting it to false in its destructor.
    */
   class nsAutoParseCompoundProperty {
     public:
-      nsAutoParseCompoundProperty(CSSParserImpl* aParser) : mParser(aParser)
+      explicit nsAutoParseCompoundProperty(CSSParserImpl* aParser) : mParser(aParser)
       {
         NS_ASSERTION(!aParser->IsParsingCompoundProperty(),
                      "already parsing compound property");
         NS_ASSERTION(aParser, "Null parser?");
         aParser->SetParsingCompoundProperty(true);
       }
 
       ~nsAutoParseCompoundProperty()
@@ -371,18 +371,18 @@ protected:
   };
 
   /**
    * Auto class to set aParser->mSuppressErrors to the specified value
    * and restore it to its original value later.
    */
   class nsAutoSuppressErrors {
     public:
-      nsAutoSuppressErrors(CSSParserImpl* aParser,
-                           bool aSuppressErrors = true)
+      explicit nsAutoSuppressErrors(CSSParserImpl* aParser,
+                                    bool aSuppressErrors = true)
         : mParser(aParser),
           mOriginalValue(aParser->mSuppressErrors)
       {
         mParser->mSuppressErrors = aSuppressErrors;
       }
 
       ~nsAutoSuppressErrors()
       {
--- a/layout/style/nsCSSParser.h
+++ b/layout/style/nsCSSParser.h
@@ -36,18 +36,18 @@ class Loader;
 class StyleRule;
 }
 }
 
 // Interface to the css parser.
 
 class MOZ_STACK_CLASS nsCSSParser {
 public:
-  nsCSSParser(mozilla::css::Loader* aLoader = nullptr,
-              mozilla::CSSStyleSheet* aSheet = nullptr);
+  explicit nsCSSParser(mozilla::css::Loader* aLoader = nullptr,
+                       mozilla::CSSStyleSheet* aSheet = nullptr);
   ~nsCSSParser();
 
   static void Shutdown();
 
 private:
   nsCSSParser(nsCSSParser const&) MOZ_DELETE;
   nsCSSParser& operator=(nsCSSParser const&) MOZ_DELETE;
 
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -449,17 +449,17 @@ static const PLDHashTableOps RuleHash_Na
 #else
 #define RULE_HASH_STAT_INCREMENT(var_) PR_BEGIN_MACRO PR_END_MACRO
 #endif
 
 struct NodeMatchContext;
 
 class RuleHash {
 public:
-  RuleHash(bool aQuirksMode);
+  explicit RuleHash(bool aQuirksMode);
   ~RuleHash();
   void AppendRule(const RuleSelectorPair &aRuleInfo);
   void EnumerateAllRules(Element* aElement, ElementDependentRuleProcessorData* aData,
                          NodeMatchContext& aNodeMatchContext);
 
   size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const;
   size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const;
 
@@ -2715,17 +2715,17 @@ bool
 nsCSSRuleProcessor::HasDocumentStateDependentStyle(StateRuleProcessorData* aData)
 {
   RuleCascadeData* cascade = GetRuleCascade(aData->mPresContext);
 
   return cascade && cascade->mSelectorDocumentStates.HasAtLeastOneOfStates(aData->mStateMask);
 }
 
 struct AttributeEnumData {
-  AttributeEnumData(AttributeRuleProcessorData *aData)
+  explicit AttributeEnumData(AttributeRuleProcessorData *aData)
     : data(aData), change(nsRestyleHint(0)) {}
 
   AttributeRuleProcessorData *data;
   nsRestyleHint change;
 };
 
 
 static void
@@ -3420,17 +3420,17 @@ static int CompareWeightData(const void*
 {
   const PerWeightData* arg1 = static_cast<const PerWeightData*>(aArg1);
   const PerWeightData* arg2 = static_cast<const PerWeightData*>(aArg2);
   return arg1->mWeight - arg2->mWeight; // put lower weight first
 }
 
 
 struct FillWeightArrayData {
-  FillWeightArrayData(PerWeightData* aArrayData) :
+  explicit FillWeightArrayData(PerWeightData* aArrayData) :
     mIndex(0),
     mWeightArray(aArrayData)
   {
   }
   int32_t mIndex;
   PerWeightData* mWeightArray;
 };
 
--- a/layout/style/nsCSSRules.cpp
+++ b/layout/style/nsCSSRules.cpp
@@ -133,17 +133,17 @@ Rule::SizeOfCOMArrayElementIncludingThis
 
 // -------------------------------
 // Style Rule List for group rules
 //
 
 class GroupRuleRuleList MOZ_FINAL : public dom::CSSRuleList
 {
 public:
-  GroupRuleRuleList(GroupRule *aGroupRule);
+  explicit GroupRuleRuleList(GroupRule *aGroupRule);
 
   virtual CSSStyleSheet* GetParentObject() MOZ_OVERRIDE;
 
   virtual nsIDOMCSSRule*
   IndexedGetter(uint32_t aIndex, bool& aFound) MOZ_OVERRIDE;
   virtual uint32_t
   Length() MOZ_OVERRIDE;
 
@@ -2072,17 +2072,17 @@ nsCSSFontFeatureValuesRule::GetValueText
 
 NS_IMETHODIMP
 nsCSSFontFeatureValuesRule::SetValueText(const nsAString& aValueText)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 struct MakeFamilyArray {
-  MakeFamilyArray(nsTArray<nsString>& aFamilyArray)
+  explicit MakeFamilyArray(nsTArray<nsString>& aFamilyArray)
     : familyArray(aFamilyArray), hasGeneric(false)
   {}
 
   static bool
   AddFamily(const nsString& aFamily, bool aGeneric, void* aData)
   {
     MakeFamilyArray *familyArr = reinterpret_cast<MakeFamilyArray*> (aData);
     if (!aGeneric && !aFamily.IsEmpty()) {
--- a/layout/style/nsCSSRules.h
+++ b/layout/style/nsCSSRules.h
@@ -389,17 +389,17 @@ private:
 } // namespace css
 } // namespace mozilla
 
 class nsCSSKeyframeRule;
 
 class nsCSSKeyframeStyleDeclaration MOZ_FINAL : public nsDOMCSSDeclaration
 {
 public:
-  nsCSSKeyframeStyleDeclaration(nsCSSKeyframeRule *aRule);
+  explicit nsCSSKeyframeStyleDeclaration(nsCSSKeyframeRule *aRule);
 
   NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent) MOZ_OVERRIDE;
   void DropReference() { mRule = nullptr; }
   virtual mozilla::css::Declaration* GetCSSDeclaration(bool aAllocate) MOZ_OVERRIDE;
   virtual nsresult SetCSSDeclaration(mozilla::css::Declaration* aDecl) MOZ_OVERRIDE;
   virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv) MOZ_OVERRIDE;
   virtual nsIDocument* DocToUpdate() MOZ_OVERRIDE;
 
@@ -522,17 +522,17 @@ private:
   nsString                                   mName;
 };
 
 class nsCSSPageRule;
 
 class nsCSSPageStyleDeclaration MOZ_FINAL : public nsDOMCSSDeclaration
 {
 public:
-  nsCSSPageStyleDeclaration(nsCSSPageRule *aRule);
+  explicit nsCSSPageStyleDeclaration(nsCSSPageRule *aRule);
 
   NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent) MOZ_OVERRIDE;
   void DropReference() { mRule = nullptr; }
   virtual mozilla::css::Declaration* GetCSSDeclaration(bool aAllocate) MOZ_OVERRIDE;
   virtual nsresult SetCSSDeclaration(mozilla::css::Declaration* aDecl) MOZ_OVERRIDE;
   virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv) MOZ_OVERRIDE;
   virtual nsIDocument* DocToUpdate() MOZ_OVERRIDE;
 
--- a/layout/style/nsFontFaceLoader.h
+++ b/layout/style/nsFontFaceLoader.h
@@ -22,17 +22,17 @@ class nsPresContext;
 class nsIPrincipal;
 
 class nsFontFaceLoader;
 
 // nsUserFontSet - defines the loading mechanism for downloadable fonts
 class nsUserFontSet : public gfxUserFontSet
 {
 public:
-  nsUserFontSet(nsPresContext* aContext);
+  explicit nsUserFontSet(nsPresContext* aContext);
 
   // Called when this font set is no longer associated with a presentation.
   void Destroy();
 
   // starts loading process, creating and initializing a nsFontFaceLoader obj
   // returns whether load process successfully started or not
   nsresult StartLoad(gfxMixedFontFamily* aFamily,
                      gfxProxyFontEntry* aFontToLoad,
--- a/layout/style/nsHTMLStyleSheet.h
+++ b/layout/style/nsHTMLStyleSheet.h
@@ -23,17 +23,17 @@
 #include "nsString.h"
 
 class nsIDocument;
 class nsMappedAttributes;
 
 class nsHTMLStyleSheet MOZ_FINAL : public nsIStyleRuleProcessor
 {
 public:
-  nsHTMLStyleSheet(nsIDocument* aDocument);
+  explicit nsHTMLStyleSheet(nsIDocument* aDocument);
 
   void SetOwningDocument(nsIDocument* aDocument);
 
   NS_DECL_ISUPPORTS
 
   // nsIStyleRuleProcessor API
   virtual void RulesMatching(ElementRuleProcessorData* aData) MOZ_OVERRIDE;
   virtual void RulesMatching(PseudoElementRuleProcessorData* aData) MOZ_OVERRIDE;
@@ -131,17 +131,17 @@ private:
 public: // for mLangRuleTable structures only
 
   // Rule to handle xml:lang attributes, of which we have exactly one
   // per language string, maintained in mLangRuleTable.
   class LangRule MOZ_FINAL : public nsIStyleRule {
   private:
     ~LangRule() {}
   public:
-    LangRule(const nsSubstring& aLang) : mLang(aLang) {}
+    explicit LangRule(const nsSubstring& aLang) : mLang(aLang) {}
 
     NS_DECL_ISUPPORTS
 
     // nsIStyleRule interface
     virtual void MapRuleInfoInto(nsRuleData* aRuleData) MOZ_OVERRIDE;
   #ifdef DEBUG
     virtual void List(FILE* out = stdout, int32_t aIndent = 0) const MOZ_OVERRIDE;
   #endif
--- a/layout/style/nsIMediaList.h
+++ b/layout/style/nsIMediaList.h
@@ -56,17 +56,17 @@ struct nsMediaExpression {
  * The implementation could be further optimized in the future to store
  * ranges (combinations of less-than, less-than-or-equal, greater-than,
  * greater-than-or-equal, equal, not-equal, present, not-present) for
  * each feature rather than simply storing the list of expressions.
  * However, this requires combining any such ranges.
  */
 class nsMediaQueryResultCacheKey {
 public:
-  nsMediaQueryResultCacheKey(nsIAtom* aMedium)
+  explicit nsMediaQueryResultCacheKey(nsIAtom* aMedium)
     : mMedium(aMedium)
   {}
 
   /**
    * Record that aExpression was tested while building the cached set
    * that this cache key is for, and that aExpressionMatches was whether
    * it matched.
    */
--- a/layout/style/nsRuleProcessorData.h
+++ b/layout/style/nsRuleProcessorData.h
@@ -224,18 +224,18 @@ struct MOZ_STACK_CLASS TreeMatchContext 
     NS_ASSERTION(mForScopedStyle, "only call IsWithinScopeForSelectorMatching "
                                   "when mForScopedStyle is true");
     return mCurrentStyleScope;
   }
 
   /* Helper class for maintaining the ancestor state */
   class MOZ_STACK_CLASS AutoAncestorPusher {
   public:
-    AutoAncestorPusher(TreeMatchContext& aTreeMatchContext
-                       MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
+    explicit AutoAncestorPusher(TreeMatchContext& aTreeMatchContext
+                                MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
       : mPushedAncestor(false)
       , mPushedStyleScope(false)
       , mTreeMatchContext(aTreeMatchContext)
       , mElement(nullptr)
     {
       MOZ_GUARD_OBJECT_NOTIFIER_INIT;
     }
 
@@ -294,19 +294,19 @@ struct MOZ_STACK_CLASS TreeMatchContext 
    *
    * The optional second parameter aSkipParentDisplayBasedStyleFixup allows
    * this class to be instantiated but only conditionally activated (e.g.
    * in cases where we may or may not want to be skipping flex/grid-item
    * style fixup for a particular chunk of code).
    */
   class MOZ_STACK_CLASS AutoParentDisplayBasedStyleFixupSkipper {
   public:
-    AutoParentDisplayBasedStyleFixupSkipper(TreeMatchContext& aTreeMatchContext,
-                                     bool aSkipParentDisplayBasedStyleFixup = true
-                                     MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
+    explicit AutoParentDisplayBasedStyleFixupSkipper(TreeMatchContext& aTreeMatchContext,
+                                                     bool aSkipParentDisplayBasedStyleFixup = true
+                                                     MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
       : mAutoRestorer(aTreeMatchContext.mSkippingParentDisplayBasedStyleFixup)
     {
       MOZ_GUARD_OBJECT_NOTIFIER_INIT;
       if (aSkipParentDisplayBasedStyleFixup) {
         aTreeMatchContext.mSkippingParentDisplayBasedStyleFixup = true;
       }
     }
 
--- a/layout/style/nsTransitionManager.h
+++ b/layout/style/nsTransitionManager.h
@@ -62,17 +62,17 @@ struct ElementPropertyTransition : publi
 };
 
 } // namespace mozilla
 
 class nsTransitionManager MOZ_FINAL
   : public mozilla::css::CommonAnimationManager
 {
 public:
-  nsTransitionManager(nsPresContext *aPresContext)
+  explicit nsTransitionManager(nsPresContext *aPresContext)
     : mozilla::css::CommonAnimationManager(aPresContext)
     , mInAnimationOnlyStyleUpdate(false)
   {
   }
 
   typedef mozilla::AnimationPlayerCollection AnimationPlayerCollection;
 
   static AnimationPlayerCollection*
--- a/layout/svg/SVGFEContainerFrame.cpp
+++ b/layout/svg/SVGFEContainerFrame.cpp
@@ -17,17 +17,17 @@ typedef nsContainerFrame SVGFEContainerF
  * This frame is used by filter primitive elements that
  * have special child elements that provide parameters.
  */
 class SVGFEContainerFrame : public SVGFEContainerFrameBase
 {
   friend nsIFrame*
   NS_NewSVGFEContainerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 protected:
-  SVGFEContainerFrame(nsStyleContext* aContext)
+  explicit SVGFEContainerFrame(nsStyleContext* aContext)
     : SVGFEContainerFrameBase(aContext)
   {
     AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_NONDISPLAY);
   }
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
--- a/layout/svg/SVGFEImageFrame.cpp
+++ b/layout/svg/SVGFEImageFrame.cpp
@@ -17,17 +17,17 @@ using namespace mozilla::dom;
 
 typedef nsFrame SVGFEImageFrameBase;
 
 class SVGFEImageFrame : public SVGFEImageFrameBase
 {
   friend nsIFrame*
   NS_NewSVGFEImageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 protected:
-  SVGFEImageFrame(nsStyleContext* aContext)
+  explicit SVGFEImageFrame(nsStyleContext* aContext)
     : SVGFEImageFrameBase(aContext)
   {
     AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_NONDISPLAY);
   }
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
--- a/layout/svg/SVGFELeafFrame.cpp
+++ b/layout/svg/SVGFELeafFrame.cpp
@@ -15,17 +15,17 @@ typedef nsFrame SVGFELeafFrameBase;
  * This frame is used by filter primitive elements that don't
  * have special child elements that provide parameters.
  */
 class SVGFELeafFrame : public SVGFELeafFrameBase
 {
   friend nsIFrame*
   NS_NewSVGFELeafFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 protected:
-  SVGFELeafFrame(nsStyleContext* aContext)
+  explicit SVGFELeafFrame(nsStyleContext* aContext)
     : SVGFELeafFrameBase(aContext)
   {
     AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_NONDISPLAY);
   }
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
--- a/layout/svg/SVGFEUnstyledLeafFrame.cpp
+++ b/layout/svg/SVGFEUnstyledLeafFrame.cpp
@@ -11,17 +11,17 @@
 
 typedef nsFrame SVGFEUnstyledLeafFrameBase;
 
 class SVGFEUnstyledLeafFrame : public SVGFEUnstyledLeafFrameBase
 {
   friend nsIFrame*
   NS_NewSVGFEUnstyledLeafFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 protected:
-  SVGFEUnstyledLeafFrame(nsStyleContext* aContext)
+  explicit SVGFEUnstyledLeafFrame(nsStyleContext* aContext)
     : SVGFEUnstyledLeafFrameBase(aContext)
   {
     AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_NONDISPLAY);
   }
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
--- a/layout/svg/SVGTextFrame.cpp
+++ b/layout/svg/SVGTextFrame.cpp
@@ -1135,17 +1135,17 @@ enum SubtreePosition
  */
 class TextNodeIterator
 {
 public:
   /**
    * Constructs a TextNodeIterator with the specified root node and optional
    * subtree.
    */
-  TextNodeIterator(nsIContent* aRoot, nsIContent* aSubtree = nullptr)
+  explicit TextNodeIterator(nsIContent* aRoot, nsIContent* aSubtree = nullptr)
     : mRoot(aRoot),
       mSubtree(aSubtree == aRoot ? nullptr : aSubtree),
       mCurrent(aRoot),
       mSubtreePosition(mSubtree ? eBeforeSubtree : eWithinSubtree)
   {
     NS_ASSERTION(aRoot, "expected non-null root");
     if (!aRoot->IsNodeOfType(nsINode::eTEXT)) {
       Next();
@@ -1263,17 +1263,17 @@ TextNodeIterator::Next()
  * parented text content element, or because they were display:none.
  * These are called "undisplayed characters".
  *
  * See also TextNodeCorrespondenceRecorder below, which is what sets the
  * frame property.
  */
 struct TextNodeCorrespondence
 {
-  TextNodeCorrespondence(uint32_t aUndisplayedCharacters)
+  explicit TextNodeCorrespondence(uint32_t aUndisplayedCharacters)
     : mUndisplayedCharacters(aUndisplayedCharacters)
   {
   }
 
   uint32_t mUndisplayedCharacters;
 };
 
 static void DestroyTextNodeCorrespondence(void* aPropertyValue)
@@ -1312,17 +1312,17 @@ class TextNodeCorrespondenceRecorder
 {
 public:
   /**
    * Entry point for the TextNodeCorrespondenceProperty recording.
    */
   static void RecordCorrespondence(SVGTextFrame* aRoot);
 
 private:
-  TextNodeCorrespondenceRecorder(SVGTextFrame* aRoot)
+  explicit TextNodeCorrespondenceRecorder(SVGTextFrame* aRoot)
     : mNodeIterator(aRoot->GetContent()),
       mPreviousNode(nullptr),
       mNodeCharIndex(0)
   {
   }
 
   void Record(SVGTextFrame* aRoot);
   void TraverseAndRecord(nsIFrame* aFrame);
@@ -1513,17 +1513,17 @@ TextNodeCorrespondenceRecorder::Traverse
  */
 class TextFrameIterator
 {
 public:
   /**
    * Constructs a TextFrameIterator for the specified SVGTextFrame
    * with an optional frame subtree to restrict iterated text frames to.
    */
-  TextFrameIterator(SVGTextFrame* aRoot, nsIFrame* aSubtree = nullptr)
+  explicit TextFrameIterator(SVGTextFrame* aRoot, nsIFrame* aSubtree = nullptr)
     : mRootFrame(aRoot),
       mSubtree(aSubtree),
       mCurrentFrame(aRoot),
       mCurrentPosition(),
       mSubtreePosition(mSubtree ? eBeforeSubtree : eWithinSubtree)
   {
     Init();
   }
@@ -1824,19 +1824,19 @@ public:
    *
    * @param aSVGTextFrame The SVGTextFrame whose rendered runs to iterate
    *   through.
    * @param aFilter Indicates whether to iterate rendered runs for non-visible
    *   nsTextFrames.
    * @param aSubtree An optional frame subtree to restrict iterated rendered
    *   runs to.
    */
-  TextRenderedRunIterator(SVGTextFrame* aSVGTextFrame,
-                          RenderedRunFilter aFilter = eAllFrames,
-                          nsIFrame* aSubtree = nullptr)
+  explicit TextRenderedRunIterator(SVGTextFrame* aSVGTextFrame,
+                                   RenderedRunFilter aFilter = eAllFrames,
+                                   nsIFrame* aSubtree = nullptr)
     : mFrameIterator(FrameIfAnonymousChildReflowed(aSVGTextFrame), aSubtree),
       mFilter(aFilter),
       mTextElementCharIndex(0),
       mFrameStartTextElementCharIndex(0),
       mFontSizeScaleFactor(aSVGTextFrame->mFontSizeScaleFactor),
       mCurrent(First())
   {
   }
@@ -2663,17 +2663,17 @@ CharIterator::MatchesFilter() const
 // nsCharClipDisplayItem
 
 /**
  * An nsCharClipDisplayItem that obtains its left and right clip edges from a
  * TextRenderedRun object.
  */
 class SVGCharClipDisplayItem : public nsCharClipDisplayItem {
 public:
-  SVGCharClipDisplayItem(const TextRenderedRun& aRun)
+  explicit SVGCharClipDisplayItem(const TextRenderedRun& aRun)
     : nsCharClipDisplayItem(aRun.mFrame)
   {
     aRun.GetClipEdges(mLeftEdge, mRightEdge);
   }
 
   NS_DISPLAY_DECL_NAME("SVGText", TYPE_TEXT)
 };
 
--- a/layout/svg/SVGTextFrame.h
+++ b/layout/svg/SVGTextFrame.h
@@ -125,17 +125,17 @@ private:
 
 /**
  * A runnable to mark glyph positions as needing to be recomputed
  * and to invalid the bounds of the SVGTextFrame frame.
  */
 class GlyphMetricsUpdater : public nsRunnable {
 public:
   NS_DECL_NSIRUNNABLE
-  GlyphMetricsUpdater(SVGTextFrame* aFrame) : mFrame(aFrame) { }
+  explicit GlyphMetricsUpdater(SVGTextFrame* aFrame) : mFrame(aFrame) { }
   static void Run(SVGTextFrame* aFrame);
   void Revoke() { mFrame = nullptr; }
 private:
   SVGTextFrame* mFrame;
 };
 
 // Slightly horrible callback for deferring application of opacity
 struct SVGTextContextPaint : public gfxTextContextPaint {
@@ -252,17 +252,17 @@ class SVGTextFrame MOZ_FINAL : public SV
   friend class MutationObserver;
   friend class nsDisplaySVGText;
 
   typedef mozilla::gfx::Path Path;
   typedef mozilla::gfx::Point Point;
   typedef mozilla::SVGTextContextPaint SVGTextContextPaint;
 
 protected:
-  SVGTextFrame(nsStyleContext* aContext)
+  explicit SVGTextFrame(nsStyleContext* aContext)
     : SVGTextFrameBase(aContext),
       mFontSizeScaleFactor(1.0f),
       mLastContextScale(1.0f),
       mLengthAdjustScaleFactor(1.0f)
   {
     AddStateBits(NS_STATE_SVG_POSITIONING_DIRTY);
   }
 
@@ -427,17 +427,17 @@ public:
 
 private:
   /**
    * Mutation observer used to watch for text positioning attribute changes
    * on descendent text content elements (like <tspan>s).
    */
   class MutationObserver MOZ_FINAL : public nsStubMutationObserver {
   public:
-    MutationObserver(SVGTextFrame* aFrame)
+    explicit MutationObserver(SVGTextFrame* aFrame)
       : mFrame(aFrame)
     {
       MOZ_ASSERT(mFrame, "MutationObserver needs a non-null frame");
       mFrame->GetContent()->AddMutationObserver(this);
     }
 
     // nsISupports
     NS_DECL_ISUPPORTS
--- a/layout/svg/SVGViewFrame.cpp
+++ b/layout/svg/SVGViewFrame.cpp
@@ -20,17 +20,17 @@ using namespace mozilla::dom;
  * identifier. The SVGViewFrame class passes on any attribute changes
  * the view receives to the overridden <svg> element (if there is one).
  **/
 class SVGViewFrame : public SVGViewFrameBase
 {
   friend nsIFrame*
   NS_NewSVGViewFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 protected:
-  SVGViewFrame(nsStyleContext* aContext)
+  explicit SVGViewFrame(nsStyleContext* aContext)
     : SVGViewFrameBase(aContext)
   {
     AddStateBits(NS_FRAME_IS_NONDISPLAY);
   }
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
--- a/layout/svg/nsSVGAFrame.cpp
+++ b/layout/svg/nsSVGAFrame.cpp
@@ -15,17 +15,17 @@ using namespace mozilla;
 
 typedef nsSVGDisplayContainerFrame nsSVGAFrameBase;
 
 class nsSVGAFrame : public nsSVGAFrameBase
 {
   friend nsIFrame*
   NS_NewSVGAFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 protected:
-  nsSVGAFrame(nsStyleContext* aContext) :
+  explicit nsSVGAFrame(nsStyleContext* aContext) :
     nsSVGAFrameBase(aContext) {}
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
 #ifdef DEBUG
   virtual void Init(nsIContent*       aContent,
                     nsContainerFrame* aParent,
--- a/layout/svg/nsSVGClipPathFrame.h
+++ b/layout/svg/nsSVGClipPathFrame.h
@@ -16,17 +16,17 @@ class nsISVGChildFrame;
 
 typedef nsSVGContainerFrame nsSVGClipPathFrameBase;
 
 class nsSVGClipPathFrame : public nsSVGClipPathFrameBase
 {
   friend nsIFrame*
   NS_NewSVGClipPathFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 protected:
-  nsSVGClipPathFrame(nsStyleContext* aContext)
+  explicit nsSVGClipPathFrame(nsStyleContext* aContext)
     : nsSVGClipPathFrameBase(aContext)
     , mInUse(false)
   {
     AddStateBits(NS_FRAME_IS_NONDISPLAY);
   }
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
@@ -102,18 +102,18 @@ public:
  private:
   // A helper class to allow us to paint clip paths safely. The helper
   // automatically sets and clears the mInUse flag on the clip path frame
   // (to prevent nasty reference loops). It's easy to mess this up
   // and break things, so this helper makes the code far more robust.
   class MOZ_STACK_CLASS AutoClipPathReferencer
   {
   public:
-    AutoClipPathReferencer(nsSVGClipPathFrame *aFrame
-                           MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
+    explicit AutoClipPathReferencer(nsSVGClipPathFrame *aFrame
+                                    MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
        : mFrame(aFrame) {
       MOZ_GUARD_OBJECT_NOTIFIER_INIT;
       NS_ASSERTION(!mFrame->mInUse, "reference loop!");
       mFrame->mInUse = true;
     }
     ~AutoClipPathReferencer() {
       mFrame->mInUse = false;
     }
--- a/layout/svg/nsSVGContainerFrame.h
+++ b/layout/svg/nsSVGContainerFrame.h
@@ -39,17 +39,17 @@ typedef nsContainerFrame nsSVGContainerF
  * Do *not* blindly cast to SVG element types in this class's methods (see the
  * warning comment for nsSVGDisplayContainerFrame below). 
  */
 class nsSVGContainerFrame : public nsSVGContainerFrameBase
 {
   friend nsIFrame* NS_NewSVGContainerFrame(nsIPresShell* aPresShell,
                                            nsStyleContext* aContext);
 protected:
-  nsSVGContainerFrame(nsStyleContext* aContext)
+  explicit nsSVGContainerFrame(nsStyleContext* aContext)
     : nsSVGContainerFrameBase(aContext)
   {
     AddStateBits(NS_FRAME_SVG_LAYOUT);
   }
 
 public:
   NS_DECL_QUERYFRAME_TARGET(nsSVGContainerFrame)
   NS_DECL_QUERYFRAME
@@ -111,17 +111,17 @@ protected:
  * an SVG element class since this class is inherited by
  * nsSVGGenericContainerFrame which is used for unrecognized elements in the
  * SVG namespace. Do *not* blindly cast to SVG element types.
  */
 class nsSVGDisplayContainerFrame : public nsSVGContainerFrame,
                                    public nsISVGChildFrame
 {
 protected:
-  nsSVGDisplayContainerFrame(nsStyleContext* aContext)
+  explicit nsSVGDisplayContainerFrame(nsStyleContext* aContext)
     : nsSVGContainerFrame(aContext)
   {
      AddStateBits(NS_FRAME_MAY_BE_TRANSFORMED);
   }
 
 public:
   NS_DECL_QUERYFRAME_TARGET(nsSVGDisplayContainerFrame)
   NS_DECL_QUERYFRAME
--- a/layout/svg/nsSVGEffects.h
+++ b/layout/svg/nsSVGEffects.h
@@ -119,17 +119,17 @@ public:
 protected:
   Element* GetTarget() MOZ_OVERRIDE { return mElement.get(); }
 
   // This is called when the referenced resource changes.
   virtual void DoUpdate() MOZ_OVERRIDE;
 
   class SourceReference : public nsReferencedElement {
   public:
-    SourceReference(nsSVGIDRenderingObserver* aContainer) : mContainer(aContainer) {}
+    explicit SourceReference(nsSVGIDRenderingObserver* aContainer) : mContainer(aContainer) {}
   protected:
     virtual void ElementChanged(Element* aFrom, Element* aTo) MOZ_OVERRIDE {
       mContainer->StopListening();
       nsReferencedElement::ElementChanged(aFrom, aTo);
       mContainer->StartListening();
       mContainer->DoUpdate();
     }
     /**
--- a/layout/svg/nsSVGFilterFrame.cpp
+++ b/layout/svg/nsSVGFilterFrame.cpp
@@ -26,17 +26,17 @@ NS_NewSVGFilterFrame(nsIPresShell* aPres
   return new (aPresShell) nsSVGFilterFrame(aContext);
 }
 
 NS_IMPL_FRAMEARENA_HELPERS(nsSVGFilterFrame)
 
 class MOZ_STACK_CLASS nsSVGFilterFrame::AutoFilterReferencer
 {
 public:
-  AutoFilterReferencer(nsSVGFilterFrame *aFrame MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
+  explicit AutoFilterReferencer(nsSVGFilterFrame *aFrame MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
     : mFrame(aFrame)
   {
     MOZ_GUARD_OBJECT_NOTIFIER_INIT;
     // Reference loops should normally be detected in advance and handled, so
     // we're not expecting to encounter them here
     NS_ABORT_IF_FALSE(!mFrame->mLoopFlag, "Undetected reference loop!");
     mFrame->mLoopFlag = true;
   }
--- a/layout/svg/nsSVGFilterFrame.h
+++ b/layout/svg/nsSVGFilterFrame.h
@@ -31,17 +31,17 @@ class SVGFilterElement;
 
 typedef nsSVGContainerFrame nsSVGFilterFrameBase;
 
 class nsSVGFilterFrame : public nsSVGFilterFrameBase
 {
   friend nsIFrame*
   NS_NewSVGFilterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 protected:
-  nsSVGFilterFrame(nsStyleContext* aContext)
+  explicit nsSVGFilterFrame(nsStyleContext* aContext)
     : nsSVGFilterFrameBase(aContext),
       mLoopFlag(false),
       mNoHRefURI(false)
   {
     AddStateBits(NS_FRAME_IS_NONDISPLAY);
   }
 
 public:
--- a/layout/svg/nsSVGForeignObjectFrame.h
+++ b/layout/svg/nsSVGForeignObjectFrame.h
@@ -19,17 +19,17 @@ class nsSVGOuterSVGFrame;
 typedef nsContainerFrame nsSVGForeignObjectFrameBase;
 
 class nsSVGForeignObjectFrame : public nsSVGForeignObjectFrameBase,
                                 public nsISVGChildFrame
 {
   friend nsContainerFrame*
   NS_NewSVGForeignObjectFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 protected:
-  nsSVGForeignObjectFrame(nsStyleContext* aContext);
+  explicit nsSVGForeignObjectFrame(nsStyleContext* aContext);
 
 public:
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
   // nsIFrame:
   virtual void Init(nsIContent*       aContent,
                     nsContainerFrame* aParent,
--- a/layout/svg/nsSVGGFrame.h
+++ b/layout/svg/nsSVGGFrame.h
@@ -12,17 +12,17 @@
 
 typedef nsSVGDisplayContainerFrame nsSVGGFrameBase;
 
 class nsSVGGFrame : public nsSVGGFrameBase
 {
   friend nsIFrame*
   NS_NewSVGGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 protected:
-  nsSVGGFrame(nsStyleContext* aContext) :
+  explicit nsSVGGFrame(nsStyleContext* aContext) :
     nsSVGGFrameBase(aContext) {}
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
 #ifdef DEBUG
   virtual void Init(nsIContent*       aContent,
                     nsContainerFrame* aParent,
--- a/layout/svg/nsSVGGenericContainerFrame.h
+++ b/layout/svg/nsSVGGenericContainerFrame.h
@@ -20,17 +20,17 @@ class nsStyleContext;
 
 typedef nsSVGDisplayContainerFrame nsSVGGenericContainerFrameBase;
 
 class nsSVGGenericContainerFrame : public nsSVGGenericContainerFrameBase
 {
   friend nsIFrame*
   NS_NewSVGGenericContainerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 protected:
-  nsSVGGenericContainerFrame(nsStyleContext* aContext) : nsSVGGenericContainerFrameBase(aContext) {}
+  explicit nsSVGGenericContainerFrame(nsStyleContext* aContext) : nsSVGGenericContainerFrameBase(aContext) {}
   
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
   // nsIFrame:
   virtual nsresult  AttributeChanged(int32_t         aNameSpaceID,
                                      nsIAtom*        aAttribute,
                                      int32_t         aModType) MOZ_OVERRIDE;
--- a/layout/svg/nsSVGGradientFrame.cpp
+++ b/layout/svg/nsSVGGradientFrame.cpp
@@ -22,18 +22,18 @@ using namespace mozilla;
 using namespace mozilla::dom;
 
 //----------------------------------------------------------------------
 // Helper classes
 
 class MOZ_STACK_CLASS nsSVGGradientFrame::AutoGradientReferencer
 {
 public:
-  AutoGradientReferencer(nsSVGGradientFrame *aFrame
-                         MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
+  explicit AutoGradientReferencer(nsSVGGradientFrame *aFrame
+                                  MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
     : mFrame(aFrame)
   {
     MOZ_GUARD_OBJECT_NOTIFIER_INIT;
     // Reference loops should normally be detected in advance and handled, so
     // we're not expecting to encounter them here
     NS_ABORT_IF_FALSE(!mFrame->mLoopFlag, "Undetected reference loop!");
     mFrame->mLoopFlag = true;
   }
--- a/layout/svg/nsSVGGradientFrame.h
+++ b/layout/svg/nsSVGGradientFrame.h
@@ -35,17 +35,17 @@ typedef nsSVGPaintServerFrame nsSVGGradi
 
 /**
  * Gradients can refer to other gradients. We create an nsSVGPaintingProperty
  * with property type nsGkAtoms::href to track the referenced gradient.
  */
 class nsSVGGradientFrame : public nsSVGGradientFrameBase
 {
 protected:
-  nsSVGGradientFrame(nsStyleContext* aContext);
+  explicit nsSVGGradientFrame(nsStyleContext* aContext);
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
   // nsSVGPaintServerFrame methods:
   virtual already_AddRefed<gfxPattern>
     GetPaintServerPattern(nsIFrame *aSource,
                           const gfxMatrix& aContextMatrix,
@@ -125,17 +125,17 @@ private:
 
 typedef nsSVGGradientFrame nsSVGLinearGradientFrameBase;
 
 class nsSVGLinearGradientFrame : public nsSVGLinearGradientFrameBase
 {
   friend nsIFrame* NS_NewSVGLinearGradientFrame(nsIPresShell* aPresShell,
                                                 nsStyleContext* aContext);
 protected:
-  nsSVGLinearGradientFrame(nsStyleContext* aContext) :
+  explicit nsSVGLinearGradientFrame(nsStyleContext* aContext) :
     nsSVGLinearGradientFrameBase(aContext) {}
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
   // nsIFrame interface:
 #ifdef DEBUG
   virtual void Init(nsIContent*       aContent,
@@ -170,17 +170,17 @@ protected:
 
 typedef nsSVGGradientFrame nsSVGRadialGradientFrameBase;
 
 class nsSVGRadialGradientFrame : public nsSVGRadialGradientFrameBase
 {
   friend nsIFrame* NS_NewSVGRadialGradientFrame(nsIPresShell* aPresShell,
                                                 nsStyleContext* aContext);
 protected:
-  nsSVGRadialGradientFrame(nsStyleContext* aContext) :
+  explicit nsSVGRadialGradientFrame(nsStyleContext* aContext) :
     nsSVGRadialGradientFrameBase(aContext) {}
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
   // nsIFrame interface:
 #ifdef DEBUG
   virtual void Init(nsIContent*       aContent,
--- a/layout/svg/nsSVGImageFrame.cpp
+++ b/layout/svg/nsSVGImageFrame.cpp
@@ -27,17 +27,17 @@ using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::gfx;
 
 class nsSVGImageFrame;
 
 class nsSVGImageListener MOZ_FINAL : public imgINotificationObserver
 {
 public:
-  nsSVGImageListener(nsSVGImageFrame *aFrame);
+  explicit nsSVGImageListener(nsSVGImageFrame *aFrame);
 
   NS_DECL_ISUPPORTS
   NS_DECL_IMGINOTIFICATIONOBSERVER
 
   void SetFrame(nsSVGImageFrame *frame) { mFrame = frame; }
 
 private:
   ~nsSVGImageListener() {}
@@ -49,18 +49,18 @@ typedef nsSVGPathGeometryFrame nsSVGImag
 
 class nsSVGImageFrame : public nsSVGImageFrameBase,
                         public nsIReflowCallback
 {
   friend nsIFrame*
   NS_NewSVGImageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 
 protected:
-  nsSVGImageFrame(nsStyleContext* aContext) : nsSVGImageFrameBase(aContext),
-                                              mReflowCallbackPosted(false) {}
+  explicit nsSVGImageFrame(nsStyleContext* aContext) : nsSVGImageFrameBase(aContext),
+                                                       mReflowCallbackPosted(false) {}
   virtual ~nsSVGImageFrame();
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
   // nsISVGChildFrame interface:
   virtual nsresult PaintSVG(nsRenderingContext *aContext,
                             const nsIntRect *aDirtyRect,
--- a/layout/svg/nsSVGInnerSVGFrame.h
+++ b/layout/svg/nsSVGInnerSVGFrame.h
@@ -15,17 +15,17 @@ class nsRenderingContext;
 typedef nsSVGDisplayContainerFrame nsSVGInnerSVGFrameBase;
 
 class nsSVGInnerSVGFrame : public nsSVGInnerSVGFrameBase,
                            public nsISVGSVGFrame
 {
   friend nsIFrame*
   NS_NewSVGInnerSVGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 protected:
-  nsSVGInnerSVGFrame(nsStyleContext* aContext) :
+  explicit nsSVGInnerSVGFrame(nsStyleContext* aContext) :
     nsSVGInnerSVGFrameBase(aContext) {}
   
 public:
   NS_DECL_QUERYFRAME_TARGET(nsSVGInnerSVGFrame)
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
 #ifdef DEBUG
--- a/layout/svg/nsSVGMarkerFrame.h
+++ b/layout/svg/nsSVGMarkerFrame.h
@@ -29,17 +29,17 @@ struct nsSVGMark;
 typedef nsSVGContainerFrame nsSVGMarkerFrameBase;
 
 class nsSVGMarkerFrame : public nsSVGMarkerFrameBase
 {
   friend class nsSVGMarkerAnonChildFrame;
   friend nsContainerFrame*
   NS_NewSVGMarkerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 protected:
-  nsSVGMarkerFrame(nsStyleContext* aContext)
+  explicit nsSVGMarkerFrame(nsStyleContext* aContext)
     : nsSVGMarkerFrameBase(aContext)
     , mMarkedFrame(nullptr)
     , mInUse(false)
     , mInUse2(false)
   {
     AddStateBits(NS_FRAME_IS_NONDISPLAY);
   }
 
@@ -141,17 +141,17 @@ typedef nsSVGDisplayContainerFrame nsSVG
  */
 class nsSVGMarkerAnonChildFrame
   : public nsSVGMarkerAnonChildFrameBase
 {
   friend nsContainerFrame*
   NS_NewSVGMarkerAnonChildFrame(nsIPresShell* aPresShell,
                                 nsStyleContext* aContext);
 
-  nsSVGMarkerAnonChildFrame(nsStyleContext* aContext)
+  explicit nsSVGMarkerAnonChildFrame(nsStyleContext* aContext)
     : nsSVGMarkerAnonChildFrameBase(aContext)
   {}
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
 #ifdef DEBUG
   virtual void Init(nsIContent*       aContent,
--- a/layout/svg/nsSVGMaskFrame.h
+++ b/layout/svg/nsSVGMaskFrame.h
@@ -17,17 +17,17 @@ class nsRenderingContext;
 
 typedef nsSVGContainerFrame nsSVGMaskFrameBase;
 
 class nsSVGMaskFrame MOZ_FINAL : public nsSVGMaskFrameBase
 {
   friend nsIFrame*
   NS_NewSVGMaskFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 protected:
-  nsSVGMaskFrame(nsStyleContext* aContext)
+  explicit nsSVGMaskFrame(nsStyleContext* aContext)
     : nsSVGMaskFrameBase(aContext)
     , mInUse(false)
   {
     AddStateBits(NS_FRAME_IS_NONDISPLAY);
   }
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
@@ -69,18 +69,18 @@ public:
 private:
   // A helper class to allow us to paint masks safely. The helper
   // automatically sets and clears the mInUse flag on the mask frame
   // (to prevent nasty reference loops). It's easy to mess this up
   // and break things, so this helper makes the code far more robust.
   class MOZ_STACK_CLASS AutoMaskReferencer
   {
   public:
-    AutoMaskReferencer(nsSVGMaskFrame *aFrame
-                       MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
+    explicit AutoMaskReferencer(nsSVGMaskFrame *aFrame
+                                MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
        : mFrame(aFrame) {
       MOZ_GUARD_OBJECT_NOTIFIER_INIT;
       NS_ASSERTION(!mFrame->mInUse, "reference loop!");
       mFrame->mInUse = true;
     }
     ~AutoMaskReferencer() {
       mFrame->mInUse = false;
     }
--- a/layout/svg/nsSVGOuterSVGFrame.h
+++ b/layout/svg/nsSVGOuterSVGFrame.h
@@ -19,17 +19,17 @@ class nsSVGForeignObjectFrame;
 typedef nsSVGDisplayContainerFrame nsSVGOuterSVGFrameBase;
 
 class nsSVGOuterSVGFrame MOZ_FINAL : public nsSVGOuterSVGFrameBase,
                                      public nsISVGSVGFrame
 {
   friend nsContainerFrame*
   NS_NewSVGOuterSVGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 protected:
-  nsSVGOuterSVGFrame(nsStyleContext* aContext);
+  explicit nsSVGOuterSVGFrame(nsStyleContext* aContext);
 
 public:
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
 #ifdef DEBUG
   ~nsSVGOuterSVGFrame() {
     NS_ASSERTION(!mForeignObjectHash || mForeignObjectHash->Count() == 0,
@@ -236,17 +236,17 @@ typedef nsSVGDisplayContainerFrame nsSVG
  */
 class nsSVGOuterSVGAnonChildFrame
   : public nsSVGOuterSVGAnonChildFrameBase
 {
   friend nsContainerFrame*
   NS_NewSVGOuterSVGAnonChildFrame(nsIPresShell* aPresShell,
                                   nsStyleContext* aContext);
 
-  nsSVGOuterSVGAnonChildFrame(nsStyleContext* aContext)
+  explicit nsSVGOuterSVGAnonChildFrame(nsStyleContext* aContext)
     : nsSVGOuterSVGAnonChildFrameBase(aContext)
   {}
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
 #ifdef DEBUG
   virtual void Init(nsIContent*       aContent,
--- a/layout/svg/nsSVGPaintServerFrame.h
+++ b/layout/svg/nsSVGPaintServerFrame.h
@@ -20,17 +20,17 @@ class nsStyleContext;
 
 struct gfxRect;
 
 typedef nsSVGContainerFrame nsSVGPaintServerFrameBase;
 
 class nsSVGPaintServerFrame : public nsSVGPaintServerFrameBase
 {
 protected:
-  nsSVGPaintServerFrame(nsStyleContext* aContext)
+  explicit nsSVGPaintServerFrame(nsStyleContext* aContext)
     : nsSVGPaintServerFrameBase(aContext)
   {
     AddStateBits(NS_FRAME_IS_NONDISPLAY);
   }
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
--- a/layout/svg/nsSVGPathGeometryFrame.h
+++ b/layout/svg/nsSVGPathGeometryFrame.h
@@ -35,17 +35,17 @@ class nsSVGPathGeometryFrame : public ns
                                public nsISVGChildFrame
 {
   friend nsIFrame*
   NS_NewSVGPathGeometryFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 
   friend class nsDisplaySVGPathGeometry;
 
 protected:
-  nsSVGPathGeometryFrame(nsStyleContext* aContext)
+  explicit nsSVGPathGeometryFrame(nsStyleContext* aContext)
     : nsSVGPathGeometryFrameBase(aContext)
   {
      AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_MAY_BE_TRANSFORMED);
   }
 
 public:
   NS_DECL_QUERYFRAME_TARGET(nsSVGPathGeometryFrame)
   NS_DECL_QUERYFRAME
--- a/layout/svg/nsSVGPatternFrame.cpp
+++ b/layout/svg/nsSVGPatternFrame.cpp
@@ -31,18 +31,18 @@ using namespace mozilla::dom;
 using namespace mozilla::gfx;
 
 //----------------------------------------------------------------------
 // Helper classes
 
 class MOZ_STACK_CLASS nsSVGPatternFrame::AutoPatternReferencer
 {
 public:
-  AutoPatternReferencer(nsSVGPatternFrame *aFrame
-                        MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
+  explicit AutoPatternReferencer(nsSVGPatternFrame *aFrame
+                                 MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
     : mFrame(aFrame)
   {
     MOZ_GUARD_OBJECT_NOTIFIER_INIT;
     // Reference loops should normally be detected in advance and handled, so
     // we're not expecting to encounter them here
     NS_ABORT_IF_FALSE(!mFrame->mLoopFlag, "Undetected reference loop!");
     mFrame->mLoopFlag = true;
   }
--- a/layout/svg/nsSVGPatternFrame.h
+++ b/layout/svg/nsSVGPatternFrame.h
@@ -36,17 +36,17 @@ class nsSVGPatternFrame : public nsSVGPa
   typedef mozilla::gfx::SourceSurface SourceSurface;
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
   friend nsIFrame* NS_NewSVGPatternFrame(nsIPresShell* aPresShell,
                                          nsStyleContext* aContext);
 
-  nsSVGPatternFrame(nsStyleContext* aContext);
+  explicit nsSVGPatternFrame(nsStyleContext* aContext);
 
   // nsSVGPaintServerFrame methods:
   virtual already_AddRefed<gfxPattern>
     GetPaintServerPattern(nsIFrame *aSource,
                           const gfxMatrix& aContextMatrix,
                           nsStyleSVGPaint nsStyleSVG::*aFillOrStroke,
                           float aOpacity,
                           const gfxRect *aOverrideBounds) MOZ_OVERRIDE;
--- a/layout/svg/nsSVGStopFrame.cpp
+++ b/layout/svg/nsSVGStopFrame.cpp
@@ -15,17 +15,17 @@
 
 typedef nsFrame  nsSVGStopFrameBase;
 
 class nsSVGStopFrame : public nsSVGStopFrameBase
 {
   friend nsIFrame*
   NS_NewSVGStopFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 protected:
-  nsSVGStopFrame(nsStyleContext* aContext)
+  explicit nsSVGStopFrame(nsStyleContext* aContext)
     : nsSVGStopFrameBase(aContext)
   {
     AddStateBits(NS_FRAME_IS_NONDISPLAY);
   }
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
--- a/layout/svg/nsSVGSwitchFrame.cpp
+++ b/layout/svg/nsSVGSwitchFrame.cpp
@@ -16,17 +16,17 @@ using namespace mozilla::gfx;
 
 typedef nsSVGGFrame nsSVGSwitchFrameBase;
 
 class nsSVGSwitchFrame : public nsSVGSwitchFrameBase
 {
   friend nsIFrame*
   NS_NewSVGSwitchFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 protected:
-  nsSVGSwitchFrame(nsStyleContext* aContext) :
+  explicit nsSVGSwitchFrame(nsStyleContext* aContext) :
     nsSVGSwitchFrameBase(aContext) {}
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
 #ifdef DEBUG
   virtual void Init(nsIContent*       aContent,
                     nsContainerFrame* aParent,
--- a/layout/svg/nsSVGUseFrame.cpp
+++ b/layout/svg/nsSVGUseFrame.cpp
@@ -16,17 +16,17 @@ using namespace mozilla::dom;
 
 class nsSVGUseFrame : public nsSVGUseFrameBase,
                       public nsIAnonymousContentCreator
 {
   friend nsIFrame*
   NS_NewSVGUseFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 
 protected:
-  nsSVGUseFrame(nsStyleContext* aContext) :
+  explicit nsSVGUseFrame(nsStyleContext* aContext) :
     nsSVGUseFrameBase(aContext),
     mHasValidDimensions(true)
   {}
 
 public:
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
--- a/layout/tables/BasicTableLayoutStrategy.h
+++ b/layout/tables/BasicTableLayoutStrategy.h
@@ -15,17 +15,17 @@
 #include "mozilla/Attributes.h"
 #include "nsITableLayoutStrategy.h"
 
 class nsTableFrame;
 
 class BasicTableLayoutStrategy : public nsITableLayoutStrategy
 {
 public:
-    BasicTableLayoutStrategy(nsTableFrame *aTableFrame);
+    explicit BasicTableLayoutStrategy(nsTableFrame *aTableFrame);
     virtual ~BasicTableLayoutStrategy();
 
     // nsITableLayoutStrategy implementation
     virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
     virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext,
                                  bool aComputingSize) MOZ_OVERRIDE;
     virtual void MarkIntrinsicISizesDirty() MOZ_OVERRIDE;
     virtual void ComputeColumnWidths(const nsHTMLReflowState& aReflowState) MOZ_OVERRIDE;
--- a/layout/tables/FixedTableLayoutStrategy.h
+++ b/layout/tables/FixedTableLayoutStrategy.h
@@ -15,17 +15,17 @@
 #include "mozilla/Attributes.h"
 #include "nsITableLayoutStrategy.h"
 
 class nsTableFrame;
 
 class FixedTableLayoutStrategy : public nsITableLayoutStrategy
 {
 public:
-    FixedTableLayoutStrategy(nsTableFrame *aTableFrame);
+    explicit FixedTableLayoutStrategy(nsTableFrame *aTableFrame);
     virtual ~FixedTableLayoutStrategy();
 
     // nsITableLayoutStrategy implementation
     virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
     virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext,
                                  bool aComputingSize) MOZ_OVERRIDE;
     virtual void MarkIntrinsicISizesDirty() MOZ_OVERRIDE;
     virtual void ComputeColumnWidths(const nsHTMLReflowState& aReflowState) MOZ_OVERRIDE;
--- a/layout/tables/celldata.h
+++ b/layout/tables/celldata.h
@@ -120,17 +120,17 @@ public:
 
 private:
   friend class nsCellMap;
   friend class BCCellData;
 
   /** constructor.
     * @param aOrigCell  the table cell frame which will be stored in mOrigCell.
     */
-  CellData(nsTableCellFrame* aOrigCell);  // implemented in nsCellMap.cpp
+  explicit CellData(nsTableCellFrame* aOrigCell);  // implemented in nsCellMap.cpp
 
   /** destructor */
   ~CellData(); // implemented in nsCellMap.cpp
 
 protected:
 
   // this union relies on the assumption that an object (not primitive type) does
   // not start on an odd bit boundary. If mSpan is 0 then mOrigCell is in effect
@@ -235,17 +235,17 @@ protected:
 
 // BCCellData entries replace CellData entries in the cell map if the border collapsing model is in
 // effect. BCData for a row and col entry contains the left and top borders of cell at that row and
 // col and the corner connecting the two. The right borders of the cells in the last col and the bottom
 // borders of the last row are stored in separate BCData entries in the cell map.
 class BCCellData : public CellData
 {
 public:
-  BCCellData(nsTableCellFrame* aOrigCell);
+  explicit BCCellData(nsTableCellFrame* aOrigCell);
   ~BCCellData();
 
   BCData mData;
 };
 
 
 // The layout of a celldata is as follows.  The top 10 bits are the colspan
 // offset (which is enough to represent our allowed values 1-1000 for colspan).
--- a/layout/tables/nsITableLayoutStrategy.h
+++ b/layout/tables/nsITableLayoutStrategy.h
@@ -42,14 +42,14 @@ public:
     /**
      * Return the type of table layout strategy, without the cost of
      * a virtual function call
      */
     enum Type { Auto, Fixed };
     Type GetType() const { return mType; }
 
 protected:
-    nsITableLayoutStrategy(Type aType) : mType(aType) {}
+    explicit nsITableLayoutStrategy(Type aType) : mType(aType) {}
 private:
     Type mType;
 };
 
 #endif /* !defined(nsITableLayoutStrategy_h_) */
--- a/layout/tables/nsTableCellFrame.h
+++ b/layout/tables/nsTableCellFrame.h
@@ -35,17 +35,17 @@ class nsTableCellFrame : public nsContai
 {
 public:
   NS_DECL_QUERYFRAME_TARGET(nsTableCellFrame)
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
   // default constructor supplied by the compiler
 
-  nsTableCellFrame(nsStyleContext* aContext);
+  explicit nsTableCellFrame(nsStyleContext* aContext);
   ~nsTableCellFrame();
 
   virtual void Init(nsIContent*       aContent,
                     nsContainerFrame* aParent,
                     nsIFrame*         aPrevInFlow) MOZ_OVERRIDE;
 
   virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
 
@@ -287,17 +287,17 @@ inline void nsTableCellFrame::SetHasPctO
 }
 
 // nsBCTableCellFrame
 class nsBCTableCellFrame MOZ_FINAL : public nsTableCellFrame
 {
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
-  nsBCTableCellFrame(nsStyleContext* aContext);
+  explicit nsBCTableCellFrame(nsStyleContext* aContext);
 
   ~nsBCTableCellFrame();
 
   virtual nsIAtom* GetType() const MOZ_OVERRIDE;
 
   virtual nsMargin GetUsedBorder() const MOZ_OVERRIDE;
   virtual bool GetBorderRadii(const nsSize& aFrameSize,
                               const nsSize& aBorderArea,
--- a/layout/tables/nsTableColFrame.h
+++ b/layout/tables/nsTableColFrame.h
@@ -270,17 +270,17 @@ public:
   }
   
   virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0) MOZ_OVERRIDE;
   virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0) MOZ_OVERRIDE;
   virtual void InvalidateFrameForRemoval() MOZ_OVERRIDE { InvalidateFrameSubtree(); }
 
 protected:
 
-  nsTableColFrame(nsStyleContext* aContext);
+  explicit nsTableColFrame(nsStyleContext* aContext);
   ~nsTableColFrame();
 
   nscoord mMinCoord;
   nscoord mPrefCoord;
   nscoord mSpanMinCoord; // XXX...
   nscoord mSpanPrefCoord; // XXX...
   float mPrefPercent;
   float mSpanPrefPercent; // XXX...
--- a/layout/tables/nsTableColGroupFrame.h
+++ b/layout/tables/nsTableColGroupFrame.h
@@ -197,17 +197,17 @@ public:
     return nsContainerFrame::IsFrameOfType(aFlags & ~(nsIFrame::eTablePart));
   }
   
   virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0) MOZ_OVERRIDE;
   virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0) MOZ_OVERRIDE;
   virtual void InvalidateFrameForRemoval() MOZ_OVERRIDE { InvalidateFrameSubtree(); }
 
 protected:
-  nsTableColGroupFrame(nsStyleContext* aContext);
+  explicit nsTableColGroupFrame(nsStyleContext* aContext);
 
   void InsertColsReflow(int32_t                   aColIndex,
                         const nsFrameList::Slice& aCols);
 
   virtual LogicalSides GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
 
   // data members
   int32_t mColCount;
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -4072,17 +4072,17 @@ class BCMapCellIterator;
  *  BCMapCellInfo
  * This structure stores information about the cellmap and all involved
  * table related frames that are used during the computation of winning borders
  * in CalcBCBorders so that they do need to be looked up again and again when
  * iterating over the cells.
  ****************************************************************/
 struct BCMapCellInfo
 {
-  BCMapCellInfo(nsTableFrame* aTableFrame);
+  explicit BCMapCellInfo(nsTableFrame* aTableFrame);
   void ResetCellInfo();
   void SetInfo(nsTableRowFrame*   aNewRow,
                int32_t            aColIndex,
                BCCellData*        aCellData,
                BCMapCellIterator* aIter,
                nsCellMap*         aCellMap = nullptr);
   // The BCMapCellInfo has functions to set the continous
   // border widths (see nsTablePainter.cpp for a description of the continous
@@ -4732,17 +4732,17 @@ GetColorAndStyle(const nsIFrame*  aFrame
     }
   }
   width = styleData->GetComputedBorderWidth(aSide);
   aWidth = nsPresContext::AppUnitsToIntCSSPixels(width);
 }
 
 class nsDelayedCalcBCBorders : public nsRunnable {
 public:
-  nsDelayedCalcBCBorders(nsIFrame* aFrame) :
+  explicit nsDelayedCalcBCBorders(nsIFrame* aFrame) :
     mFrame(aFrame) {}
 
   NS_IMETHOD Run() MOZ_OVERRIDE {
     if (mFrame) {
       nsTableFrame* tableFrame = static_cast <nsTableFrame*>(mFrame.GetFrame());
       if (tableFrame->NeedToCalcBCBorders()) {
         tableFrame->CalcBCBorders();
       }
@@ -6231,17 +6231,17 @@ struct BCHorizontalSeg
 // Iterates over borders (left border, corner, top border) in the cell map within a damage area
 // from left to right, top to bottom. All members are in terms of the 1st in flow frames, except
 // where suffixed by InFlow.
 class BCPaintBorderIterator
 {
 public:
 
 
-  BCPaintBorderIterator(nsTableFrame* aTable);
+  explicit BCPaintBorderIterator(nsTableFrame* aTable);
   ~BCPaintBorderIterator() { if (mVerInfo) {
                               delete [] mVerInfo;
                            }}
   void Reset();
 
   /**
    * Determine the damage area in terms of rows and columns and finalize
    * mInitialOffsetX and mInitialOffsetY.
--- a/layout/tables/nsTableFrame.h
+++ b/layout/tables/nsTableFrame.h
@@ -578,17 +578,17 @@ public:
 
   virtual bool UpdateOverflow() MOZ_OVERRIDE;
 
 protected:
 
   /** protected constructor. 
     * @see NewFrame
     */
-  nsTableFrame(nsStyleContext* aContext);
+  explicit nsTableFrame(nsStyleContext* aContext);
 
   /** destructor, responsible for mColumnLayoutData */
   virtual ~nsTableFrame();
 
   void InitChildReflowState(nsHTMLReflowState& aReflowState);
 
   virtual LogicalSides GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
 
@@ -978,18 +978,18 @@ nsTableFrame::GetContinuousLeftBCBorderW
 inline void nsTableFrame::SetContinuousLeftBCBorderWidth(nscoord aValue)
 {
   mBits.mLeftContBCBorder = (unsigned) aValue;
 }
 
 class nsTableIterator
 {
 public:
-  nsTableIterator(nsIFrame& aSource);
-  nsTableIterator(nsFrameList& aSource);
+  explicit nsTableIterator(nsIFrame& aSource);
+  explicit nsTableIterator(nsFrameList& aSource);
   nsIFrame* First();
   nsIFrame* Next();
   bool      IsLeftToRight();
   int32_t   Count();
 
 protected:
   void Init(nsIFrame* aFirstChild);
   bool      mLeftToRight;
--- a/layout/tables/nsTableOuterFrame.h
+++ b/layout/tables/nsTableOuterFrame.h
@@ -38,17 +38,17 @@ public:
   virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE;
 #endif
 
 #ifdef DEBUG_FRAME_DUMP
   virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
 #endif
 
 protected:
-  nsTableCaptionFrame(nsStyleContext*  aContext);
+  explicit nsTableCaptionFrame(nsStyleContext*  aContext);
   virtual ~nsTableCaptionFrame();
 };
 
 
 /**
  * Primary frame for a table element,
  * the nsTableOuterFrame contains 0 or one caption frame, and a nsTableFrame
  * pseudo-frame (referred to as the "inner frame').
@@ -213,17 +213,17 @@ public:
   {
     nsTableCellMap* map = InnerTableFrame()->GetCellMap();
     return map->GetEffectiveRowSpan(aRowIdx, aColIdx);
   }
 
 protected:
 
 
-  nsTableOuterFrame(nsStyleContext* aContext);
+  explicit nsTableOuterFrame(nsStyleContext* aContext);
   virtual ~nsTableOuterFrame();
 
   void InitChildReflowState(nsPresContext&    aPresContext,                     
                             nsHTMLReflowState& aReflowState);
 
   uint8_t GetCaptionSide(); // NS_STYLE_CAPTION_SIDE_* or NO_SIDE
 
   bool HasSideCaption() {
--- a/layout/tables/nsTableRowFrame.h
+++ b/layout/tables/nsTableRowFrame.h
@@ -232,17 +232,17 @@ public:
   virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE;
 #endif
 
 protected:
 
   /** protected constructor.
     * @see NewFrame
     */
-  nsTableRowFrame(nsStyleContext *aContext);
+  explicit nsTableRowFrame(nsStyleContext *aContext);
 
   void InitChildReflowState(nsPresContext&         aPresContext,
                             const nsSize&           aAvailSize,
                             bool                    aBorderCollapse,
                             nsTableCellReflowState& aReflowState);
   
   virtual LogicalSides GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
 
--- a/layout/tables/nsTableRowGroupFrame.h
+++ b/layout/tables/nsTableRowGroupFrame.h
@@ -323,17 +323,17 @@ public:
     return nsContainerFrame::IsFrameOfType(aFlags & ~(nsIFrame::eTablePart));
   }
 
   virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0) MOZ_OVERRIDE;
   virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0) MOZ_OVERRIDE;
   virtual void InvalidateFrameForRemoval() MOZ_OVERRIDE { InvalidateFrameSubtree(); }
 
 protected:
-  nsTableRowGroupFrame(nsStyleContext* aContext);
+  explicit nsTableRowGroupFrame(nsStyleContext* aContext);
 
   void InitChildReflowState(nsPresContext&     aPresContext, 
                             bool               aBorderCollapse,
                             nsHTMLReflowState& aReflowState);
   
   virtual LogicalSides GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
 
   void PlaceChild(nsPresContext*         aPresContext,
--- a/layout/xul/grid/nsGridLayout2.h
+++ b/layout/xul/grid/nsGridLayout2.h
@@ -60,17 +60,17 @@ public:
                            nsIFrame* aChildList) MOZ_OVERRIDE;
 
   virtual nsIGridPart* AsGridPart() MOZ_OVERRIDE { return this; }
 
   static void AddOffset(nsBoxLayoutState& aState, nsIFrame* aChild, nsSize& aSize);
 
 protected:
 
-  nsGridLayout2(nsIPresShell* aShell);
+  explicit nsGridLayout2(nsIPresShell* aShell);
   virtual ~nsGridLayout2();
   nsGrid mGrid;
 
 private:
   void AddWidth(nsSize& aSize, nscoord aSize2, bool aIsHorizontal);
 
 
 }; // class nsGridLayout2
--- a/layout/xul/nsBoxFrame.cpp
+++ b/layout/xul/nsBoxFrame.cpp
@@ -2054,17 +2054,17 @@ void nsDisplayXULEventRedirector::HitTes
       aOutFrames->AppendElement(mTargetFrame);
     }
   }
 }
 
 class nsXULEventRedirectorWrapper : public nsDisplayWrapper
 {
 public:
-  nsXULEventRedirectorWrapper(nsIFrame* aTargetFrame)
+  explicit nsXULEventRedirectorWrapper(nsIFrame* aTargetFrame)
       : mTargetFrame(aTargetFrame) {}
   virtual nsDisplayItem* WrapList(nsDisplayListBuilder* aBuilder,
                                   nsIFrame* aFrame,
                                   nsDisplayList* aList) MOZ_OVERRIDE {
     return new (aBuilder)
         nsDisplayXULEventRedirector(aBuilder, aFrame, aList, mTargetFrame);
   }
   virtual nsDisplayItem* WrapItem(nsDisplayListBuilder* aBuilder,
--- a/layout/xul/nsBoxLayoutState.h
+++ b/layout/xul/nsBoxLayoutState.h
@@ -22,21 +22,21 @@ class nsCalculatedBoxInfo;
 class nsHTMLReflowMetrics;
 struct nsHTMLReflowState;
 class nsString;
 class nsHTMLReflowCommand;
 
 class MOZ_STACK_CLASS nsBoxLayoutState
 {
 public:
-  nsBoxLayoutState(nsPresContext* aPresContext,
-                   nsRenderingContext* aRenderingContext = nullptr,
-                   // see OuterReflowState() below
-                   const nsHTMLReflowState* aOuterReflowState = nullptr,
-                   uint16_t aReflowDepth = 0);
+  explicit nsBoxLayoutState(nsPresContext* aPresContext,
+                            nsRenderingContext* aRenderingContext = nullptr,
+                            // see OuterReflowState() below
+                            const nsHTMLReflowState* aOuterReflowState = nullptr,
+                            uint16_t aReflowDepth = 0);
   nsBoxLayoutState(const nsBoxLayoutState& aState);
 
   nsPresContext* PresContext() const { return mPresContext; }
   nsIPresShell* PresShell() const { return mPresContext->PresShell(); }
 
   uint32_t LayoutFlags() const { return mLayoutFlags; }
   void SetLayoutFlags(uint32_t aFlags) { mLayoutFlags = aFlags; }
 
@@ -46,17 +46,17 @@ public:
 
   // The rendering context may be null for specialized uses of
   // nsBoxLayoutState and should be null-checked before it is used.
   // However, passing a null rendering context to the constructor when
   // doing box layout or intrinsic size calculation will cause bugs.
   nsRenderingContext* GetRenderingContext() const { return mRenderingContext; }
 
   struct AutoReflowDepth {
-    AutoReflowDepth(nsBoxLayoutState& aState)
+    explicit AutoReflowDepth(nsBoxLayoutState& aState)
       : mState(aState) { ++mState.mReflowDepth; }
     ~AutoReflowDepth() { --mState.mReflowDepth; }
     nsBoxLayoutState& mState;
   };
 
   // The HTML reflow state that lives outside the box-block boundary.
   // May not be set reliably yet.
   const nsHTMLReflowState* OuterReflowState() { return mOuterReflowState; }
--- a/layout/xul/nsListBoxBodyFrame.cpp
+++ b/layout/xul/nsListBoxBodyFrame.cpp
@@ -67,17 +67,17 @@ using namespace mozilla::dom;
 class nsListScrollSmoother MOZ_FINAL : public nsITimerCallback
 {
 private:
   virtual ~nsListScrollSmoother();
 
 public:
   NS_DECL_ISUPPORTS
 
-  nsListScrollSmoother(nsListBoxBodyFrame* aOuter);
+  explicit nsListScrollSmoother(nsListBoxBodyFrame* aOuter);
 
   // nsITimerCallback
   NS_DECL_NSITIMERCALLBACK
 
   void Start();
   void Stop();
   bool IsRunning();
 
--- a/layout/xul/nsMenuBarListener.h
+++ b/layout/xul/nsMenuBarListener.h
@@ -19,17 +19,17 @@ class nsIDOMKeyEvent;
 
 /** editor Implementation of the DragListener interface
  */
 class nsMenuBarListener MOZ_FINAL : public nsIDOMEventListener
 {
 public:
   /** default constructor
    */
-  nsMenuBarListener(nsMenuBarFrame* aMenuBar);
+  explicit nsMenuBarListener(nsMenuBarFrame* aMenuBar);
 
   static void InitializeStatics();
    
   NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) MOZ_OVERRIDE;
   
   nsresult KeyUp(nsIDOMEvent* aMouseEvent);
   nsresult KeyDown(nsIDOMEvent* aMouseEvent);
   nsresult KeyPress(nsIDOMEvent* aMouseEvent);
--- a/layout/xul/nsMenuFrame.cpp
+++ b/layout/xul/nsMenuFrame.cpp
@@ -199,17 +199,17 @@ nsMenuFrame::GetMenuParent() const
     }
   }
   return nullptr;
 }
 
 class nsASyncMenuInitialization MOZ_FINAL : public nsIReflowCallback
 {
 public:
-  nsASyncMenuInitialization(nsIFrame* aFrame)
+  explicit nsASyncMenuInitialization(nsIFrame* aFrame)
     : mWeakFrame(aFrame)
   {
   }
 
   virtual bool ReflowFinished() MOZ_OVERRIDE
   {
     bool shouldFlush = false;
     nsMenuFrame* menu = do_QueryFrame(mWeakFrame.GetFrame());
--- a/layout/xul/nsMenuFrame.h
+++ b/layout/xul/nsMenuFrame.h
@@ -53,17 +53,17 @@ class nsMenuFrame;
  * passed to timers. The class is reference counted unlike the underlying
  * nsMenuFrame, so that it will exist as long as the timer holds a reference
  * to it. The callback is delegated to the contained nsMenuFrame as long as
  * the contained nsMenuFrame has not been destroyed.
  */
 class nsMenuTimerMediator MOZ_FINAL : public nsITimerCallback
 {
 public:
-  nsMenuTimerMediator(nsMenuFrame* aFrame);
+  explicit nsMenuTimerMediator(nsMenuFrame* aFrame);
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSITIMERCALLBACK
 
   void ClearFrame();
 
 private:
   ~nsMenuTimerMediator();
--- a/layout/xul/nsProgressMeterFrame.cpp
+++ b/layout/xul/nsProgressMeterFrame.cpp
@@ -75,17 +75,17 @@ NS_IMPL_FRAMEARENA_HELPERS(nsProgressMet
 //
 nsProgressMeterFrame :: ~nsProgressMeterFrame ( )
 {
 }
 
 class nsAsyncProgressMeterInit MOZ_FINAL : public nsIReflowCallback
 {
 public:
-  nsAsyncProgressMeterInit(nsIFrame* aFrame) : mWeakFrame(aFrame) {}
+  explicit nsAsyncProgressMeterInit(nsIFrame* aFrame) : mWeakFrame(aFrame) {}
 
   virtual bool ReflowFinished() MOZ_OVERRIDE
   {
     bool shouldFlush = false;
     nsIFrame* frame = mWeakFrame.GetFrame();
     if (frame) {
       nsAutoScriptBlocker scriptBlocker;
       frame->AttributeChanged(kNameSpaceID_None, nsGkAtoms::mode, 0);
--- a/layout/xul/nsSliderFrame.h
+++ b/layout/xul/nsSliderFrame.h
@@ -23,17 +23,17 @@ nsIFrame* NS_NewSliderFrame(nsIPresShell
 class nsSliderMediator MOZ_FINAL : public nsIDOMEventListener
 {
 public:
 
   NS_DECL_ISUPPORTS
 
   nsSliderFrame* mSlider;
 
-  nsSliderMediator(nsSliderFrame* aSlider) {  mSlider = aSlider; }
+  explicit nsSliderMediator(nsSliderFrame* aSlider) {  mSlider = aSlider; }
 
   virtual void SetSlider(nsSliderFrame* aSlider) { mSlider = aSlider; }
 
   NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) MOZ_OVERRIDE;
 
 protected:
   virtual ~nsSliderMediator() {}
 };
--- a/layout/xul/nsSplitterFrame.cpp
+++ b/layout/xul/nsSplitterFrame.cpp
@@ -55,17 +55,17 @@ class nsSplitterFrameInner MOZ_FINAL : p
 protected:
   virtual ~nsSplitterFrameInner();
 
 public:
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDOMEVENTLISTENER
 
-  nsSplitterFrameInner(nsSplitterFrame* aSplitter)
+  explicit nsSplitterFrameInner(nsSplitterFrame* aSplitter)
   {
     mOuter = aSplitter;
     mPressed = false;
   }
 
   void Disconnect() { mOuter = nullptr; }
 
   nsresult MouseDown(nsIDOMEvent* aMouseEvent);
--- a/layout/xul/nsTextBoxFrame.cpp
+++ b/layout/xul/nsTextBoxFrame.cpp
@@ -154,17 +154,17 @@ nsTextBoxFrame::InsertSeparatorBeforeAcc
     gInsertSeparatorBeforeAccessKey = val.EqualsLiteral("true");
   }
   return gInsertSeparatorBeforeAccessKey;
 }
 
 class nsAsyncAccesskeyUpdate MOZ_FINAL : public nsIReflowCallback
 {
 public:
-    nsAsyncAccesskeyUpdate(nsIFrame* aFrame) : mWeakFrame(aFrame)
+    explicit nsAsyncAccesskeyUpdate(nsIFrame* aFrame) : mWeakFrame(aFrame)
     {
     }
 
     virtual bool ReflowFinished() MOZ_OVERRIDE
     {
         bool shouldFlush = false;
         nsTextBoxFrame* frame =
             static_cast<nsTextBoxFrame*>(mWeakFrame.GetFrame());
--- a/layout/xul/nsXULLabelFrame.h
+++ b/layout/xul/nsXULLabelFrame.h
@@ -41,17 +41,17 @@ public:
    */
   virtual nsIAtom* GetType() const MOZ_OVERRIDE;
   
 #ifdef DEBUG_FRAME_DUMP
   virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
 #endif
 
 protected:
-  nsXULLabelFrame(nsStyleContext *aContext) : nsBlockFrame(aContext) {}
+  explicit nsXULLabelFrame(nsStyleContext *aContext) : nsBlockFrame(aContext) {}
 
   nsresult RegUnregAccessKey(bool aDoReg);
 };
 
 nsIFrame*
 NS_NewXULLabelFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 
 #endif /* !defined(nsXULLabelFrame_h_) */
--- a/layout/xul/tree/nsTreeBodyFrame.cpp
+++ b/layout/xul/tree/nsTreeBodyFrame.cpp
@@ -4668,17 +4668,17 @@ nsTreeBodyFrame::FireInvalidateEvent(int
     new AsyncEventDispatcher(content, event);
   asyncDispatcher->PostDOMEvent();
 }
 #endif
 
 class nsOverflowChecker : public nsRunnable
 {
 public:
-  nsOverflowChecker(nsTreeBodyFrame* aFrame) : mFrame(aFrame) {}
+  explicit nsOverflowChecker(nsTreeBodyFrame* aFrame) : mFrame(aFrame) {}
   NS_IMETHOD Run() MOZ_OVERRIDE
   {
     if (mFrame.IsAlive()) {
       nsTreeBodyFrame* tree = static_cast<nsTreeBodyFrame*>(mFrame.GetFrame());
       nsTreeBodyFrame::ScrollParts parts = tree->GetScrollParts();
       tree->CheckOverflow(parts);
     }
     return NS_OK;
--- a/layout/xul/tree/nsTreeBodyFrame.h
+++ b/layout/xul/tree/nsTreeBodyFrame.h
@@ -453,17 +453,17 @@ protected:
 
   static void LazyScrollCallback(nsITimer *aTimer, void *aClosure);
 
   static void ScrollCallback(nsITimer *aTimer, void *aClosure);
 
   class ScrollEvent : public nsRunnable {
   public:
     NS_DECL_NSIRUNNABLE
-    ScrollEvent(nsTreeBodyFrame *aInner) : mInner(aInner) {}
+    explicit ScrollEvent(nsTreeBodyFrame *aInner) : mInner(aInner) {}
     void Revoke() { mInner = nullptr; }
   private:
     nsTreeBodyFrame* mInner;
   };
 
   void PostScrollEvent();
   void FireScrollEvent();
 
--- a/layout/xul/tree/nsTreeColumns.h
+++ b/layout/xul/tree/nsTreeColumns.h
@@ -125,17 +125,17 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsTreeColu
 
 class nsTreeColumns MOZ_FINAL : public nsITreeColumns
                               , public nsWrapperCache
 {
 private:
   ~nsTreeColumns();
 
 public:
-  nsTreeColumns(nsTreeBodyFrame* aTree);
+  explicit nsTreeColumns(nsTreeBodyFrame* aTree);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsTreeColumns)
   NS_DECL_NSITREECOLUMNS
 
   nsIContent* GetParentObject() const;
   virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
 
--- a/layout/xul/tree/nsTreeImageListener.h
+++ b/layout/xul/tree/nsTreeImageListener.h
@@ -11,17 +11,17 @@
 #include "nsITreeColumns.h"
 #include "nsTreeBodyFrame.h"
 #include "mozilla/Attributes.h"
 
 // This class handles image load observation.
 class nsTreeImageListener MOZ_FINAL : public imgINotificationObserver
 {
 public:
-  nsTreeImageListener(nsTreeBodyFrame *aTreeFrame);
+  explicit nsTreeImageListener(nsTreeBodyFrame *aTreeFrame);
 
   NS_DECL_ISUPPORTS
   NS_DECL_IMGINOTIFICATIONOBSERVER
 
   NS_IMETHOD ClearFrame();
 
   friend class nsTreeBodyFrame;
 
@@ -35,17 +35,17 @@ protected:
 private:
   nsTreeBodyFrame* mTreeFrame;
 
   // A guard that prevents us from recursive painting.
   bool mInvalidationSuppressed;
 
   class InvalidationArea {
     public:
-      InvalidationArea(nsITreeColumn* aCol);
+      explicit InvalidationArea(nsITreeColumn* aCol);
       ~InvalidationArea() { delete mNext; }
 
       friend class nsTreeImageListener;
 
     protected:
       void AddRow(int32_t aIndex);
       nsITreeColumn* GetCol() { return mCol.get(); }
       int32_t GetMin() { return mMin; }
--- a/layout/xul/tree/nsTreeSelection.h
+++ b/layout/xul/tree/nsTreeSelection.h
@@ -14,17 +14,17 @@
 #include "mozilla/Attributes.h"
 
 class nsITreeBoxObject;
 struct nsTreeRange;
 
 class nsTreeSelection MOZ_FINAL : public nsINativeTreeSelection
 {
 public:
-  nsTreeSelection(nsITreeBoxObject* aTree);
+  explicit nsTreeSelection(nsITreeBoxObject* aTree);
    
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS(nsTreeSelection)
   NS_DECL_NSITREESELECTION
 
   // nsINativeTreeSelection: Untrusted code can use us
   NS_IMETHOD EnsureNative() MOZ_OVERRIDE { return NS_OK; }