diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-20 18:28:00 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-20 18:28:00 +0000 |
commit | 68da8f78cd06ba70144c9e3fb2e1bae724208e6a (patch) | |
tree | 695907a99af87ad2c9ff646893e11588a447e41d /chrome/browser/autocomplete | |
parent | 6658ca866d0e28950179a65179c1a4d6e8e3f8df (diff) | |
download | chromium_src-68da8f78cd06ba70144c9e3fb2e1bae724208e6a.zip chromium_src-68da8f78cd06ba70144c9e3fb2e1bae724208e6a.tar.gz chromium_src-68da8f78cd06ba70144c9e3fb2e1bae724208e6a.tar.bz2 |
Elide the EV bubble when it's extremely long. This limits it to half the location bar width, unless eliding to that would result in a width of less than 150 px.
BUG=42856
TEST=Visit https://www.barbican.org.uk/eticketing/index.asp and make the window smaller. The EV bubble should shrink, eliding in middle, until it hits a minimum size.
Review URL: http://codereview.chromium.org/2084012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47819 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_popup_view_mac.mm | 2 | ||||
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_popup_view_mac_unittest.mm | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm index fd2b20e..c0e4f93 100644 --- a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm +++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm @@ -145,7 +145,7 @@ NSMutableAttributedString* AutocompletePopupViewMac::ElideString( } // If ElideText() decides to do nothing, nothing to be done. - const std::wstring elided(ElideText(originalString, font, width)); + const std::wstring elided(ElideText(originalString, font, width, false)); if (0 == elided.compare(originalString)) { return aString; } diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac_unittest.mm b/chrome/browser/autocomplete/autocomplete_popup_view_mac_unittest.mm index aff63db..56856dd 100644 --- a/chrome/browser/autocomplete/autocomplete_popup_view_mac_unittest.mm +++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac_unittest.mm @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -441,14 +441,14 @@ TEST_F(AutocompletePopupViewMacTest, ElideString) { // When elided, result is the same as ElideText(). ret = AutocompletePopupViewMac::ElideString(as, wideContents, font_, kNarrow); - std::wstring elided(ElideText(wideContents, font_, kNarrow)); + std::wstring elided(ElideText(wideContents, font_, kNarrow, false)); EXPECT_TRUE(ret == as); EXPECT_FALSE([[as string] isEqualToString:contents]); EXPECT_TRUE([[as string] isEqualToString:base::SysWideToNSString(elided)]); // When elided, result is the same as ElideText(). ret = AutocompletePopupViewMac::ElideString(as, wideContents, font_, 0.0); - elided = ElideText(wideContents, font_, 0.0); + elided = ElideText(wideContents, font_, 0.0, false); EXPECT_TRUE(ret == as); EXPECT_FALSE([[as string] isEqualToString:contents]); EXPECT_TRUE([[as string] isEqualToString:base::SysWideToNSString(elided)]); |