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

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: DISALLOW_COPY.etc 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
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..8de2c8e1888fcbef59c78ca72ebb1b5ba33cfb58 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 lcd_smoothing;
Robert Sesek 2015/09/25 23:00:52 naming: font_smoothing? (and throughout)
tapted 2015/09/28 04:30:38 Done (fontSmoothing because I had by objc/C++ styl
+ [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') | ui/base/cocoa/scoped_cg_context_smooth_fonts.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698