From 242e2346fadf2d37fe208b6ffc0cabc04efeabb6 Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Mon, 4 Feb 2013 08:17:20 -0800 Subject: [PATCH] Bug 836957 part 2: Remove unnecessary nsIFrame::GetSkipSides() overrides whose implementations are in .cpp files. r=mats --- layout/forms/nsFieldSetFrame.cpp | 16 ++++------------ layout/forms/nsFileControlFrame.cpp | 6 ------ layout/forms/nsFileControlFrame.h | 2 -- layout/forms/nsHTMLButtonControlFrame.cpp | 6 ------ layout/forms/nsHTMLButtonControlFrame.h | 1 - layout/forms/nsListControlFrame.cpp | 7 ------- layout/forms/nsListControlFrame.h | 3 --- layout/generic/nsCanvasFrame.cpp | 6 ------ layout/generic/nsCanvasFrame.h | 2 -- layout/generic/nsColumnSetFrame.cpp | 8 -------- layout/generic/nsFirstLetterFrame.cpp | 6 ------ layout/generic/nsFirstLetterFrame.h | 2 -- layout/generic/nsFrameSetFrame.cpp | 7 ------- layout/generic/nsFrameSetFrame.h | 2 -- layout/generic/nsGfxScrollFrame.cpp | 12 ------------ layout/generic/nsGfxScrollFrame.h | 3 --- layout/generic/nsSubDocumentFrame.cpp | 6 ------ layout/generic/nsSubDocumentFrame.h | 2 -- 18 files changed, 4 insertions(+), 93 deletions(-) diff --git a/layout/forms/nsFieldSetFrame.cpp b/layout/forms/nsFieldSetFrame.cpp index aa93ce9a0e1..36f4a3c0f81 100644 --- a/layout/forms/nsFieldSetFrame.cpp +++ b/layout/forms/nsFieldSetFrame.cpp @@ -89,7 +89,6 @@ public: protected: - virtual int GetSkipSides() const; void ReparentFrameList(const nsFrameList& aFrameList); // mLegendFrame is a nsLegendFrame or a nsHTMLScrollFrame with the @@ -236,7 +235,6 @@ void nsFieldSetFrame::PaintBorderBackground(nsRenderingContext& aRenderingContext, nsPoint aPt, const nsRect& aDirtyRect, uint32_t aBGFlags) { - int skipSides = GetSkipSides(); const nsStyleBorder* borderStyle = GetStyleBorder(); nscoord topBorder = borderStyle->GetComputedBorderWidth(NS_SIDE_TOP); @@ -275,7 +273,7 @@ nsFieldSetFrame::PaintBorderBackground(nsRenderingContext& aRenderingContext, aRenderingContext.PushState(); aRenderingContext.IntersectClip(clipRect); nsCSSRendering::PaintBorder(presContext, aRenderingContext, this, - aDirtyRect, rect, mStyleContext, skipSides); + aDirtyRect, rect, mStyleContext); aRenderingContext.PopState(); @@ -289,7 +287,7 @@ nsFieldSetFrame::PaintBorderBackground(nsRenderingContext& aRenderingContext, aRenderingContext.PushState(); aRenderingContext.IntersectClip(clipRect); nsCSSRendering::PaintBorder(presContext, aRenderingContext, this, - aDirtyRect, rect, mStyleContext, skipSides); + aDirtyRect, rect, mStyleContext); aRenderingContext.PopState(); @@ -302,7 +300,7 @@ nsFieldSetFrame::PaintBorderBackground(nsRenderingContext& aRenderingContext, aRenderingContext.PushState(); aRenderingContext.IntersectClip(clipRect); nsCSSRendering::PaintBorder(presContext, aRenderingContext, this, - aDirtyRect, rect, mStyleContext, skipSides); + aDirtyRect, rect, mStyleContext); aRenderingContext.PopState(); } else { @@ -310,7 +308,7 @@ nsFieldSetFrame::PaintBorderBackground(nsRenderingContext& aRenderingContext, nsCSSRendering::PaintBorder(presContext, aRenderingContext, this, aDirtyRect, nsRect(aPt, mRect.Size()), - mStyleContext, skipSides); + mStyleContext); } } @@ -581,12 +579,6 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext, return NS_OK; } -int -nsFieldSetFrame::GetSkipSides() const -{ - return 0; -} - NS_IMETHODIMP nsFieldSetFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) diff --git a/layout/forms/nsFileControlFrame.cpp b/layout/forms/nsFileControlFrame.cpp index 9463084111e..903e6a7254a 100644 --- a/layout/forms/nsFileControlFrame.cpp +++ b/layout/forms/nsFileControlFrame.cpp @@ -472,12 +472,6 @@ nsFileControlFrame::GetTextControlFrame() return static_cast(tc); } -int -nsFileControlFrame::GetSkipSides() const -{ - return 0; -} - void nsFileControlFrame::SyncAttr(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aWhichControls) diff --git a/layout/forms/nsFileControlFrame.h b/layout/forms/nsFileControlFrame.h index baf88b444d6..8ba66318fcf 100644 --- a/layout/forms/nsFileControlFrame.h +++ b/layout/forms/nsFileControlFrame.h @@ -144,8 +144,6 @@ protected: ~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock)); } - virtual int GetSkipSides() const MOZ_OVERRIDE; - /** * The text box input. * @see nsFileControlFrame::CreateAnonymousContent diff --git a/layout/forms/nsHTMLButtonControlFrame.cpp b/layout/forms/nsHTMLButtonControlFrame.cpp index 20435e35c09..7e79d68cbe4 100644 --- a/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/layout/forms/nsHTMLButtonControlFrame.cpp @@ -322,12 +322,6 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext, aDesiredSize.ascent += yoff; } -int -nsHTMLButtonControlFrame::GetSkipSides() const -{ - return 0; -} - nsresult nsHTMLButtonControlFrame::SetFormProperty(nsIAtom* aName, const nsAString& aValue) { if (nsGkAtoms::value == aName) { diff --git a/layout/forms/nsHTMLButtonControlFrame.h b/layout/forms/nsHTMLButtonControlFrame.h index 1d541aeaba5..847d74742e1 100644 --- a/layout/forms/nsHTMLButtonControlFrame.h +++ b/layout/forms/nsHTMLButtonControlFrame.h @@ -109,7 +109,6 @@ protected: nsMargin aFocusPadding, nsReflowStatus& aStatus); - int GetSkipSides() const; nsButtonFrameRenderer mRenderer; }; diff --git a/layout/forms/nsListControlFrame.cpp b/layout/forms/nsListControlFrame.cpp index 35b83c581a5..aa2eaa1543d 100644 --- a/layout/forms/nsListControlFrame.cpp +++ b/layout/forms/nsListControlFrame.cpp @@ -1117,13 +1117,6 @@ nsListControlFrame::OnOptionSelected(int32_t aIndex, bool aSelected) return NS_OK; } -int -nsListControlFrame::GetSkipSides() const -{ - // Don't skip any sides during border rendering - return 0; -} - void nsListControlFrame::OnContentReset() { diff --git a/layout/forms/nsListControlFrame.h b/layout/forms/nsListControlFrame.h index 717beb4cd5d..a847a03bf4f 100644 --- a/layout/forms/nsListControlFrame.h +++ b/layout/forms/nsListControlFrame.h @@ -109,9 +109,6 @@ public: virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE; #endif - // nsContainerFrame - virtual int GetSkipSides() const MOZ_OVERRIDE; - // nsIListControlFrame virtual void SetComboboxFrame(nsIFrame* aComboboxFrame); virtual int32_t GetSelectedIndex() MOZ_OVERRIDE; diff --git a/layout/generic/nsCanvasFrame.cpp b/layout/generic/nsCanvasFrame.cpp index 135bc0eeab9..eb6e5967bf2 100644 --- a/layout/generic/nsCanvasFrame.cpp +++ b/layout/generic/nsCanvasFrame.cpp @@ -560,12 +560,6 @@ nsCanvasFrame::Reflow(nsPresContext* aPresContext, return NS_OK; } -int -nsCanvasFrame::GetSkipSides() const -{ - return 0; -} - nsIAtom* nsCanvasFrame::GetType() const { diff --git a/layout/generic/nsCanvasFrame.h b/layout/generic/nsCanvasFrame.h index f5b81dadf01..e12f5fe3542 100644 --- a/layout/generic/nsCanvasFrame.h +++ b/layout/generic/nsCanvasFrame.h @@ -109,8 +109,6 @@ public: nsRect CanvasArea() const; protected: - virtual int GetSkipSides() const; - // Data members bool mDoPaintFocus; bool mAddedScrollPositionListener; diff --git a/layout/generic/nsColumnSetFrame.cpp b/layout/generic/nsColumnSetFrame.cpp index 4c1e763ad77..04698a21880 100644 --- a/layout/generic/nsColumnSetFrame.cpp +++ b/layout/generic/nsColumnSetFrame.cpp @@ -84,8 +84,6 @@ protected: nscoord mLastBalanceHeight; nsReflowStatus mLastFrameStatus; - virtual int GetSkipSides() const; - /** * These are the parameters that control the layout of columns. */ @@ -1105,12 +1103,6 @@ nsColumnSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, return NS_OK; } -int -nsColumnSetFrame::GetSkipSides() const -{ - return 0; -} - NS_IMETHODIMP nsColumnSetFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) diff --git a/layout/generic/nsFirstLetterFrame.cpp b/layout/generic/nsFirstLetterFrame.cpp index c4f76ccac79..35ecbc5021a 100644 --- a/layout/generic/nsFirstLetterFrame.cpp +++ b/layout/generic/nsFirstLetterFrame.cpp @@ -46,12 +46,6 @@ nsFirstLetterFrame::GetType() const return nsGkAtoms::letterFrame; } -int -nsFirstLetterFrame::GetSkipSides() const -{ - return 0; -} - NS_IMETHODIMP nsFirstLetterFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, const nsRect& aDirtyRect, diff --git a/layout/generic/nsFirstLetterFrame.h b/layout/generic/nsFirstLetterFrame.h index 3d3601c8499..df7170803dc 100644 --- a/layout/generic/nsFirstLetterFrame.h +++ b/layout/generic/nsFirstLetterFrame.h @@ -81,8 +81,6 @@ public: protected: nscoord mBaseline; - virtual int GetSkipSides() const; - void DrainOverflowFrames(nsPresContext* aPresContext); }; diff --git a/layout/generic/nsFrameSetFrame.cpp b/layout/generic/nsFrameSetFrame.cpp index 7ea3d8e737b..d5ec07e928f 100644 --- a/layout/generic/nsFrameSetFrame.cpp +++ b/layout/generic/nsFrameSetFrame.cpp @@ -656,13 +656,6 @@ int32_t nsHTMLFramesetFrame::GetBorderWidth(nsPresContext* aPresContext, return nsPresContext::CSSPixelsToAppUnits(DEFAULT_BORDER_WIDTH_PX); } - -int -nsHTMLFramesetFrame::GetSkipSides() const -{ - return 0; -} - void nsHTMLFramesetFrame::GetDesiredSize(nsPresContext* aPresContext, const nsHTMLReflowState& aReflowState, diff --git a/layout/generic/nsFrameSetFrame.h b/layout/generic/nsFrameSetFrame.h index cdc2b28461a..a7febd981c4 100644 --- a/layout/generic/nsFrameSetFrame.h +++ b/layout/generic/nsFrameSetFrame.h @@ -178,8 +178,6 @@ protected: bool GetNoResize(nsIFrame* aChildFrame); - virtual int GetSkipSides() const; - void ReflowPlaceChild(nsIFrame* aChild, nsPresContext* aPresContext, const nsHTMLReflowState& aReflowState, diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 1a441396ce5..a0200725724 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -146,12 +146,6 @@ nsHTMLScrollFrame::GetSplittableType() const return NS_FRAME_NOT_SPLITTABLE; } -int -nsHTMLScrollFrame::GetSkipSides() const -{ - return 0; -} - nsIAtom* nsHTMLScrollFrame::GetType() const { @@ -990,12 +984,6 @@ nsXULScrollFrame::GetPadding(nsMargin& aMargin) return NS_OK; } -int -nsXULScrollFrame::GetSkipSides() const -{ - return 0; -} - nsIAtom* nsXULScrollFrame::GetType() const { diff --git a/layout/generic/nsGfxScrollFrame.h b/layout/generic/nsGfxScrollFrame.h index 492e25a96c0..757a50a40a4 100644 --- a/layout/generic/nsGfxScrollFrame.h +++ b/layout/generic/nsGfxScrollFrame.h @@ -562,8 +562,6 @@ public: protected: nsHTMLScrollFrame(nsIPresShell* aShell, nsStyleContext* aContext, bool aIsRoot); - virtual int GetSkipSides() const; - void SetSuppressScrollbarUpdate(bool aSuppress) { mInner.mSupppressScrollbarUpdate = aSuppress; } @@ -817,7 +815,6 @@ public: protected: nsXULScrollFrame(nsIPresShell* aShell, nsStyleContext* aContext, bool aIsRoot); - virtual int GetSkipSides() const; void ClampAndSetBounds(nsBoxLayoutState& aState, nsRect& aRect, diff --git a/layout/generic/nsSubDocumentFrame.cpp b/layout/generic/nsSubDocumentFrame.cpp index 1df872d4a4e..6ac502d59e3 100644 --- a/layout/generic/nsSubDocumentFrame.cpp +++ b/layout/generic/nsSubDocumentFrame.cpp @@ -221,12 +221,6 @@ nsSubDocumentFrame::ShowViewer() } } -int -nsSubDocumentFrame::GetSkipSides() const -{ - return 0; -} - nsIFrame* nsSubDocumentFrame::GetSubdocumentRootFrame() { diff --git a/layout/generic/nsSubDocumentFrame.h b/layout/generic/nsSubDocumentFrame.h index d99edfa261a..f0125605665 100644 --- a/layout/generic/nsSubDocumentFrame.h +++ b/layout/generic/nsSubDocumentFrame.h @@ -120,8 +120,6 @@ protected: virtual nscoord GetIntrinsicWidth() MOZ_OVERRIDE; virtual nscoord GetIntrinsicHeight() MOZ_OVERRIDE; - virtual int GetSkipSides() const; - // Show our document viewer. The document viewer is hidden via a script // runner, so that we can save and restore the presentation if we're // being reframed.