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

Issue 2555783002: [Mac] Ensure Omnibox text is always right-aligned in RTL (Closed)

Created:
4 years ago by lgrey
Modified:
4 years ago
CC:
chromium-reviews, James Su, mac-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

There's a bunch of weird glitches right now that cause the text to flip to the left. AFAICT, these two changes fix all of them: 1) Set the alignment of the text field directly. 2) RFC 3987 requires us to set the writing direction of URLs to LTR so that we get שלום.com instead of moc.שלום. This appears to change the alignment of the string if it's not set explicitly. So: set it explicitly. BUG=648554, 673362 Committed: https://crrev.com/4f56da4755ccc370cd682cce472d4ba1c0781207 Cr-Commit-Position: refs/heads/master@{#438529}

Patch Set 1 #

Patch Set 2 : Doing this right #

Patch Set 3 : Tweaks #

Total comments: 2

Patch Set 4 : Friend tests instead of exposing private method #

Total comments: 6

Patch Set 5 : Review comments #

Total comments: 1

Patch Set 6 : Add more Omnibox plumbing in text and remove |CurrentTextIsURL| mock plumbing #

Patch Set 7 : User ScopedForceRTLMac for RTL test setup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -1 line) Patch
M chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm View 1 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm View 1 2 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm View 1 2 3 4 5 6 2 chunks +63 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (10 generated)
lgrey
PTAL :)
4 years ago (2016-12-08 18:12:23 UTC) #3
Elly Fong-Jones
lgtm https://codereview.chromium.org/2555783002/diff/40001/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h File chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h (right): https://codereview.chromium.org/2555783002/diff/40001/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h#newcode134 chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h:134: // Public for testing. It's better to friend ...
4 years ago (2016-12-09 18:56:16 UTC) #4
lgrey
Thanks! Mark PTAL for OWNERS https://codereview.chromium.org/2555783002/diff/40001/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h File chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h (right): https://codereview.chromium.org/2555783002/diff/40001/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h#newcode134 chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h:134: // Public for testing. ...
4 years ago (2016-12-09 19:43:15 UTC) #6
Mark Mentovai
LGTM https://codereview.chromium.org/2555783002/diff/60001/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h File chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h (right): https://codereview.chromium.org/2555783002/diff/60001/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h#newcode136 chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h:136: FRIEND_TEST_ALL_PREFIXES(OmniboxViewMacTest, #include "base/gtest_prod_util.h" for this macro. https://codereview.chromium.org/2555783002/diff/60001/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h#newcode186 chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h:186: ...
4 years ago (2016-12-12 17:45:24 UTC) #7
lgrey
Thanks, Mark! +pkasting@ for components/omnibox/browser/ https://codereview.chromium.org/2555783002/diff/60001/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h File chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h (right): https://codereview.chromium.org/2555783002/diff/60001/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h#newcode136 chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h:136: FRIEND_TEST_ALL_PREFIXES(OmniboxViewMacTest, On 2016/12/12 17:45:24, ...
4 years ago (2016-12-12 18:13:33 UTC) #9
Peter Kasting
https://codereview.chromium.org/2555783002/diff/80001/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm File chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm (right): https://codereview.chromium.org/2555783002/diff/80001/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm#newcode44 chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm:44: bool CurrentTextIsURL() const override { return current_text_is_url_; } Why ...
4 years ago (2016-12-12 19:57:10 UTC) #11
lgrey
On 2016/12/12 19:57:10, Peter Kasting wrote: > https://codereview.chromium.org/2555783002/diff/80001/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm > File chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm (right): > > https://codereview.chromium.org/2555783002/diff/80001/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm#newcode44 ...
4 years ago (2016-12-12 20:00:34 UTC) #12
Peter Kasting
On 2016/12/12 20:00:34, lgrey wrote: > On 2016/12/12 19:57:10, Peter Kasting wrote: > > > ...
4 years ago (2016-12-12 20:14:12 UTC) #13
lgrey
On 2016/12/12 20:14:12, Peter Kasting wrote: > On 2016/12/12 20:00:34, lgrey wrote: > > On ...
4 years ago (2016-12-12 21:55:23 UTC) #14
lgrey
Updated PTAL. Removed |CurrentTextIsURL| mocking. Thanks for working this out with me last night, pkasting@
4 years ago (2016-12-13 15:47:53 UTC) #15
Mark Mentovai
Still LGTM
4 years ago (2016-12-14 16:10:04 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2555783002/120001
4 years ago (2016-12-14 16:10:32 UTC) #19
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years ago (2016-12-14 16:39:28 UTC) #22
commit-bot: I haz the power
4 years ago (2016-12-14 16:41:31 UTC) #24
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/4f56da4755ccc370cd682cce472d4ba1c0781207
Cr-Commit-Position: refs/heads/master@{#438529}

Powered by Google App Engine
This is Rietveld 408576698