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

Unified Diff: chrome/browser/android/vr_shell/textures/url_bar_texture.cc

Issue 2925053004: [vr] Exit to 2D when encountering URLs with strong RTL characters (Closed)
Patch Set: rebaes Created 3 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/textures/url_bar_texture_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/textures/url_bar_texture.cc
diff --git a/chrome/browser/android/vr_shell/textures/url_bar_texture.cc b/chrome/browser/android/vr_shell/textures/url_bar_texture.cc
index 698f4a7ef56bdf2d43128e23bd095a4f68250246..69dfde72c3efd399cce554a03fbd3fd91d4cb932 100644
--- a/chrome/browser/android/vr_shell/textures/url_bar_texture.cc
+++ b/chrome/browser/android/vr_shell/textures/url_bar_texture.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/android/vr_shell/textures/url_bar_texture.h"
+#include "base/i18n/rtl.h"
#include "base/strings/utf_string_conversions.h"
#include "cc/paint/skia_paint_canvas.h"
#include "chrome/browser/android/vr_shell/color_scheme.h"
@@ -270,6 +271,9 @@ void UrlBarTexture::RenderUrl(const gfx::Size& texture_size,
gurl_, url_formatter::kFormatUrlOmitAll, net::UnescapeRule::NORMAL,
&parsed, nullptr, nullptr);
+ if (base::i18n::StringContainsStrongRTLChars(text))
+ failure_callback_.Run(UiUnsupportedMode::kURLWithStrongRTLChars);
+
int pixel_font_height = texture_size.height() * kFontHeight / kHeight;
gfx::FontList font_list;
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/textures/url_bar_texture_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698