зеркало из https://github.com/mozilla/gecko-dev.git
Bug 416113 - cocoa widget does not draw focus rings for xul textboxes. r=josh, sr=roc, a=damons.
This commit is contained in:
Родитель
088022c3b2
Коммит
47f6fa3680
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче