Bug 871264 - Remove the aPresContext and aFrame parameters from ThemeDrawsFocusForWidget. r=dholbert, sr=roc

This commit is contained in:
Jonathan Watt 2013-05-14 00:47:03 +01:00
parent 8f5ac9f5d6
commit 4f3640a8c0
11 changed files with 11 additions and 15 deletions

View File

@ -153,9 +153,7 @@ public:
/**
* Does the nsITheme implementation draw its own focus ring for this widget?
*/
virtual bool ThemeDrawsFocusForWidget(nsPresContext* aPresContext,
nsIFrame* aFrame,
uint8_t aWidgetType)=0;
virtual bool ThemeDrawsFocusForWidget(uint8_t aWidgetType)=0;
/**
* Should we insert a dropmarker inside of combobox button?

View File

@ -168,7 +168,7 @@ void nsDisplayButtonForeground::Paint(nsDisplayListBuilder* aBuilder,
nsPresContext *presContext = mFrame->PresContext();
const nsStyleDisplay *disp = mFrame->StyleDisplay();
if (!mFrame->IsThemed(disp) ||
!presContext->GetTheme()->ThemeDrawsFocusForWidget(presContext, mFrame, disp->mAppearance)) {
!presContext->GetTheme()->ThemeDrawsFocusForWidget(disp->mAppearance)) {
// draw the focus and outline borders
nsRect r = nsRect(ToReferenceFrame(), mFrame->GetSize());
mBFR->PaintOutlineAndFocusBorders(presContext, *aCtx, mVisibleRect, r);

View File

@ -1536,7 +1536,7 @@ nsComboboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsPresContext *presContext = PresContext();
const nsStyleDisplay *disp = StyleDisplay();
if ((!IsThemed(disp) ||
!presContext->GetTheme()->ThemeDrawsFocusForWidget(presContext, this, disp->mAppearance)) &&
!presContext->GetTheme()->ThemeDrawsFocusForWidget(disp->mAppearance)) &&
mDisplayFrame && IsVisibleForPainting(aBuilder)) {
aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplayComboboxFocus(aBuilder, this));

View File

@ -57,7 +57,7 @@ public:
NS_IMETHOD ThemeChanged();
bool ThemeSupportsWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType);
bool WidgetIsContainer(uint8_t aWidgetType);
bool ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType);
bool ThemeDrawsFocusForWidget(uint8_t aWidgetType) MOZ_OVERRIDE;
bool ThemeNeedsComboboxDropmarker();
virtual Transparency GetWidgetTransparency(nsIFrame* aFrame, uint8_t aWidgetType);

View File

@ -3068,7 +3068,7 @@ nsNativeThemeCocoa::WidgetIsContainer(uint8_t aWidgetType)
}
bool
nsNativeThemeCocoa::ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType)
nsNativeThemeCocoa::ThemeDrawsFocusForWidget(uint8_t aWidgetType)
{
if (aWidgetType == NS_THEME_DROPDOWN ||
aWidgetType == NS_THEME_DROPDOWN_TEXTFIELD ||

View File

@ -1450,7 +1450,7 @@ nsNativeThemeGTK::WidgetIsContainer(uint8_t aWidgetType)
}
bool
nsNativeThemeGTK::ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType)
nsNativeThemeGTK::ThemeDrawsFocusForWidget(uint8_t aWidgetType)
{
if (aWidgetType == NS_THEME_DROPDOWN ||
aWidgetType == NS_THEME_BUTTON ||

View File

@ -54,8 +54,7 @@ public:
NS_IMETHOD_(bool) WidgetIsContainer(uint8_t aWidgetType);
NS_IMETHOD_(bool) ThemeDrawsFocusForWidget(nsPresContext* aPresContext,
nsIFrame* aFrame, uint8_t aWidgetType);
NS_IMETHOD_(bool) ThemeDrawsFocusForWidget(uint8_t aWidgetType) MOZ_OVERRIDE;
bool ThemeNeedsComboboxDropmarker();

View File

@ -575,7 +575,7 @@ nsNativeThemeQt::WidgetIsContainer(uint8_t aWidgetType)
}
bool
nsNativeThemeQt::ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType)
nsNativeThemeQt::ThemeDrawsFocusForWidget(uint8_t aWidgetType)
{
if (aWidgetType == NS_THEME_DROPDOWN ||
aWidgetType == NS_THEME_BUTTON ||

View File

@ -58,8 +58,7 @@ public:
uint8_t aWidgetType,
nsIntMargin* aResult);
NS_IMETHOD_(bool) ThemeDrawsFocusForWidget(nsPresContext* aPresContext,
nsIFrame* aFrame, uint8_t aWidgetType);
NS_IMETHOD_(bool) ThemeDrawsFocusForWidget(uint8_t aWidgetType) MOZ_OVERRIDE;
bool ThemeNeedsComboboxDropmarker();

View File

@ -2582,7 +2582,7 @@ nsNativeThemeWin::WidgetIsContainer(uint8_t aWidgetType)
}
bool
nsNativeThemeWin::ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType)
nsNativeThemeWin::ThemeDrawsFocusForWidget(uint8_t aWidgetType)
{
return false;
}

View File

@ -63,7 +63,7 @@ public:
bool WidgetIsContainer(uint8_t aWidgetType);
bool ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType);
bool ThemeDrawsFocusForWidget(uint8_t aWidgetType) MOZ_OVERRIDE;
bool ThemeNeedsComboboxDropmarker();