Bug 1331756 part 2: Drop redundant 'virtual' keyword from nsFrame method overrides. r=xidorn
authorDaniel Holbert <dholbert@cs.stanford.edu>
Tue, 17 Jan 2017 16:27:03 -0800
changeset 374742 8f0a8b51869b44dbb0984a76a996e07092252f5a
parent 374741 9a8fcd5949aa381e22d3d6210dc535afc6308c34
child 374743 dbeeb7728cde4a022994dd84c1e4c98019588c13
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersxidorn
bugs1331756
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1331756 part 2: Drop redundant 'virtual' keyword from nsFrame method overrides. r=xidorn (This patch creates some mis-indentation issues; I'll fix those up in a subsequent whitespace-only patch.) MozReview-Commit-ID: 7gi8kmi8ZAF
layout/generic/nsFrame.h
--- a/layout/generic/nsFrame.h
+++ b/layout/generic/nsFrame.h
@@ -143,98 +143,98 @@ protected:
 public:
 
   // nsQueryFrame
   NS_DECL_QUERYFRAME
   void* operator new(size_t, nsIPresShell*) MOZ_MUST_OVERRIDE;
   virtual nsQueryFrame::FrameIID GetFrameId() MOZ_MUST_OVERRIDE;
 
   // nsIFrame
-  virtual void Init(nsIContent*       aContent,
+  void Init(nsIContent*       aContent,
                     nsContainerFrame* aParent,
                     nsIFrame*         aPrevInFlow) override;
-  virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
-  virtual nsStyleContext* GetAdditionalStyleContext(int32_t aIndex) const override;
-  virtual void SetAdditionalStyleContext(int32_t aIndex,
+  void DestroyFrom(nsIFrame* aDestructRoot) override;
+  nsStyleContext* GetAdditionalStyleContext(int32_t aIndex) const override;
+  void SetAdditionalStyleContext(int32_t aIndex,
                                          nsStyleContext* aStyleContext) override;
-  virtual nscoord GetLogicalBaseline(mozilla::WritingMode aWritingMode) const override;
-  virtual const nsFrameList& GetChildList(ChildListID aListID) const override;
-  virtual void GetChildLists(nsTArray<ChildList>* aLists) const override;
+  nscoord GetLogicalBaseline(mozilla::WritingMode aWritingMode) const override;
+  const nsFrameList& GetChildList(ChildListID aListID) const override;
+  void GetChildLists(nsTArray<ChildList>* aLists) const override;
 
-  virtual nsresult  HandleEvent(nsPresContext* aPresContext, 
+  nsresult  HandleEvent(nsPresContext* aPresContext, 
                                 mozilla::WidgetGUIEvent* aEvent,
                                 nsEventStatus* aEventStatus) override;
-  virtual nsresult  GetContentForEvent(mozilla::WidgetEvent* aEvent,
+  nsresult  GetContentForEvent(mozilla::WidgetEvent* aEvent,
                                        nsIContent** aContent) override;
-  virtual nsresult  GetCursor(const nsPoint&    aPoint,
+  nsresult  GetCursor(const nsPoint&    aPoint,
                               nsIFrame::Cursor& aCursor) override;
 
-  virtual nsresult  GetPointFromOffset(int32_t  inOffset,
+  nsresult  GetPointFromOffset(int32_t  inOffset,
                                        nsPoint* outPoint) override;
-  virtual nsresult  GetCharacterRectsInRange(int32_t aInOffset,
+  nsresult  GetCharacterRectsInRange(int32_t aInOffset,
                                              int32_t aLength,
                                              nsTArray<nsRect>& aOutRect) override;
 
-  virtual nsresult  GetChildFrameContainingOffset(int32_t    inContentOffset,
+  nsresult  GetChildFrameContainingOffset(int32_t    inContentOffset,
                                                   bool       inHint,
                                                   int32_t*   outFrameContentOffset,
                                                   nsIFrame** outChildFrame) override;
 
   static nsresult  GetNextPrevLineFromeBlockFrame(nsPresContext* aPresContext,
                                         nsPeekOffsetStruct *aPos, 
                                         nsIFrame *aBlockFrame, 
                                         int32_t aLineStart, 
                                         int8_t aOutSideLimit
                                         );
 
-  virtual nsresult  CharacterDataChanged(CharacterDataChangeInfo* aInfo) override;
-  virtual nsresult  AttributeChanged(int32_t         aNameSpaceID,
+  nsresult  CharacterDataChanged(CharacterDataChangeInfo* aInfo) override;
+  nsresult  AttributeChanged(int32_t         aNameSpaceID,
                                      nsIAtom*        aAttribute,
                                      int32_t         aModType) override;
-  virtual nsSplittableType GetSplittableType() const override;
-  virtual nsIFrame* GetPrevContinuation() const override;
-  virtual void SetPrevContinuation(nsIFrame*) override;
-  virtual nsIFrame* GetNextContinuation() const override;
-  virtual void SetNextContinuation(nsIFrame*) override;
-  virtual nsIFrame* GetPrevInFlowVirtual() const override;
-  virtual void SetPrevInFlow(nsIFrame*) override;
-  virtual nsIFrame* GetNextInFlowVirtual() const override;
-  virtual void SetNextInFlow(nsIFrame*) override;
-  virtual nsIAtom* GetType() const override;
+  nsSplittableType GetSplittableType() const override;
+  nsIFrame* GetPrevContinuation() const override;
+  void SetPrevContinuation(nsIFrame*) override;
+  nsIFrame* GetNextContinuation() const override;
+  void SetNextContinuation(nsIFrame*) override;
+  nsIFrame* GetPrevInFlowVirtual() const override;
+  void SetPrevInFlow(nsIFrame*) override;
+  nsIFrame* GetNextInFlowVirtual() const override;
+  void SetNextInFlow(nsIFrame*) override;
+  nsIAtom* GetType() const override;
 
-  virtual nsresult  GetSelectionController(nsPresContext *aPresContext, nsISelectionController **aSelCon) override;
+  nsresult  GetSelectionController(nsPresContext *aPresContext, nsISelectionController **aSelCon) override;
 
-  virtual FrameSearchResult PeekOffsetNoAmount(bool aForward, int32_t* aOffset) override;
-  virtual FrameSearchResult PeekOffsetCharacter(bool aForward, int32_t* aOffset,
+  FrameSearchResult PeekOffsetNoAmount(bool aForward, int32_t* aOffset) override;
+  FrameSearchResult PeekOffsetCharacter(bool aForward, int32_t* aOffset,
                                      bool aRespectClusters = true) override;
-  virtual FrameSearchResult PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKeyboardSelect,
+  FrameSearchResult PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKeyboardSelect,
                                 int32_t* aOffset, PeekWordState *aState) override;
   /**
    * Check whether we should break at a boundary between punctuation and
    * non-punctuation. Only call it at a punctuation boundary
    * (i.e. exactly one of the previous and next characters are punctuation).
    * @param aForward true if we're moving forward in content order
    * @param aPunctAfter true if the next character is punctuation
    * @param aWhitespaceAfter true if the next character is whitespace
    */
   bool BreakWordBetweenPunctuation(const PeekWordState* aState,
                                      bool aForward,
                                      bool aPunctAfter, bool aWhitespaceAfter,
                                      bool aIsKeyboardSelect);
 
-  virtual nsresult  CheckVisibility(nsPresContext* aContext, int32_t aStartIndex, int32_t aEndIndex, bool aRecurse, bool *aFinished, bool *_retval) override;
+  nsresult  CheckVisibility(nsPresContext* aContext, int32_t aStartIndex, int32_t aEndIndex, bool aRecurse, bool *aFinished, bool *_retval) override;
 
-  virtual nsresult  GetOffsets(int32_t &aStart, int32_t &aEnd) const override;
-  virtual void ChildIsDirty(nsIFrame* aChild) override;
+  nsresult  GetOffsets(int32_t &aStart, int32_t &aEnd) const override;
+  void ChildIsDirty(nsIFrame* aChild) override;
 
 #ifdef ACCESSIBILITY
-  virtual mozilla::a11y::AccType AccessibleType() override;
+  mozilla::a11y::AccType AccessibleType() override;
 #endif
 
-  virtual nsStyleContext* GetParentStyleContext(nsIFrame** aProviderFrame) const override {
+  nsStyleContext* GetParentStyleContext(nsIFrame** aProviderFrame) const override {
     return DoGetParentStyleContext(aProviderFrame);
   }
 
   /**
    * Do the work for getting the parent style context frame so that
    * other frame's |GetParentStyleContext| methods can call this
    * method on *another* frame.  (This function handles out-of-flow
    * frames by using the frame manager's placeholder map and it also
@@ -243,31 +243,31 @@ public:
    * @param aProviderFrame (out) the frame associated with the returned value
    *     or null if the style context is for display:contents content.
    * @return The style context that should be the parent of this frame's
    *         style context.  Null is permitted, and means that this frame's
    *         style context should be the root of the style context tree.
    */
   nsStyleContext* DoGetParentStyleContext(nsIFrame** aProviderFrame) const;
 
-  virtual bool IsEmpty() override;
-  virtual bool IsSelfEmpty() override;
+  bool IsEmpty() override;
+  bool IsSelfEmpty() override;
 
-  virtual void MarkIntrinsicISizesDirty() override;
-  virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
-  virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
-  virtual void AddInlineMinISize(nsRenderingContext *aRenderingContext,
+  void MarkIntrinsicISizesDirty() override;
+  nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
+  nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
+  void AddInlineMinISize(nsRenderingContext *aRenderingContext,
                                  InlineMinISizeData *aData) override;
-  virtual void AddInlinePrefISize(nsRenderingContext *aRenderingContext,
+  void AddInlinePrefISize(nsRenderingContext *aRenderingContext,
                                   InlinePrefISizeData *aData) override;
-  virtual IntrinsicISizeOffsetData IntrinsicISizeOffsets() override;
-  virtual mozilla::IntrinsicSize GetIntrinsicSize() override;
-  virtual nsSize GetIntrinsicRatio() override;
+  IntrinsicISizeOffsetData IntrinsicISizeOffsets() override;
+  mozilla::IntrinsicSize GetIntrinsicSize() override;
+  nsSize GetIntrinsicRatio() override;
 
-  virtual mozilla::LogicalSize
+  mozilla::LogicalSize
   ComputeSize(nsRenderingContext*         aRenderingContext,
               mozilla::WritingMode        aWM,
               const mozilla::LogicalSize& aCBSize,
               nscoord                     aAvailableISize,
               const mozilla::LogicalSize& aMargin,
               const mozilla::LogicalSize& aBorder,
               const mozilla::LogicalSize& aPadding,
               ComputeSizeFlags            aFlags) override;
@@ -342,21 +342,21 @@ public:
    * them), whereas a change in its height might not.
    * (ReflowInput::ShouldReflowAllKids may be helpful in deciding whether
    * to reflow all the children, but for some frame types it might result in
    * over-reflow.)
    *
    * Note: if it's only the overflow rect(s) of a frame that need to be
    * updated, then UpdateOverflow should be called instead of Reflow.
    */
-  virtual void Reflow(nsPresContext*           aPresContext,
+  void Reflow(nsPresContext*           aPresContext,
                       ReflowOutput&     aDesiredSize,
                       const ReflowInput& aReflowInput,
                       nsReflowStatus&          aStatus) override;
-  virtual void DidReflow(nsPresContext*           aPresContext,
+  void DidReflow(nsPresContext*           aPresContext,
                          const ReflowInput* aReflowInput,
                          nsDidReflowStatus        aStatus) override;
 
   /**
    * NOTE: aStatus is assumed to be already-initialized. The reflow statuses of
    * any reflowed absolute children will be merged into aStatus; aside from
    * that, this method won't modify aStatus.
    */
@@ -379,21 +379,21 @@ public:
    * It's necessary to use PushDirtyBitToAbsoluteFrames() when you plan to
    * reflow this frame's absolutely-positioned children after the dirty bit on
    * this frame has already been cleared, which prevents ReflowInput from
    * propagating the dirty bit normally. This situation generally only arises
    * when a multipass layout algorithm is used.
    */
   void PushDirtyBitToAbsoluteFrames();
 
-  virtual bool CanContinueTextRun() const override;
+  bool CanContinueTextRun() const override;
 
-  virtual bool ComputeCustomOverflow(nsOverflowAreas& aOverflowAreas) override;
+  bool ComputeCustomOverflow(nsOverflowAreas& aOverflowAreas) override;
 
-  virtual void UnionChildOverflow(nsOverflowAreas& aOverflowAreas) override;
+  void UnionChildOverflow(nsOverflowAreas& aOverflowAreas) override;
 
   // Selection Methods
 
   NS_IMETHOD HandlePress(nsPresContext* aPresContext,
                          mozilla::WidgetGUIEvent* aEvent,
                          nsEventStatus* aEventStatus);
 
   NS_IMETHOD HandleMultiplePress(nsPresContext* aPresContext,
@@ -423,25 +423,25 @@ public:
                                nsSelectionAmount aEndAmountType,
                                uint32_t aSelectFlags);
 
   // Helper for GetContentAndOffsetsFromPoint; calculation of content offsets
   // in this function assumes there is no child frame that can be targeted.
   virtual ContentOffsets CalcContentOffsetsFromFramePoint(nsPoint aPoint);
 
   // Box layout methods
-  virtual nsSize GetXULPrefSize(nsBoxLayoutState& aBoxLayoutState) override;
-  virtual nsSize GetXULMinSize(nsBoxLayoutState& aBoxLayoutState) override;
-  virtual nsSize GetXULMaxSize(nsBoxLayoutState& aBoxLayoutState) override;
-  virtual nscoord GetXULFlex() override;
-  virtual nscoord GetXULBoxAscent(nsBoxLayoutState& aBoxLayoutState) override;
+  nsSize GetXULPrefSize(nsBoxLayoutState& aBoxLayoutState) override;
+  nsSize GetXULMinSize(nsBoxLayoutState& aBoxLayoutState) override;
+  nsSize GetXULMaxSize(nsBoxLayoutState& aBoxLayoutState) override;
+  nscoord GetXULFlex() override;
+  nscoord GetXULBoxAscent(nsBoxLayoutState& aBoxLayoutState) override;
 
   // We compute and store the HTML content's overflow area. So don't
   // try to compute it in the box code.
-  virtual bool ComputesOwnOverflowArea() override { return true; }
+  bool ComputesOwnOverflowArea() override { return true; }
 
   //--------------------------------------------------
   // Additional methods
 
   // Helper function that tests if the frame tree is too deep; if it is
   // it marks the frame as "unflowable", zeroes out the metrics, sets
   // the reflow status, and returns true. Otherwise, the frame is
   // unmarked "unflowable" and the metrics and reflow status are not
@@ -581,17 +581,17 @@ protected:
    * which kind of content this is for
    */
   void DisplaySelectionOverlay(nsDisplayListBuilder* aBuilder,
       nsDisplayList* aList, uint16_t aContentType = nsISelectionDisplay::DISPLAY_FRAMES);
 
   int16_t DisplaySelection(nsPresContext* aPresContext, bool isOkToTurnOn = false);
   
   // Style post processing hook
-  virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) override;
+  void DidSetStyleContext(nsStyleContext* aOldStyleContext) override;
 
 public:
   //given a frame five me the first/last leaf available
   //XXX Robert O'Callahan wants to move these elsewhere
   static void GetLastLeaf(nsPresContext* aPresContext, nsIFrame **aFrame);
   static void GetFirstLeaf(nsPresContext* aPresContext, nsIFrame **aFrame);
 
   // Return the line number of the aFrame, and (optionally) the containing block
@@ -644,17 +644,17 @@ public:
     // If we're paginated and a block, and have NS_BLOCK_CLIP_PAGINATED_OVERFLOW
     // set, then we want to clip our overflow.
     return
       (aFrame->GetStateBits() & NS_BLOCK_CLIP_PAGINATED_OVERFLOW) != 0 &&
       aFrame->PresContext()->IsPaginated() &&
       aFrame->GetType() == nsGkAtoms::blockFrame;
   }
 
-  virtual nsILineIterator* GetLineIterator() override;
+  nsILineIterator* GetLineIterator() override;
 
 protected:
 
   // Test if we are selecting a table object:
   //  Most table/cell selection requires that Ctrl (Cmd on Mac) key is down 
   //   during a mouse click or drag. Exception is using Shift+click when
   //   already in "table/cell selection mode" to extend a block selection
   //  Get the parent content node and offset of the frame 
@@ -669,17 +669,17 @@ protected:
                                       int32_t* aTarget);
 
   // Fills aCursor with the appropriate information from ui
   static void FillCursorInformationFromStyle(const nsStyleUserInterface* ui,
                                              nsIFrame::Cursor& aCursor);
   NS_IMETHOD DoXULLayout(nsBoxLayoutState& aBoxLayoutState) override;
 
 #ifdef DEBUG_LAYOUT
-  virtual void GetBoxName(nsAutoString& aName) override;
+  void GetBoxName(nsAutoString& aName) override;
 #endif
 
   nsBoxLayoutMetrics* BoxMetrics() const;
 
   // Fire DOM event. If no aContent argument use frame's mContent.
   void FireDOMEvent(const nsAString& aDOMEventName, nsIContent *aContent = nullptr);
 
 private:
@@ -702,39 +702,39 @@ private:
   bool HasCSSTransitions();
 
 #ifdef DEBUG_FRAME_DUMP
 public:
   /**
    * Get a printable from of the name of the frame type.
    * XXX This should be eliminated and we use GetType() instead...
    */
-  virtual nsresult  GetFrameName(nsAString& aResult) const override;
+  nsresult  GetFrameName(nsAString& aResult) const override;
   nsresult MakeFrameName(const nsAString& aKind, nsAString& aResult) const;
   // Helper function to return the index in parent of the frame's content
   // object. Returns -1 on error or if the frame doesn't have a content object
   static int32_t ContentIndexInContainer(const nsIFrame* aFrame);
 #endif
 
 #ifdef DEBUG
 public:
   /**
    * Return the state bits that are relevant to regression tests (that
    * is, those bits which indicate a real difference when they differ
    */
-  virtual nsFrameState  GetDebugStateBits() const override;
+  nsFrameState  GetDebugStateBits() const override;
   /**
    * Called to dump out regression data that describes the layout
    * of the frame and its children, and so on. The format of the
    * data is dictated to be XML (using a specific DTD); the
    * specific kind of data dumped is up to the frame itself, with
    * the caveat that some base types are defined.
    * For more information, see XXX.
    */
-  virtual nsresult  DumpRegressionData(nsPresContext* aPresContext,
+  nsresult  DumpRegressionData(nsPresContext* aPresContext,
                                        FILE* out, int32_t aIndent) override;
 
   /**
    * See if style tree verification is enabled. To enable style tree
    * verification add "styleverifytree:1" to your MOZ_LOG
    * environment variable (any non-zero debug level will work). Or,
    * call SetVerifyStyleTreeEnable with true.
    */