Bug 416113 - cocoa widget does not draw focus rings for xul textboxes. r=josh, sr=roc, a=damons.

git-svn-id: svn://10.0.0.236/trunk@245172 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mozilla.mano%sent.com
2008-02-07 21:54:24 +00:00
parent 5bc753036b
commit cefb9670e3

View File

@@ -1056,6 +1056,15 @@ 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);
// XUL textboxes set the native appearance on the containing box, while
// concrete focus is set on the html:input element within it. We can
// though, check the focused attribute of xul textboxes in this case.
if (aFrame->GetContent()->IsNodeOfType(nsINode::eXUL) &&
IsFocused(aFrame)) {
eventState |= NS_EVENT_STATE_FOCUS;
}
DrawFrame(cgContext, kHIThemeFrameTextFieldSquare,
macRect, (IsDisabled(aFrame) || IsReadOnly(aFrame)), eventState);
break;