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

Unified Diff: chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc

Issue 100196: A quick fix for supporting bidirectional texts in omnibox2.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc
===================================================================
--- chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc (revision 14925)
+++ chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc (working copy)
@@ -135,7 +135,7 @@
static SkBitmap* icon_star_;
static SkBitmap* icon_star_selected_;
static int icon_size_;
-
+
static bool initialized_;
static void InitClass();
@@ -414,9 +414,11 @@
int style = i->style;
if (force_dim)
style |= ACMatchClassification::DIM;
- x += DrawStringFragment(canvas,
- text.substr(text_start, text_end - text_start),
- style, x, y);
+ if (text_start < text_end) {
+ x += DrawStringFragment(canvas,
+ text.substr(text_start, text_end - text_start),
+ style, x, y);
+ }
}
}
return x;
@@ -799,4 +801,3 @@
canvas->FillRectInt(0, 0, canvas->getDevice()->width(),
canvas->getDevice()->height(), paint);
}
-
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698