Index: chrome/browser/ui/views/location_bar/location_bar_view.cc |
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 24ff38073a625cbc84960b94cd24fe596b0312ff..26a15f352a31cfae7273305a994c6469ed219eb1 100644 |
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc |
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc |
@@ -445,13 +445,12 @@ void LocationBarView::SelectAll() { |
} |
gfx::Point LocationBarView::GetLocationBarAnchorPoint() const { |
- // The +1 in the next line creates a 1-px gap between icon and arrow tip. |
- const int icon_padding = GetLayoutConstant(ICON_LABEL_VIEW_TRAILING_PADDING); |
Evan Stade
2016/01/22 23:58:37
I've no idea why this calculation made sense as th
Peter Kasting
2016/01/23 00:13:41
In pre-MD, the ICON_LABEL_VIEW_TRAILING_PADDING wa
Evan Stade
2016/01/23 00:37:26
This CL is attempting to fix a regression and is d
Peter Kasting
2016/01/23 01:25:28
If you want to merge, then don't touch the calcula
|
- gfx::Point icon_bottom( |
- 0, location_icon_view_->GetImageBounds().bottom() - icon_padding + 1); |
- gfx::Point icon_center(location_icon_view_->GetImageBounds().CenterPoint()); |
- gfx::Point point(icon_center.x(), icon_bottom.y()); |
- ConvertPointToTarget(location_icon_view_, this, &point); |
+ const views::ImageView* image = location_icon_view_->GetImageView(); |
+ // The -1 in the next line creates a 1-px gap between icon and arrow tip. |
+ int icon_bottom = image->GetImageBounds().bottom() - 1; |
+ gfx::Point icon_center(image->GetImageBounds().CenterPoint()); |
+ gfx::Point point(icon_center.x(), icon_bottom); |
+ ConvertPointToTarget(image, this, &point); |
return point; |
} |
@@ -1353,7 +1352,7 @@ void LocationBarView::AnimationEnded(const gfx::Animation* animation) { |
void LocationBarView::OnChanged() { |
RefreshLocationIcon(); |
- location_icon_view_->ShowTooltip(!GetOmniboxView()->IsEditingOrEmpty()); |
+ location_icon_view_->set_show_tooltip(!GetOmniboxView()->IsEditingOrEmpty()); |
Layout(); |
SchedulePaint(); |
} |