Bug 54488 - "[Mac] Non-draggable widgets in background windows should look disabled" [r=josh sr=roc]

This commit is contained in:
Markus Stange 2008-09-22 10:57:42 +02:00
Родитель 82d80acbb9
Коммит 7cfc5ea32f
2 изменённых файлов: 125 добавлений и 76 удалений

Просмотреть файл

@ -95,37 +95,39 @@ protected:
nsresult GetSystemFont(PRUint8 aWidgetType, nsSystemFontID& aFont);
// HITheme drawing routines
void DrawFrame (CGContextRef context, HIThemeFrameKind inKind,
const HIRect& inBoxRect, PRBool inIsDisabled,
PRInt32 inState);
void DrawFrame(CGContextRef context, HIThemeFrameKind inKind,
const HIRect& inBoxRect, PRBool inIsDisabled,
PRInt32 inState);
void DrawProgress(CGContextRef context, const HIRect& inBoxRect,
PRBool inIsIndeterminate, PRBool inIsHorizontal,
PRInt32 inValue);
void DrawTab (CGContextRef context, const HIRect& inBoxRect,
PRBool inIsDisabled, PRBool inIsFrontmost,
PRBool inIsHorizontal, PRBool inTabBottom,
PRInt32 inState);
void DrawTabPanel (CGContextRef context, const HIRect& inBoxRect);
void DrawScale (CGContextRef context, const HIRect& inBoxRect,
PRBool inIsDisabled, PRInt32 inState,
PRBool inDirection, PRBool inIsReverse,
PRInt32 inCurrentValue,
PRInt32 inMinValue, PRInt32 inMaxValue);
PRInt32 inValue, nsIFrame* aFrame);
void DrawTab(CGContextRef context, const HIRect& inBoxRect,
PRBool inIsDisabled, PRBool inIsFrontmost,
PRBool inIsHorizontal, PRBool inTabBottom,
PRInt32 inState, nsIFrame* aFrame);
void DrawTabPanel(CGContextRef context, const HIRect& inBoxRect, nsIFrame* aFrame);
void DrawScale(CGContextRef context, const HIRect& inBoxRect,
PRBool inIsDisabled, PRInt32 inState,
PRBool inDirection, PRBool inIsReverse,
PRInt32 inCurrentValue,
PRInt32 inMinValue, PRInt32 inMaxValue,
nsIFrame* aFrame);
void DrawRadioButton(CGContextRef cgContext, const HIRect& inBoxRect, PRBool inSelected,
PRBool inDisabled, PRInt32 inState);
PRBool inDisabled, PRInt32 inState, nsIFrame* aFrame);
void DrawPushButton(CGContextRef cgContext, const HIRect& inBoxRect, PRBool inIsDefault,
PRBool inDisabled, PRInt32 inState);
void DrawButton (CGContextRef context, ThemeButtonKind inKind,
const HIRect& inBoxRect, PRBool inIsDefault,
PRBool inDisabled, ThemeButtonValue inValue,
ThemeButtonAdornment inAdornment, PRInt32 inState);
void DrawSpinButtons (CGContextRef context, ThemeButtonKind inKind,
const HIRect& inBoxRect,
PRBool inDisabled, ThemeDrawState inDrawState,
ThemeButtonAdornment inAdornment, PRInt32 inState);
PRBool inDisabled, PRInt32 inState, nsIFrame* aFrame);
void DrawButton(CGContextRef context, ThemeButtonKind inKind,
const HIRect& inBoxRect, PRBool inIsDefault,
PRBool inDisabled, ThemeButtonValue inValue,
ThemeButtonAdornment inAdornment, PRInt32 inState, nsIFrame* aFrame);
void DrawSpinButtons(CGContextRef context, ThemeButtonKind inKind,
const HIRect& inBoxRect,
PRBool inDisabled, ThemeDrawState inDrawState,
ThemeButtonAdornment inAdornment, PRInt32 inState,
nsIFrame* aFrame);
void DrawCheckbox(CGContextRef context, ThemeButtonKind inKind,
const HIRect& inBoxRect, PRBool inChecked,
PRBool inDisabled, PRInt32 inState);
PRBool inDisabled, PRInt32 inState, nsIFrame* aFrame);
void DrawUnifiedToolbar(CGContextRef cgContext, const HIRect& inBoxRect,
nsIFrame *aFrame);

Просмотреть файл

@ -117,7 +117,8 @@ static void InflateControlRect(NSRect* rect, NSControlSize cocoaControlSize, con
rect->size.height += buttonMargins[bottomMargin] + buttonMargins[topMargin];
}
static NSWindow* NativeWindowForFrame(nsIFrame* aFrame, int* aLevelsUp = NULL)
static NSWindow* NativeWindowForFrame(nsIFrame* aFrame, int* aLevelsUp = NULL,
nsIWidget** aTopLevelWidget = NULL)
{
if (!aFrame)
return nil;
@ -127,10 +128,26 @@ static NSWindow* NativeWindowForFrame(nsIFrame* aFrame, int* aLevelsUp = NULL)
return nil;
nsIWidget* topLevelWidget = widget->GetTopLevelWidget(aLevelsUp);
if (aTopLevelWidget)
*aTopLevelWidget = topLevelWidget;
return (NSWindow*)topLevelWidget->GetNativeData(NS_NATIVE_WINDOW);
}
static BOOL FrameIsInActiveWindow(nsIFrame* aFrame)
{
nsIWidget* topLevelWidget = NULL;
NSWindow* win = NativeWindowForFrame(aFrame, NULL, &topLevelWidget);
if (!topLevelWidget || !win)
return YES;
// XUL popups, e.g. the toolbar customization popup, can't become key windows,
// but controls in these windows should still get the active look.
nsWindowType windowType;
topLevelWidget->GetWindowType(windowType);
return [win isKeyWindow] || (windowType == eWindowType_popup);
}
NS_IMPL_ISUPPORTS1(nsNativeThemeCocoa, nsITheme)
@ -163,7 +180,7 @@ nsNativeThemeCocoa::~nsNativeThemeCocoa()
void
nsNativeThemeCocoa::DrawCheckbox(CGContextRef cgContext, ThemeButtonKind inKind,
const HIRect& inBoxRect, PRBool inChecked,
PRBool inDisabled, PRInt32 inState)
PRBool inDisabled, PRInt32 inState, nsIFrame* aFrame)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
@ -171,15 +188,17 @@ nsNativeThemeCocoa::DrawCheckbox(CGContextRef cgContext, ThemeButtonKind inKind,
bdi.version = 0;
bdi.kind = inKind;
BOOL isActive = FrameIsInActiveWindow(aFrame);
if (inDisabled)
bdi.state = kThemeStateUnavailable;
else if ((inState & NS_EVENT_STATE_ACTIVE) && (inState & NS_EVENT_STATE_HOVER))
bdi.state = kThemeStatePressed;
else
bdi.state = kThemeStateActive;
bdi.state = isActive ? kThemeStateActive : kThemeStateInactive;
bdi.value = inChecked ? kThemeButtonOn : kThemeButtonOff;
bdi.adornment = (inState & NS_EVENT_STATE_FOCUS) ? kThemeAdornmentFocus : kThemeAdornmentNone;
bdi.adornment = (inState & NS_EVENT_STATE_FOCUS && isActive) ? kThemeAdornmentFocus : kThemeAdornmentNone;
HIRect drawFrame = inBoxRect;
@ -348,7 +367,7 @@ nsNativeThemeCocoa::DrawCellWithScaling(NSCell *cell,
NS_OBJC_END_TRY_ABORT_BLOCK;
}
// These are the sizes that Gecko needs to request to draw if it wants
// to get a standard-sized Aqua radio button drawn. Note that the rects
// that draw these are actually a little bigger.
@ -376,13 +395,13 @@ static const float radioButtonMargins[2][3][4] =
void
nsNativeThemeCocoa::DrawRadioButton(CGContextRef cgContext, const HIRect& inBoxRect, PRBool inSelected,
PRBool inDisabled, PRInt32 inState)
PRBool inDisabled, PRInt32 inState, nsIFrame* aFrame)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
NSRect drawRect = NSMakeRect(inBoxRect.origin.x, inBoxRect.origin.y, inBoxRect.size.width, inBoxRect.size.height);
[mRadioButtonCell setEnabled:!inDisabled];
[mRadioButtonCell setEnabled:(!inDisabled && FrameIsInActiveWindow(aFrame))];
[mRadioButtonCell setShowsFirstResponder:(inState & NS_EVENT_STATE_FOCUS)];
[mRadioButtonCell setState:(inSelected ? NSOnState : NSOffState)];
[mRadioButtonCell setHighlighted:((inState & NS_EVENT_STATE_ACTIVE) && (inState & NS_EVENT_STATE_HOVER))];
@ -434,15 +453,20 @@ static const float pushButtonMargins[2][3][4] =
void
nsNativeThemeCocoa::DrawPushButton(CGContextRef cgContext, const HIRect& inBoxRect, PRBool inIsDefault,
PRBool inDisabled, PRInt32 inState)
PRBool inDisabled, PRInt32 inState, nsIFrame* aFrame)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
NSRect drawRect = NSMakeRect(inBoxRect.origin.x, inBoxRect.origin.y, inBoxRect.size.width, inBoxRect.size.height);
BOOL isActive = FrameIsInActiveWindow(aFrame);
[mPushButtonCell setEnabled:!inDisabled];
[mPushButtonCell setHighlighted:((inState & NS_EVENT_STATE_ACTIVE) && (inState & NS_EVENT_STATE_HOVER) || (inIsDefault && !inDisabled))];
[mPushButtonCell setShowsFirstResponder:(inState & NS_EVENT_STATE_FOCUS)];
[mPushButtonCell setHighlighted:(((inState & NS_EVENT_STATE_ACTIVE) &&
(inState & NS_EVENT_STATE_HOVER) ||
(inIsDefault && !inDisabled)) &&
isActive)];
[mPushButtonCell setShowsFirstResponder:(inState & NS_EVENT_STATE_FOCUS) && !inDisabled && isActive];
CGAffineTransform savedCTM = CGContextGetCTM(cgContext);
@ -506,24 +530,34 @@ void
nsNativeThemeCocoa::DrawButton(CGContextRef cgContext, ThemeButtonKind inKind,
const HIRect& inBoxRect, PRBool inIsDefault, PRBool inDisabled,
ThemeButtonValue inValue, ThemeButtonAdornment inAdornment,
PRInt32 inState)
PRInt32 inState, nsIFrame* aFrame)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
BOOL isActive = FrameIsInActiveWindow(aFrame);
HIThemeButtonDrawInfo bdi;
bdi.version = 0;
bdi.kind = inKind;
bdi.value = inValue;
bdi.adornment = inAdornment;
if (inDisabled)
if (inDisabled) {
bdi.state = kThemeStateUnavailable;
else if ((inState & NS_EVENT_STATE_ACTIVE) && (inState & NS_EVENT_STATE_HOVER))
}
else if ((inState & NS_EVENT_STATE_ACTIVE) && (inState & NS_EVENT_STATE_HOVER)) {
bdi.state = kThemeStatePressed;
else
bdi.state = (inKind == kThemeArrowButton) ? kThemeStateUnavailable : kThemeStateActive;
}
else {
if (inKind == kThemeArrowButton)
bdi.state = kThemeStateUnavailable; // these are always drawn as unavailable
else if (!isActive && (inKind == kThemeListHeaderButton || inKind == kThemePopupButton))
bdi.state = kThemeStateInactive;
else
bdi.state = kThemeStateActive;
}
if (inState & NS_EVENT_STATE_FOCUS)
if (inState & NS_EVENT_STATE_FOCUS && isActive)
bdi.adornment |= kThemeAdornmentFocus;
if (inIsDefault && !inDisabled)
@ -633,19 +667,20 @@ nsNativeThemeCocoa::DrawSpinButtons(CGContextRef cgContext, ThemeButtonKind inKi
const HIRect& inBoxRect, PRBool inDisabled,
ThemeDrawState inDrawState,
ThemeButtonAdornment inAdornment,
PRInt32 inState)
PRInt32 inState, nsIFrame* aFrame)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
HIThemeButtonDrawInfo bdi;
bdi.version = 0;
bdi.kind = inKind;
bdi.state = inDrawState;
bdi.value = kThemeButtonOff;
bdi.adornment = inAdornment;
if (inDisabled)
bdi.state = kThemeStateUnavailable;
else
bdi.state = FrameIsInActiveWindow(aFrame) ? inDrawState : kThemeStateActive;
HIThemeDrawButton(&inBoxRect, &bdi, cgContext, HITHEME_ORIENTATION, NULL);
@ -662,7 +697,11 @@ nsNativeThemeCocoa::DrawFrame(CGContextRef cgContext, HIThemeFrameKind inKind,
HIThemeFrameDrawInfo fdi;
fdi.version = 0;
fdi.kind = inKind;
// We don't ever set an inactive state for this because it doesn't
// look right (see other apps).
fdi.state = inIsDisabled ? kThemeStateUnavailable : kThemeStateActive;
// for some reason focus rings on listboxes draw incorrectly
if (inKind == kHIThemeFrameListBox)
fdi.isFocused = 0;
@ -702,9 +741,9 @@ nsNativeThemeCocoa::DrawFrame(CGContextRef cgContext, HIThemeFrameKind inKind,
void
nsNativeThemeCocoa::DrawProgress(CGContextRef cgContext,
const HIRect& inBoxRect, PRBool inIsIndeterminate,
PRBool inIsHorizontal, PRInt32 inValue)
nsNativeThemeCocoa::DrawProgress(CGContextRef cgContext, const HIRect& inBoxRect,
PRBool inIsIndeterminate, PRBool inIsHorizontal,
PRInt32 inValue, nsIFrame* aFrame)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
@ -720,7 +759,7 @@ nsNativeThemeCocoa::DrawProgress(CGContextRef cgContext,
tdi.max = 100;
tdi.value = inValue;
tdi.attributes = inIsHorizontal ? kThemeTrackHorizontal : 0;
tdi.enableState = kThemeTrackActive;
tdi.enableState = FrameIsInActiveWindow(aFrame) ? kThemeTrackActive : kThemeTrackInactive;
tdi.trackInfo.progress.phase = PR_IntervalToMilliseconds(PR_IntervalNow()) /
milliSecondsPerStep % 16;
@ -731,14 +770,15 @@ nsNativeThemeCocoa::DrawProgress(CGContextRef cgContext,
void
nsNativeThemeCocoa::DrawTabPanel(CGContextRef cgContext, const HIRect& inBoxRect)
nsNativeThemeCocoa::DrawTabPanel(CGContextRef cgContext, const HIRect& inBoxRect,
nsIFrame* aFrame)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
HIThemeTabPaneDrawInfo tpdi;
tpdi.version = 0;
tpdi.state = kThemeStateActive;
tpdi.state = FrameIsInActiveWindow(aFrame) ? kThemeStateActive : kThemeStateInactive;
tpdi.direction = kThemeTabNorth;
tpdi.size = kHIThemeTabSizeNormal;
@ -752,8 +792,8 @@ void
nsNativeThemeCocoa::DrawScale(CGContextRef cgContext, const HIRect& inBoxRect,
PRBool inIsDisabled, PRInt32 inState,
PRBool inIsVertical, PRBool inIsReverse,
PRInt32 inCurrentValue,
PRInt32 inMinValue, PRInt32 inMaxValue)
PRInt32 inCurrentValue, PRInt32 inMinValue,
PRInt32 inMaxValue, nsIFrame* aFrame)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
@ -772,7 +812,10 @@ nsNativeThemeCocoa::DrawScale(CGContextRef cgContext, const HIRect& inBoxRect,
tdi.attributes |= kThemeTrackRightToLeft;
if (inState & NS_EVENT_STATE_FOCUS)
tdi.attributes |= kThemeTrackHasFocus;
tdi.enableState = inIsDisabled ? kThemeTrackDisabled : kThemeTrackActive;
if (inIsDisabled)
tdi.enableState = kThemeTrackDisabled;
else
tdi.enableState = FrameIsInActiveWindow(aFrame) ? kThemeTrackActive : kThemeTrackInactive;
tdi.trackInfo.slider.thumbDir = kThemeThumbPlain;
tdi.trackInfo.slider.pressState = 0;
@ -786,7 +829,7 @@ void
nsNativeThemeCocoa::DrawTab(CGContextRef cgContext, const HIRect& inBoxRect,
PRBool inIsDisabled, PRBool inIsFrontmost,
PRBool inIsHorizontal, PRBool inTabBottom,
PRInt32 inState)
PRInt32 inState, nsIFrame* aFrame)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
@ -798,14 +841,14 @@ nsNativeThemeCocoa::DrawTab(CGContextRef cgContext, const HIRect& inBoxRect,
if (inIsDisabled)
tdi.style = kThemeTabFrontUnavailable;
else
tdi.style = kThemeTabFront;
tdi.style = FrameIsInActiveWindow(aFrame) ? kThemeTabFront : kThemeTabFrontInactive;
} else {
if (inIsDisabled)
tdi.style = kThemeTabNonFrontUnavailable;
else if ((inState & NS_EVENT_STATE_ACTIVE) && (inState & NS_EVENT_STATE_HOVER))
tdi.style = kThemeTabNonFrontPressed;
else
tdi.style = kThemeTabNonFront;
tdi.style = FrameIsInActiveWindow(aFrame) ? kThemeTabNonFront : kThemeTabNonFrontInactive;
}
// don't yet support vertical tabs
@ -893,6 +936,10 @@ nsNativeThemeCocoa::GetScrollbarDrawInfo(HIThemeTrackDrawInfo& aTdi, nsIFrame *a
aTdi.trackInfo.scrollbar.viewsize = (SInt32)thumbSize;
// This should be done early on so things like "kThemeTrackNothingToScroll" can
// override the active enable state.
aTdi.enableState = FrameIsInActiveWindow(aFrame) ? kThemeTrackActive : kThemeTrackInactive;
/* Only display features if we have enough room for them.
* Gecko still maintains the scrollbar info; this is just a visual issue (bug 380185).
*/
@ -1177,26 +1224,26 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsIRenderingContext* aContext, nsIFrame
break;
case NS_THEME_CHECKBOX:
DrawCheckbox(cgContext, kThemeCheckBox, macRect, IsChecked(aFrame), IsDisabled(aFrame), eventState);
DrawCheckbox(cgContext, kThemeCheckBox, macRect, IsChecked(aFrame), IsDisabled(aFrame), eventState, aFrame);
break;
case NS_THEME_CHECKBOX_SMALL:
DrawCheckbox(cgContext, kThemeSmallCheckBox, macRect, IsChecked(aFrame), IsDisabled(aFrame), eventState);
DrawCheckbox(cgContext, kThemeSmallCheckBox, macRect, IsChecked(aFrame), IsDisabled(aFrame), eventState, aFrame);
break;
case NS_THEME_RADIO:
case NS_THEME_RADIO_SMALL:
DrawRadioButton(cgContext, macRect, IsSelected(aFrame), IsDisabled(aFrame), eventState);
DrawRadioButton(cgContext, macRect, IsSelected(aFrame), IsDisabled(aFrame), eventState, aFrame);
break;
case NS_THEME_BUTTON:
DrawPushButton(cgContext, macRect, IsDefaultButton(aFrame), IsDisabled(aFrame), eventState);
DrawPushButton(cgContext, macRect, IsDefaultButton(aFrame), IsDisabled(aFrame), eventState, aFrame);
break;
case NS_THEME_BUTTON_BEVEL:
DrawButton(cgContext, kThemeMediumBevelButton, macRect,
IsDefaultButton(aFrame), IsDisabled(aFrame),
kThemeButtonOff, kThemeAdornmentNone, eventState);
kThemeButtonOff, kThemeAdornmentNone, eventState, aFrame);
break;
case NS_THEME_SPINNER: {
@ -1212,14 +1259,14 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsIRenderingContext* aContext, nsIFrame
}
DrawSpinButtons(cgContext, kThemeIncDecButton, macRect, IsDisabled(aFrame),
state, kThemeAdornmentNone, eventState);
state, kThemeAdornmentNone, eventState, aFrame);
}
break;
case NS_THEME_TOOLBAR_BUTTON:
DrawButton(cgContext, kThemePushButton, macRect,
IsDefaultButton(aFrame), IsDisabled(aFrame),
kThemeButtonOn, kThemeAdornmentNone, eventState);
kThemeButtonOn, kThemeAdornmentNone, eventState, aFrame);
break;
case NS_THEME_TOOLBAR_SEPARATOR: {
@ -1243,13 +1290,13 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsIRenderingContext* aContext, nsIFrame
case NS_THEME_DROPDOWN:
DrawButton(cgContext, kThemePopupButton, macRect,
IsDefaultButton(aFrame), IsDisabled(aFrame),
kThemeButtonOn, kThemeAdornmentNone, eventState);
kThemeButtonOn, kThemeAdornmentNone, eventState, aFrame);
break;
case NS_THEME_DROPDOWN_BUTTON:
DrawButton (cgContext, kThemeArrowButton, macRect, PR_FALSE,
IsDisabled(aFrame), kThemeButtonOn,
kThemeAdornmentArrowDownArrow, eventState);
DrawButton(cgContext, kThemeArrowButton, macRect, PR_FALSE,
IsDisabled(aFrame), kThemeButtonOn,
kThemeAdornmentArrowDownArrow, eventState, aFrame);
break;
case NS_THEME_GROUPBOX: {
@ -1277,12 +1324,12 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsIRenderingContext* aContext, nsIFrame
case NS_THEME_PROGRESSBAR:
DrawProgress(cgContext, macRect, IsIndeterminateProgress(aFrame),
PR_TRUE, GetProgressValue(aFrame));
PR_TRUE, GetProgressValue(aFrame), aFrame);
break;
case NS_THEME_PROGRESSBAR_VERTICAL:
DrawProgress(cgContext, macRect, IsIndeterminateProgress(aFrame),
PR_FALSE, GetProgressValue(aFrame));
PR_FALSE, GetProgressValue(aFrame), aFrame);
break;
case NS_THEME_PROGRESSBAR_CHUNK:
@ -1292,12 +1339,12 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsIRenderingContext* aContext, nsIFrame
case NS_THEME_TREEVIEW_TWISTY:
DrawButton(cgContext, kThemeDisclosureButton, macRect, PR_FALSE, IsDisabled(aFrame),
kThemeDisclosureRight, kThemeAdornmentNone, eventState);
kThemeDisclosureRight, kThemeAdornmentNone, eventState, aFrame);
break;
case NS_THEME_TREEVIEW_TWISTY_OPEN:
DrawButton(cgContext, kThemeDisclosureButton, macRect, PR_FALSE, IsDisabled(aFrame),
kThemeDisclosureDown, kThemeAdornmentNone, eventState);
kThemeDisclosureDown, kThemeAdornmentNone, eventState, aFrame);
break;
case NS_THEME_TREEVIEW_HEADER_CELL: {
@ -1305,7 +1352,7 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsIRenderingContext* aContext, nsIFrame
DrawButton(cgContext, kThemeListHeaderButton, macRect, PR_FALSE, IsDisabled(aFrame),
sortDirection == eTreeSortDirection_Natural ? kThemeButtonOff : kThemeButtonOn,
sortDirection == eTreeSortDirection_Descending ?
kThemeAdornmentHeaderButtonSortUp : kThemeAdornmentNone, eventState);
kThemeAdornmentHeaderButtonSortUp : kThemeAdornmentNone, eventState, aFrame);
}
break;
@ -1338,7 +1385,7 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsIRenderingContext* aContext, nsIFrame
NS_LITERAL_STRING("reverse"), eCaseMatters);
DrawScale(cgContext, macRect, IsDisabled(aFrame), eventState,
(aWidgetType == NS_THEME_SCALE_VERTICAL), reverse,
curpos, minpos, maxpos);
curpos, minpos, maxpos, aFrame);
}
break;
@ -1419,20 +1466,20 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsIRenderingContext* aContext, nsIFrame
// HIThemeSetFill is not available on 10.3
CGContextSetRGBFillColor(cgContext, 1.0, 1.0, 1.0, 1.0);
CGContextFillRect(cgContext, macRect);
DrawFrame(cgContext, kHIThemeFrameListBox,
macRect, (IsDisabled(aFrame) || IsReadOnly(aFrame)), eventState);
DrawFrame(cgContext, kHIThemeFrameListBox, macRect,
(IsDisabled(aFrame) || IsReadOnly(aFrame)), eventState);
break;
case NS_THEME_TAB: {
DrawTab(cgContext, macRect,
IsDisabled(aFrame), IsSelectedTab(aFrame),
PR_TRUE, IsBottomTab(aFrame),
eventState);
eventState, aFrame);
}
break;
case NS_THEME_TAB_PANELS:
DrawTabPanel(cgContext, macRect);
DrawTabPanel(cgContext, macRect, aFrame);
break;
}