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

Unified Diff: ios/chrome/browser/ui/omnibox/omnibox_popup_material_view_controller.mm

Issue 2854893002: Force URLs in omnibox suggestions to layout LTR. (Closed)
Patch Set: Created 3 years, 8 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: ios/chrome/browser/ui/omnibox/omnibox_popup_material_view_controller.mm
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_popup_material_view_controller.mm b/ios/chrome/browser/ui/omnibox/omnibox_popup_material_view_controller.mm
index ca1a193a9cd4e103a974747ceb7be374d608fdae..35033488731d36a0fddb8cea139ff4ead01e331f 100644
--- a/ios/chrome/browser/ui/omnibox/omnibox_popup_material_view_controller.mm
+++ b/ios/chrome/browser/ui/omnibox/omnibox_popup_material_view_controller.mm
@@ -258,6 +258,9 @@ initWithPopupView:(OmniboxPopupViewIOS*)view
// truncation by ellipse for the multi-line text sometimes shown in answers.
row.detailTruncatingLabel.hidden = answerPresent;
row.detailAnswerLabel.hidden = !answerPresent;
+ // URLs have have special layout requirements that need to be invoked here.
+ row.detailTruncatingLabel.displayAsURL =
+ !AutocompleteMatch::IsSearchType(match.type);
// TODO(crbug.com/697647): The complexity of managing these two separate
// labels could probably be encapusulated in the row class if we moved the
// layout logic there.

Powered by Google App Engine
This is Rietveld 408576698