Bug 1331756 part 5: Drop redundant 'virtual' keyword from method overrides in several frame classes. r=xidorn

MozReview-Commit-ID: IwjWBbGe9jo
This commit is contained in:
Daniel Holbert 2017-01-17 16:27:03 -08:00
parent 1c1b78e4b7
commit 85f6680212
5 changed files with 124 additions and 126 deletions

View File

@ -106,21 +106,21 @@ public:
NS_DECL_QUERYFRAME
// nsIFrame
virtual void Init(nsIContent* aContent,
nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
virtual void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override;
virtual void AppendFrames(ChildListID aListID,
nsFrameList& aFrameList) override;
virtual void InsertFrames(ChildListID aListID,
nsIFrame* aPrevFrame,
nsFrameList& aFrameList) override;
virtual void RemoveFrame(ChildListID aListID,
nsIFrame* aOldFrame) override;
virtual const nsFrameList& GetChildList(ChildListID aListID) const override;
virtual void GetChildLists(nsTArray<ChildList>* aLists) const override;
virtual nscoord GetLogicalBaseline(mozilla::WritingMode aWritingMode) const override;
void Init(nsIContent* aContent,
nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override;
void AppendFrames(ChildListID aListID,
nsFrameList& aFrameList) override;
void InsertFrames(ChildListID aListID,
nsIFrame* aPrevFrame,
nsFrameList& aFrameList) override;
void RemoveFrame(ChildListID aListID,
nsIFrame* aOldFrame) override;
const nsFrameList& GetChildList(ChildListID aListID) const override;
void GetChildLists(nsTArray<ChildList>* aLists) const override;
nscoord GetLogicalBaseline(mozilla::WritingMode aWritingMode) const override;
bool GetVerticalAlignBaseline(mozilla::WritingMode aWM,
nscoord* aBaseline) const override
{
@ -134,36 +134,36 @@ public:
bool GetNaturalBaselineBOffset(mozilla::WritingMode aWM,
BaselineSharingGroup aBaselineGroup,
nscoord* aBaseline) const override;
virtual nscoord GetCaretBaseline() const override;
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
virtual nsSplittableType GetSplittableType() const override;
virtual bool IsFloatContainingBlock() const override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nsIAtom* GetType() const override;
virtual bool IsFrameOfType(uint32_t aFlags) const override
nscoord GetCaretBaseline() const override;
void DestroyFrom(nsIFrame* aDestructRoot) override;
nsSplittableType GetSplittableType() const override;
bool IsFloatContainingBlock() const override;
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
nsIAtom* GetType() const override;
bool IsFrameOfType(uint32_t aFlags) const override
{
return nsContainerFrame::IsFrameOfType(aFlags &
~(nsIFrame::eCanContainOverflowContainers |
nsIFrame::eBlockFrame));
}
virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0) override;
virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0) override;
void InvalidateFrame(uint32_t aDisplayItemKey = 0) override;
void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0) override;
#ifdef DEBUG_FRAME_DUMP
void List(FILE* out = stderr, const char* aPrefix = "", uint32_t aFlags = 0) const override;
virtual nsresult GetFrameName(nsAString& aResult) const override;
nsresult GetFrameName(nsAString& aResult) const override;
#endif
#ifdef DEBUG
virtual nsFrameState GetDebugStateBits() const override;
nsFrameState GetDebugStateBits() const override;
const char* LineReflowStatusToString(LineReflowStatus aLineReflowStatus) const;
#endif
#ifdef ACCESSIBILITY
virtual mozilla::a11y::AccType AccessibleType() override;
mozilla::a11y::AccType AccessibleType() override;
#endif
// Line cursor methods to speed up line searching in which one query
@ -226,12 +226,12 @@ public:
nsLineBox* mOrigCursor;
};
virtual void ChildIsDirty(nsIFrame* aChild) override;
virtual bool IsVisibleInSelection(nsISelection* aSelection) override;
void ChildIsDirty(nsIFrame* aChild) override;
bool IsVisibleInSelection(nsISelection* aSelection) override;
virtual bool IsEmpty() override;
virtual bool CachedIsEmpty() override;
virtual bool IsSelfEmpty() override;
bool IsEmpty() override;
bool CachedIsEmpty() override;
bool IsSelfEmpty() override;
// Given that we have a bullet, does it actually draw something, i.e.,
// do we have either a 'list-style-type' or 'list-style-image' that is
@ -272,18 +272,18 @@ public:
return outside ? outside : GetInsideBullet();
}
virtual void MarkIntrinsicISizesDirty() override;
void MarkIntrinsicISizesDirty() override;
private:
void CheckIntrinsicCacheAgainstShrinkWrapState();
public:
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
virtual nsRect ComputeTightBounds(DrawTarget* aDrawTarget) const override;
nsRect ComputeTightBounds(DrawTarget* aDrawTarget) const override;
virtual nsresult GetPrefWidthTightBounds(nsRenderingContext* aContext,
nscoord* aX,
nscoord* aXMost) override;
nsresult GetPrefWidthTightBounds(nsRenderingContext* aContext,
nscoord* aX,
nscoord* aXMost) override;
/**
* Compute the final block size of this frame.
@ -309,25 +309,25 @@ public:
mozilla::LogicalSize& aFinalSize,
nscoord aConsumed);
virtual void Reflow(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput,
nsReflowStatus& aStatus) override;
void Reflow(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput,
nsReflowStatus& aStatus) override;
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
nsIAtom* aAttribute,
int32_t aModType) override;
nsresult AttributeChanged(int32_t aNameSpaceID,
nsIAtom* aAttribute,
int32_t aModType) override;
/**
* Move any frames on our overflow list to the end of our principal list.
* @return true if there were any overflow frames
*/
virtual bool DrainSelfOverflowList() override;
bool DrainSelfOverflowList() override;
virtual nsresult StealFrame(nsIFrame* aChild) override;
nsresult StealFrame(nsIFrame* aChild) override;
virtual void DeleteNextInFlowChild(nsIFrame* aNextInFlow,
bool aDeletingEmptyFrames) override;
void DeleteNextInFlowChild(nsIFrame* aNextInFlow,
bool aDeletingEmptyFrames) override;
/**
* This is a special method that allows a child class of nsBlockFrame to

View File

@ -62,23 +62,21 @@ public:
nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual void Reflow(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput,
nsReflowStatus& aStatus) override;
void Reflow(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput,
nsReflowStatus& aStatus) override;
virtual nscoord
GetMinISize(nsRenderingContext* aRenderingContext) override;
virtual nscoord
GetPrefISize(nsRenderingContext* aRenderingContext) override;
nscoord GetMinISize(nsRenderingContext* aRenderingContext) override;
nscoord GetPrefISize(nsRenderingContext* aRenderingContext) override;
virtual nsIAtom* GetType() const override;
nsIAtom* GetType() const override;
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const override;
nsresult GetFrameName(nsAString& aResult) const override;
#endif
nscoord GetLogicalBaseline(mozilla::WritingMode aWM) const override;

View File

@ -61,14 +61,14 @@ public:
NS_DECL_FRAMEARENA_HELPERS
// nsIFrame
virtual void Reflow(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,
const ReflowInput& aMaxSize,
nsReflowStatus& aStatus) override;
void Reflow(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,
const ReflowInput& aMaxSize,
nsReflowStatus& aStatus) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
// nsIPageSequenceFrame
NS_IMETHOD SetPageNo(int32_t aPageNo) { return NS_OK;}
@ -94,19 +94,19 @@ public:
// We must allow Print Preview UI to have a background, no matter what the
// user's settings
virtual bool HonorPrintBackgroundSettings() override { return false; }
bool HonorPrintBackgroundSettings() override { return false; }
virtual bool HasTransformGetter() const override { return true; }
bool HasTransformGetter() const override { return true; }
/**
* Get the "type" of the frame
*
* @see nsGkAtoms::sequenceFrame
*/
virtual nsIAtom* GetType() const override;
nsIAtom* GetType() const override;
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const override;
nsresult GetFrameName(nsAString& aResult) const override;
#endif
protected:

View File

@ -26,14 +26,14 @@ public:
#ifdef DEBUG_FRAME_DUMP
void List(FILE* out = stderr, const char* aPrefix = "", uint32_t aFlags = 0) const override;
virtual nsresult GetFrameName(nsAString& aResult) const override;
nsresult GetFrameName(nsAString& aResult) const override;
#endif
NS_DECL_QUERYFRAME
virtual nsIAtom* GetType() const override;
nsIAtom* GetType() const override;
virtual bool IsFrameOfType(uint32_t aFlags) const override
bool IsFrameOfType(uint32_t aFlags) const override
{
return nsAtomicContainerFrame::IsFrameOfType(aFlags &
~(nsIFrame::eReplaced |
@ -41,19 +41,19 @@ public:
nsIFrame::eReplacedContainsBlock));
}
virtual void Init(nsIContent* aContent,
nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
void Init(nsIContent* aContent,
nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
void DestroyFrom(nsIFrame* aDestructRoot) override;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
virtual mozilla::IntrinsicSize GetIntrinsicSize() override;
virtual nsSize GetIntrinsicRatio() override;
mozilla::IntrinsicSize GetIntrinsicSize() override;
nsSize GetIntrinsicRatio() override;
virtual mozilla::LogicalSize
mozilla::LogicalSize
ComputeAutoSize(nsRenderingContext* aRenderingContext,
mozilla::WritingMode aWritingMode,
const mozilla::LogicalSize& aCBSize,
@ -63,7 +63,7 @@ public:
const mozilla::LogicalSize& aPadding,
ComputeSizeFlags aFlags) override;
virtual mozilla::LogicalSize
mozilla::LogicalSize
ComputeSize(nsRenderingContext* aRenderingContext,
mozilla::WritingMode aWritingMode,
const mozilla::LogicalSize& aCBSize,
@ -73,27 +73,27 @@ public:
const mozilla::LogicalSize& aPadding,
ComputeSizeFlags aFlags) override;
virtual void Reflow(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput,
nsReflowStatus& aStatus) override;
void Reflow(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput,
nsReflowStatus& aStatus) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
nsIAtom* aAttribute,
int32_t aModType) override;
nsresult AttributeChanged(int32_t aNameSpaceID,
nsIAtom* aAttribute,
int32_t aModType) override;
// if the content is "visibility:hidden", then just hide the view
// and all our contents. We don't extend "visibility:hidden" to
// the child content ourselves, since it belongs to a different
// document and CSS doesn't inherit in there.
virtual bool SupportsVisibilityHidden() override { return false; }
bool SupportsVisibilityHidden() override { return false; }
#ifdef ACCESSIBILITY
virtual mozilla::a11y::AccType AccessibleType() override;
mozilla::a11y::AccType AccessibleType() override;
#endif
nsresult GetDocShell(nsIDocShell **aDocShell);
@ -108,8 +108,8 @@ public:
mozilla::ScreenIntSize GetSubdocumentSize();
// nsIReflowCallback
virtual bool ReflowFinished() override;
virtual void ReflowCallbackCanceled() override;
bool ReflowFinished() override;
void ReflowCallbackCanceled() override;
bool ShouldClipSubdocument()
{

View File

@ -44,21 +44,21 @@ public:
NS_DECL_QUERYFRAME_TARGET(nsVideoFrame)
NS_DECL_FRAMEARENA_HELPERS
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
nsIAtom* aAttribute,
int32_t aModType) override;
nsresult AttributeChanged(int32_t aNameSpaceID,
nsIAtom* aAttribute,
int32_t aModType) override;
void OnVisibilityChange(Visibility aNewVisibility,
Maybe<OnNonvisible> aNonvisibleAction = Nothing()) override;
/* get the size of the video's display */
nsSize GetVideoIntrinsicSize(nsRenderingContext *aRenderingContext);
virtual nsSize GetIntrinsicRatio() override;
virtual mozilla::LogicalSize
nsSize GetIntrinsicRatio() override;
mozilla::LogicalSize
ComputeSize(nsRenderingContext *aRenderingContext,
mozilla::WritingMode aWritingMode,
const mozilla::LogicalSize& aCBSize,
@ -67,31 +67,31 @@ public:
const mozilla::LogicalSize& aBorder,
const mozilla::LogicalSize& aPadding,
ComputeSizeFlags aFlags) override;
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
virtual bool IsLeaf() const override;
nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
void DestroyFrom(nsIFrame* aDestructRoot) override;
bool IsLeaf() const override;
virtual void Reflow(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput,
nsReflowStatus& aStatus) override;
void Reflow(nsPresContext* aPresContext,
ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput,
nsReflowStatus& aStatus) override;
#ifdef ACCESSIBILITY
virtual mozilla::a11y::AccType AccessibleType() override;
mozilla::a11y::AccType AccessibleType() override;
#endif
virtual nsIAtom* GetType() const override;
nsIAtom* GetType() const override;
virtual bool IsFrameOfType(uint32_t aFlags) const override
bool IsFrameOfType(uint32_t aFlags) const override
{
return nsSplittableFrame::IsFrameOfType(aFlags &
~(nsIFrame::eReplaced | nsIFrame::eReplacedSizing));
}
virtual nsresult CreateAnonymousContent(nsTArray<ContentInfo>& aElements) override;
virtual void AppendAnonymousContentTo(nsTArray<nsIContent*>& aElements,
uint32_t aFilters) override;
nsresult CreateAnonymousContent(nsTArray<ContentInfo>& aElements) override;
void AppendAnonymousContentTo(nsTArray<nsIContent*>& aElements,
uint32_t aFilters) override;
nsIContent* GetPosterImage() { return mPosterImage; }
@ -104,7 +104,7 @@ public:
nsIContent *GetVideoControls() { return mVideoControls; }
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const override;
nsresult GetFrameName(nsAString& aResult) const override;
#endif
already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,