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

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

Issue 2930783002: [vr] Exit to 2D when encountering URLs with strong RTL characters (Closed)
Patch Set: 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 91a0665467f7c1eae0027bceb68c91a17a36389a..40cdf28c7cca4369f33cf72222ee5f0c5502b9c0 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"
@@ -259,6 +260,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