| Index: chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm
|
| diff --git a/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm b/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm
|
| index d5ee3207d7e08cdd9b764b021bb44008630d6102..fa4d39a1e88dc7ba0b54ed9bd7b17f084465d987 100644
|
| --- a/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm
|
| +++ b/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm
|
| @@ -54,6 +54,34 @@ const CGFloat kLabelWithInputTopPadding = 5.0;
|
| @end
|
|
|
|
|
| +@interface AutofillSuggestionView : NSView {
|
| + @private
|
| + // The main input field - only view not ignoring mouse events.
|
| + NSView* inputField_;
|
| +}
|
| +
|
| +@property (assign, nonatomic) NSView* inputField;
|
| +
|
| +@end
|
| +
|
| +
|
| +// The suggestion container should ignore any mouse events unless they occur
|
| +// within the bounds of an editable field.
|
| +@implementation AutofillSuggestionView
|
| +
|
| +@synthesize inputField = inputField_;
|
| +
|
| +- (NSView*)hitTest:(NSPoint)point {
|
| + NSView* hitView = [super hitTest:point];
|
| + if ([hitView isDescendantOf:inputField_])
|
| + return hitView;
|
| +
|
| + return nil;
|
| +}
|
| +
|
| +@end
|
| +
|
| +
|
| @implementation IconAttachmentCell
|
|
|
| - (NSPoint)cellBaselineOffset {
|
| @@ -130,9 +158,11 @@ const CGFloat kLabelWithInputTopPadding = 5.0;
|
| [spacer_ setBoxType:NSBoxSeparator];
|
| [spacer_ setBorderType:NSLineBorder];
|
|
|
| - base::scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:NSZeroRect]);
|
| + base::scoped_nsobject<AutofillSuggestionView> view(
|
| + [[AutofillSuggestionView alloc] initWithFrame:NSZeroRect]);
|
| [view setSubviews:
|
| @[ label_, inputField_, spacer_ ]];
|
| + [view setInputField:inputField_];
|
| [self setView:view];
|
| }
|
|
|
|
|