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

Issue 1368883002: Mac: restore subpixel AA in the find bar when it doesn't have focus (Closed)

Created:
5 years, 3 months ago by tapted
Modified:
5 years, 2 months ago
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mac: restore subpixel AA in the find bar when it doesn't have focus After linking to the 10.10 SDK, the text in the find bar (Cmd+F) loses its subpixel AA when the textfield doesn't have focus. https://developer.apple.com/library/prerelease/mac/releasenotes/AppKit/RN-AppKitOlderNotes/#10_8Layers documents new logic for applications linked on 10.8 and higher. Specifically, NSTextField now allows LCD font smoothing when the view is layer-backed, but this will be disabled if AppKit can't find an opaque ancestor view. The findbar textfield cell isn't opaque (it has rounded corners), but the background behind the text is always solid (even when a theme is installed), so enabling AA is safe. In fact, this is true for all StyledTextFieldCells, of which there are 2 (findbar and omnibox). Share the "force-enable-AA" logic already in BlueLabelButton and AutocompleteTextFieldCell that does this by adding ui::ScopedCGContextSmoothFonts. Note AutocompleteTextFieldCell overrides -[NSCell drawWithFrame:inView:] so doesn't inherit the fix from StyledTextFieldCell. BUG=535790 TBR=avi@chromium.org TEST=On Mac (without a retina screen), press Cmd+F, type something, then click the page to defocus. The text in the find bar should keep its font smoothing. Committed: https://crrev.com/96e79b2a53fddaac6040ca2e699c33fbdf44641c Cr-Commit-Position: refs/heads/master@{#351022}

Patch Set 1 #

Patch Set 2 : DISALLOW_COPY.etc #

Total comments: 6

Patch Set 3 : respond to comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -18 lines) Patch
M chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm View 1 2 2 chunks +3 lines, -11 lines 0 comments Download
M chrome/browser/ui/cocoa/styled_text_field_cell.mm View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M ui/base/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M ui/base/cocoa/controls/blue_label_button.mm View 1 2 2 chunks +2 lines, -7 lines 0 comments Download
A ui/base/cocoa/scoped_cg_context_smooth_fonts.h View 1 2 1 chunk +33 lines, -0 lines 0 comments Download
A ui/base/cocoa/scoped_cg_context_smooth_fonts.mm View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
M ui/base/ui_base.gyp View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (6 generated)
tapted
HI Robert - please take a look. (another sdk fix for m46..)
5 years, 3 months ago (2015-09-25 04:33:43 UTC) #2
Robert Sesek
LGTM w/ nits https://codereview.chromium.org/1368883002/diff/20001/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm File chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm (right): https://codereview.chromium.org/1368883002/diff/20001/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm#newcode349 chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm:349: ui::ScopedCGContextSmoothFonts lcd_smoothing; naming: font_smoothing? (and throughout) ...
5 years, 2 months ago (2015-09-25 23:00:52 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1368883002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1368883002/40001
5 years, 2 months ago (2015-09-28 03:20:01 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-09-28 04:30:07 UTC) #7
tapted
+avi TBR for ** Presubmit Messages ** Missing OWNER reviewers for these files: ui/base/BUILD.gn ui/base/ui_base.gyp ...
5 years, 2 months ago (2015-09-28 04:30:38 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1368883002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1368883002/40001
5 years, 2 months ago (2015-09-28 04:32:10 UTC) #12
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 2 months ago (2015-09-28 04:36:31 UTC) #13
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/96e79b2a53fddaac6040ca2e699c33fbdf44641c Cr-Commit-Position: refs/heads/master@{#351022}
5 years, 2 months ago (2015-09-28 04:37:28 UTC) #14
Avi (use Gerrit)
5 years, 2 months ago (2015-09-28 15:28:10 UTC) #15
Message was sent while issue was closed.
lgtm

👍

Powered by Google App Engine
This is Rietveld 408576698