summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill
diff options
context:
space:
mode:
authorcsharp@chromium.org <csharp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-18 15:29:10 +0000
committercsharp@chromium.org <csharp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-18 15:29:10 +0000
commit30fde403ec48f4615a3fbe8b4421a0b25a57d10e (patch)
tree2f10a29fd33f099d9c2d54b24d8485e9c7f7368f /chrome/browser/autofill
parent0c906e9bb1ed9c4d244c3df803eff618224add64 (diff)
downloadchromium_src-30fde403ec48f4615a3fbe8b4421a0b25a57d10e.zip
chromium_src-30fde403ec48f4615a3fbe8b4421a0b25a57d10e.tar.gz
chromium_src-30fde403ec48f4615a3fbe8b4421a0b25a57d10e.tar.bz2
Display new Autofill UI Contents in Views
Show all of the contents for the new autofill UI in Views. BUG=51644 Review URL: https://chromiumcodereview.appspot.com/11092057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162709 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill')
-rw-r--r--chrome/browser/autofill/autofill_popup_view.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/autofill/autofill_popup_view.cc b/chrome/browser/autofill/autofill_popup_view.cc
index 9cff72b..0ca2bd4 100644
--- a/chrome/browser/autofill/autofill_popup_view.cc
+++ b/chrome/browser/autofill/autofill_popup_view.cc
@@ -34,6 +34,9 @@ const size_t kSeparatorHeight = 1;
// The amount of minimum padding between the Autofill value and label in pixels.
const size_t kLabelPadding = 15;
+// The maximum amount of characters to display from either the label or value.
+const size_t kMaxTextLength = 15;
+
struct DataResource {
const char* name;
int id;
@@ -97,6 +100,14 @@ void AutofillPopupView::Show(const std::vector<string16>& autofill_values,
autofill_icons_ = autofill_icons;
autofill_unique_ids_ = autofill_unique_ids;
+ // TODO(csharp): Fix crbug.com/156163 and use better logic when clipping.
+ for (size_t i = 0; i < autofill_values_.size(); ++i) {
+ if (autofill_values_[i].length() > 15)
+ autofill_values_[i].erase(15);
+ if (autofill_labels[i].length() > 15)
+ autofill_labels_[i].erase(15);
+ }
+
ShowInternal();
}