зеркало из https://github.com/mozilla/gecko-dev.git
clean up unused methods and virualized methods in nsButtonFrameRenderer. Patch by Rob Arnold. b=315347 r/sr=roc
This commit is contained in:
Родитель
441c8f6bd6
Коммит
37c5a30cdd
|
@ -230,14 +230,6 @@ nsButtonFrameRenderer::PaintBorderAndBackground(nsPresContext* aPresContext,
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
nsButtonFrameRenderer::GetButtonOutlineRect(const nsRect& aRect, nsRect& outlineRect)
|
||||
{
|
||||
outlineRect = aRect;
|
||||
outlineRect.Inflate(GetButtonOutlineBorderAndPadding());
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
nsButtonFrameRenderer::GetButtonOuterFocusRect(const nsRect& aRect, nsRect& focusRect)
|
||||
{
|
||||
|
@ -260,13 +252,6 @@ nsButtonFrameRenderer::GetButtonInnerFocusRect(const nsRect& aRect, nsRect& focu
|
|||
focusRect.Deflate(GetButtonInnerFocusMargin());
|
||||
}
|
||||
|
||||
void
|
||||
nsButtonFrameRenderer::GetButtonContentRect(const nsRect& aRect, nsRect& r)
|
||||
{
|
||||
GetButtonInnerFocusRect(aRect, r);
|
||||
r.Deflate(GetButtonInnerFocusBorderAndPadding());
|
||||
}
|
||||
|
||||
|
||||
nsMargin
|
||||
nsButtonFrameRenderer::GetButtonOuterFocusBorderAndPadding()
|
||||
|
@ -346,7 +331,7 @@ nsButtonFrameRenderer::GetAddedButtonBorderAndPadding()
|
|||
/**
|
||||
* Call this when styles change
|
||||
*/
|
||||
void
|
||||
void
|
||||
nsButtonFrameRenderer::ReResolveStyles(nsPresContext* aPresContext)
|
||||
{
|
||||
// get all the styles
|
||||
|
|
|
@ -57,62 +57,60 @@ class nsStyleChangeList;
|
|||
class nsButtonFrameRenderer {
|
||||
public:
|
||||
|
||||
nsButtonFrameRenderer();
|
||||
virtual ~nsButtonFrameRenderer();
|
||||
nsButtonFrameRenderer();
|
||||
~nsButtonFrameRenderer();
|
||||
|
||||
/**
|
||||
* Create display list items for the button
|
||||
*/
|
||||
nsresult DisplayButton(nsDisplayListBuilder* aBuilder,
|
||||
nsDisplayList* aBackground, nsDisplayList* aForeground);
|
||||
/**
|
||||
* Create display list items for the button
|
||||
*/
|
||||
nsresult DisplayButton(nsDisplayListBuilder* aBuilder,
|
||||
nsDisplayList* aBackground, nsDisplayList* aForeground);
|
||||
|
||||
|
||||
void PaintOutlineAndFocusBorders(nsPresContext* aPresContext,
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsRect& aRect);
|
||||
void PaintOutlineAndFocusBorders(nsPresContext* aPresContext,
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsRect& aRect);
|
||||
|
||||
void PaintBorderAndBackground(nsPresContext* aPresContext,
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsRect& aRect);
|
||||
void PaintBorderAndBackground(nsPresContext* aPresContext,
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsRect& aRect);
|
||||
|
||||
virtual void SetFrame(nsFrame* aFrame, nsPresContext* aPresContext);
|
||||
void SetFrame(nsFrame* aFrame, nsPresContext* aPresContext);
|
||||
|
||||
virtual void SetDisabled(PRBool aDisabled, PRBool notify);
|
||||
void SetDisabled(PRBool aDisabled, PRBool notify);
|
||||
|
||||
PRBool isActive();
|
||||
PRBool isDisabled();
|
||||
PRBool isActive();
|
||||
PRBool isDisabled();
|
||||
|
||||
virtual void GetButtonOutlineRect(const nsRect& aRect, nsRect& aResult);
|
||||
virtual void GetButtonOuterFocusRect(const nsRect& aRect, nsRect& aResult);
|
||||
virtual void GetButtonRect(const nsRect& aRect, nsRect& aResult);
|
||||
virtual void GetButtonInnerFocusRect(const nsRect& aRect, nsRect& aResult);
|
||||
virtual void GetButtonContentRect(const nsRect& aRect, nsRect& aResult);
|
||||
virtual nsMargin GetButtonOuterFocusBorderAndPadding();
|
||||
virtual nsMargin GetButtonBorderAndPadding();
|
||||
virtual nsMargin GetButtonInnerFocusMargin();
|
||||
virtual nsMargin GetButtonInnerFocusBorderAndPadding();
|
||||
virtual nsMargin GetButtonOutlineBorderAndPadding();
|
||||
virtual nsMargin GetFullButtonBorderAndPadding();
|
||||
virtual nsMargin GetAddedButtonBorderAndPadding();
|
||||
void GetButtonOuterFocusRect(const nsRect& aRect, nsRect& aResult);
|
||||
void GetButtonRect(const nsRect& aRect, nsRect& aResult);
|
||||
void GetButtonInnerFocusRect(const nsRect& aRect, nsRect& aResult);
|
||||
nsMargin GetButtonOuterFocusBorderAndPadding();
|
||||
nsMargin GetButtonBorderAndPadding();
|
||||
nsMargin GetButtonInnerFocusMargin();
|
||||
nsMargin GetButtonInnerFocusBorderAndPadding();
|
||||
nsMargin GetButtonOutlineBorderAndPadding();
|
||||
nsMargin GetFullButtonBorderAndPadding();
|
||||
nsMargin GetAddedButtonBorderAndPadding();
|
||||
|
||||
virtual nsStyleContext* GetStyleContext(PRInt32 aIndex) const;
|
||||
virtual void SetStyleContext(PRInt32 aIndex, nsStyleContext* aStyleContext);
|
||||
virtual void ReResolveStyles(nsPresContext* aPresContext);
|
||||
nsStyleContext* GetStyleContext(PRInt32 aIndex) const;
|
||||
void SetStyleContext(PRInt32 aIndex, nsStyleContext* aStyleContext);
|
||||
void ReResolveStyles(nsPresContext* aPresContext);
|
||||
|
||||
virtual nsIFrame* GetFrame();
|
||||
nsIFrame* GetFrame();
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
// cached styles for focus and outline.
|
||||
// cached styles for focus and outline.
|
||||
nsRefPtr<nsStyleContext> mBorderStyle;
|
||||
nsRefPtr<nsStyleContext> mInnerFocusStyle;
|
||||
nsRefPtr<nsStyleContext> mOuterFocusStyle;
|
||||
|
||||
nsFrame* mFrame;
|
||||
nsFrame* mFrame;
|
||||
};
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче