Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(749)

Unified Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm

Issue 1368883002: Mac: restore subpixel AA in the find bar when it doesn't have focus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: respond to comments Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/styled_text_field_cell.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fc6fe0e81304c1c1ef2e318b5d60266b1333f0ec..5068f0c4134f72fddd2779015e933982155102d9 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
@@ -15,7 +15,7 @@
#import "third_party/mozilla/NSPasteboard+Utils.h"
#import "ui/base/cocoa/appkit_utils.h"
#import "ui/base/cocoa/nsview_additions.h"
-#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
+#include "ui/base/cocoa/scoped_cg_context_smooth_fonts.h"
using extensions::FeatureSwitch;
@@ -346,16 +346,8 @@ size_t CalculatePositionsInFrame(
// |-textFrameForFrame:|.
// Superclass draws text portion WRT original |cellFrame|.
- // Even though -isOpaque is NO due to rounded corners, we know that the text
- // will be drawn on top of an opaque area, therefore it is safe to enable
- // font smoothing.
- {
- gfx::ScopedNSGraphicsContextSaveGState scopedGState;
- NSGraphicsContext* context = [NSGraphicsContext currentContext];
- CGContextRef cgContext = static_cast<CGContextRef>([context graphicsPort]);
- CGContextSetShouldSmoothFonts(cgContext, true);
- [super drawInteriorWithFrame:cellFrame inView:controlView];
- }
+ ui::ScopedCGContextSmoothFonts fontSmoothing;
+ [super drawInteriorWithFrame:cellFrame inView:controlView];
}
- (LocationBarDecoration*)decorationForEvent:(NSEvent*)theEvent
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/styled_text_field_cell.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698