зеркало из 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
|
void
|
||||||
nsButtonFrameRenderer::GetButtonOuterFocusRect(const nsRect& aRect, nsRect& focusRect)
|
nsButtonFrameRenderer::GetButtonOuterFocusRect(const nsRect& aRect, nsRect& focusRect)
|
||||||
{
|
{
|
||||||
|
@ -260,13 +252,6 @@ nsButtonFrameRenderer::GetButtonInnerFocusRect(const nsRect& aRect, nsRect& focu
|
||||||
focusRect.Deflate(GetButtonInnerFocusMargin());
|
focusRect.Deflate(GetButtonInnerFocusMargin());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
nsButtonFrameRenderer::GetButtonContentRect(const nsRect& aRect, nsRect& r)
|
|
||||||
{
|
|
||||||
GetButtonInnerFocusRect(aRect, r);
|
|
||||||
r.Deflate(GetButtonInnerFocusBorderAndPadding());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
nsMargin
|
nsMargin
|
||||||
nsButtonFrameRenderer::GetButtonOuterFocusBorderAndPadding()
|
nsButtonFrameRenderer::GetButtonOuterFocusBorderAndPadding()
|
||||||
|
@ -346,7 +331,7 @@ nsButtonFrameRenderer::GetAddedButtonBorderAndPadding()
|
||||||
/**
|
/**
|
||||||
* Call this when styles change
|
* Call this when styles change
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
nsButtonFrameRenderer::ReResolveStyles(nsPresContext* aPresContext)
|
nsButtonFrameRenderer::ReResolveStyles(nsPresContext* aPresContext)
|
||||||
{
|
{
|
||||||
// get all the styles
|
// get all the styles
|
||||||
|
|
|
@ -57,62 +57,60 @@ class nsStyleChangeList;
|
||||||
class nsButtonFrameRenderer {
|
class nsButtonFrameRenderer {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
nsButtonFrameRenderer();
|
nsButtonFrameRenderer();
|
||||||
virtual ~nsButtonFrameRenderer();
|
~nsButtonFrameRenderer();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create display list items for the button
|
* Create display list items for the button
|
||||||
*/
|
*/
|
||||||
nsresult DisplayButton(nsDisplayListBuilder* aBuilder,
|
nsresult DisplayButton(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayList* aBackground, nsDisplayList* aForeground);
|
nsDisplayList* aBackground, nsDisplayList* aForeground);
|
||||||
|
|
||||||
|
|
||||||
void PaintOutlineAndFocusBorders(nsPresContext* aPresContext,
|
void PaintOutlineAndFocusBorders(nsPresContext* aPresContext,
|
||||||
nsIRenderingContext& aRenderingContext,
|
nsIRenderingContext& aRenderingContext,
|
||||||
const nsRect& aDirtyRect,
|
const nsRect& aDirtyRect,
|
||||||
const nsRect& aRect);
|
const nsRect& aRect);
|
||||||
|
|
||||||
void PaintBorderAndBackground(nsPresContext* aPresContext,
|
void PaintBorderAndBackground(nsPresContext* aPresContext,
|
||||||
nsIRenderingContext& aRenderingContext,
|
nsIRenderingContext& aRenderingContext,
|
||||||
const nsRect& aDirtyRect,
|
const nsRect& aDirtyRect,
|
||||||
const nsRect& aRect);
|
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 isActive();
|
||||||
PRBool isDisabled();
|
PRBool isDisabled();
|
||||||
|
|
||||||
virtual void GetButtonOutlineRect(const nsRect& aRect, nsRect& aResult);
|
void GetButtonOuterFocusRect(const nsRect& aRect, nsRect& aResult);
|
||||||
virtual void GetButtonOuterFocusRect(const nsRect& aRect, nsRect& aResult);
|
void GetButtonRect(const nsRect& aRect, nsRect& aResult);
|
||||||
virtual void GetButtonRect(const nsRect& aRect, nsRect& aResult);
|
void GetButtonInnerFocusRect(const nsRect& aRect, nsRect& aResult);
|
||||||
virtual void GetButtonInnerFocusRect(const nsRect& aRect, nsRect& aResult);
|
nsMargin GetButtonOuterFocusBorderAndPadding();
|
||||||
virtual void GetButtonContentRect(const nsRect& aRect, nsRect& aResult);
|
nsMargin GetButtonBorderAndPadding();
|
||||||
virtual nsMargin GetButtonOuterFocusBorderAndPadding();
|
nsMargin GetButtonInnerFocusMargin();
|
||||||
virtual nsMargin GetButtonBorderAndPadding();
|
nsMargin GetButtonInnerFocusBorderAndPadding();
|
||||||
virtual nsMargin GetButtonInnerFocusMargin();
|
nsMargin GetButtonOutlineBorderAndPadding();
|
||||||
virtual nsMargin GetButtonInnerFocusBorderAndPadding();
|
nsMargin GetFullButtonBorderAndPadding();
|
||||||
virtual nsMargin GetButtonOutlineBorderAndPadding();
|
nsMargin GetAddedButtonBorderAndPadding();
|
||||||
virtual nsMargin GetFullButtonBorderAndPadding();
|
|
||||||
virtual nsMargin GetAddedButtonBorderAndPadding();
|
|
||||||
|
|
||||||
virtual nsStyleContext* GetStyleContext(PRInt32 aIndex) const;
|
nsStyleContext* GetStyleContext(PRInt32 aIndex) const;
|
||||||
virtual void SetStyleContext(PRInt32 aIndex, nsStyleContext* aStyleContext);
|
void SetStyleContext(PRInt32 aIndex, nsStyleContext* aStyleContext);
|
||||||
virtual void ReResolveStyles(nsPresContext* aPresContext);
|
void ReResolveStyles(nsPresContext* aPresContext);
|
||||||
|
|
||||||
virtual nsIFrame* GetFrame();
|
nsIFrame* GetFrame();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// cached styles for focus and outline.
|
// cached styles for focus and outline.
|
||||||
nsRefPtr<nsStyleContext> mBorderStyle;
|
nsRefPtr<nsStyleContext> mBorderStyle;
|
||||||
nsRefPtr<nsStyleContext> mInnerFocusStyle;
|
nsRefPtr<nsStyleContext> mInnerFocusStyle;
|
||||||
nsRefPtr<nsStyleContext> mOuterFocusStyle;
|
nsRefPtr<nsStyleContext> mOuterFocusStyle;
|
||||||
|
|
||||||
nsFrame* mFrame;
|
nsFrame* mFrame;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче