Chromium Code Reviews| Index: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm |
| diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm |
| index 2bc741b3aae4ee02b7c3d3064189d7b71cd9dbb5..b9fb37381f6f4b8b427c7e0086b2d180edae3fce 100644 |
| --- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm |
| +++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm |
| @@ -317,10 +317,6 @@ size_t CalculatePositionsInFrame( |
| // Compute the border's bezier path. |
| NSRect pathRect = NSInsetRect(frame, insetSize, insetSize); |
| - // In dark mode, make room for a shadow beneath the bottom edge. |
| - if (inDarkMode && isModeMaterial) { |
| - pathRect.size.height -= singlePixelLineWidth_; |
| - } |
| NSBezierPath* path = |
| [NSBezierPath bezierPathWithRoundedRect:pathRect |
| xRadius:kCornerRadius |
| @@ -369,7 +365,7 @@ size_t CalculatePositionsInFrame( |
| } |
| // Draw a highlight beneath the top edge, and a shadow beneath the bottom |
| - // edge. |
| + // edge when on a Retina screen. |
| { |
| gfx::ScopedNSGraphicsContextSaveGState saveState; |
| [NSBezierPath setDefaultLineWidth:singlePixelLineWidth_]; |
| @@ -383,10 +379,12 @@ size_t CalculatePositionsInFrame( |
| [NSBezierPath strokeLineFromPoint:origin |
| toPoint:destination]; |
| - origin.y = destination.y = NSMaxY(pathRect) + singlePixelLineWidth_; |
| - [[NSColor colorWithCalibratedWhite:69 / 255. alpha:1] set]; |
| - [NSBezierPath strokeLineFromPoint:origin |
| - toPoint:destination]; |
| + if (singlePixelLineWidth_ < 1) { |
| + origin.y = destination.y = NSMaxY(pathRect) + singlePixelLineWidth_; |
| + [[NSColor colorWithCalibratedWhite:69 / 255. alpha:1] set]; |
|
tapted
2016/04/22 01:11:46
This `69` needs to be a constant accessible from a
shrike
2016/04/22 02:09:00
You mention OmniboxViewMac - you aren't saying I n
tapted
2016/04/22 04:41:34
OmniboxViewMac is the C++ wrapper around the Autoc
shrike
2016/04/26 19:19:30
Done.
|
| + [NSBezierPath strokeLineFromPoint:origin |
| + toPoint:destination]; |
| + } |
| } |
| } |
| } else { |