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

Issue 2126023003: Mac (Cocoa) Omnibox: Force text field to LTR context if it is a URL. (Closed)

Created:
4 years, 5 months ago by Matt Giuca
Modified:
4 years, 5 months ago
Reviewers:
tapted
CC:
chromium-reviews, James Su, 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 (Cocoa) Omnibox: Force text field to LTR context if it is a URL. This means that URLs will be displayed in a left-to-right paragraph context. Right-to-left runs are still rendered RTL, but will not flip the whole URL around. For example (if "ABC" is Hebrew), this will render "ABC.com" as "CBA.com", rather than "com.CBA". Affects main text field and suggestions, but not non-URL search text. Complies with RFC 3987 Section 4.1 and brings the Mac Omnibox in line with the existing behaviour on Views and Android. BUG=624213 Committed: https://crrev.com/05baf795316dd430afbd79ee915187bec6bf5f5d Cr-Commit-Position: refs/heads/master@{#406791}

Patch Set 1 #

Patch Set 2 : Fix so it works, and also only apply for URLs. #

Patch Set 3 : Also force LTR on suggestions. #

Patch Set 4 : Formatting. #

Total comments: 6

Patch Set 5 : Respond to feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -0 lines) Patch
M chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm View 1 2 3 4 2 chunks +17 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (11 generated)
Matt Giuca
4 years, 5 months ago (2016-07-21 02:04:19 UTC) #6
tapted
https://codereview.chromium.org/2126023003/diff/60001/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm File chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm (right): https://codereview.chromium.org/2126023003/diff/60001/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm#newcode155 chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm:155: void SetTextDirectionForRange(NSMutableAttributedString* attributedString, This should be something like SetURLTextDirection, ...
4 years, 5 months ago (2016-07-21 04:37:05 UTC) #9
Matt Giuca
https://codereview.chromium.org/2126023003/diff/60001/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm File chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm (right): https://codereview.chromium.org/2126023003/diff/60001/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm#newcode155 chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm:155: void SetTextDirectionForRange(NSMutableAttributedString* attributedString, On 2016/07/21 04:37:05, tapted wrote: > ...
4 years, 5 months ago (2016-07-21 04:55:37 UTC) #11
tapted
lgtm - I'm still confused why we'd need to ever call the method with NSWritingDirectionRightToLeft, ...
4 years, 5 months ago (2016-07-21 05:11:07 UTC) #12
Matt Giuca
On 2016/07/21 05:11:07, tapted wrote: > lgtm - I'm still confused why we'd need to ...
4 years, 5 months ago (2016-07-21 05:54:51 UTC) #13
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/2126023003/100001
4 years, 5 months ago (2016-07-21 05:55:18 UTC) #15
commit-bot: I haz the power
Committed patchset #5 (id:100001)
4 years, 5 months ago (2016-07-21 07:07:06 UTC) #17
commit-bot: I haz the power
4 years, 5 months ago (2016-07-21 07:10:44 UTC) #19
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/05baf795316dd430afbd79ee915187bec6bf5f5d
Cr-Commit-Position: refs/heads/master@{#406791}

Powered by Google App Engine
This is Rietveld 408576698