diff options
author | kuan@chromium.org <kuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-13 19:49:10 +0000 |
---|---|---|
committer | kuan@chromium.org <kuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-13 19:49:10 +0000 |
commit | 3fc0299614ddd9e2742880833810f0a7fd8a7611 (patch) | |
tree | 96a64125a1db9457f93076f783da3c45c81f9d5d /chrome | |
parent | a3f742697f50cae3ace0a84a3ace1dde9beaef65 (diff) | |
download | chromium_src-3fc0299614ddd9e2742880833810f0a7fd8a7611.zip chromium_src-3fc0299614ddd9e2742880833810f0a7fd8a7611.tar.gz chromium_src-3fc0299614ddd9e2742880833810f0a7fd8a7611.tar.bz2 |
fix left and right margins of omnibox native popup on win/cros, including RTL
BUG=248199,248202
TEST=verify per bug rpts
Review URL: https://chromiumcodereview.appspot.com/16801009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206142 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/ui/views/location_bar/location_bar_view.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc index 4d98f83..8a706fc 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc @@ -417,17 +417,14 @@ void LocationBarView::GetOmniboxPopupPositioningInfo( int* popup_width, int* left_margin, int* right_margin) { - gfx::Rect location_bar_bounds(parent()->GetContentsBounds()); - location_bar_bounds.Inset(kNormalEdgeThickness, 0); - *top_left_screen_coord = gfx::Point(0, parent()->height()); views::View::ConvertPointToScreen(parent(), top_left_screen_coord); *popup_width = parent()->width(); - gfx::Point location_bar_in_toolbar(location_bar_bounds.origin()); - views::View::ConvertPointToTarget(this, parent(), &location_bar_in_toolbar); - *left_margin = location_bar_in_toolbar.x(); - *right_margin = *popup_width - *left_margin - location_bar_bounds.width(); + gfx::Rect location_bar_bounds(bounds()); + location_bar_bounds.Inset(kNormalEdgeThickness, 0); + *left_margin = location_bar_bounds.x(); + *right_margin = *popup_width - location_bar_bounds.right(); } // static |