mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Bug 871264 - Remove the aPresContext and aFrame parameters from ThemeDrawsFocusForWidget. r=dholbert, sr=roc
This commit is contained in:
parent
553ca8a7af
commit
2d3609092f
@ -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?
|
||||
|
@ -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);
|
||||
|
@ -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));
|
||||
|
@ -244,8 +244,7 @@ nsRangeFrame::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)) &&
|
||||
IsVisibleForPainting(aBuilder)) {
|
||||
aLists.Content()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayRangeFocusRing(aBuilder, this));
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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 ||
|
||||
|
@ -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 ||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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 ||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user