| 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 8b2f203894941edf7a6099d5daad66605696b647..1c02b933ed71098114075fcb4c2320bc2ccc5535 100644
|
| --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
|
| +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
|
| @@ -462,8 +462,8 @@ gfx::Size LocationBarView::GetPreferredSize() const {
|
| location_icon_view_->GetMinimumSizeForLabelText(GetLocationIconText())
|
| .width();
|
| } else {
|
| - leading_width +=
|
| - kHorizontalPadding + location_icon_view_->GetMinimumSize().width();
|
| + leading_width += GetLayoutConstant(LOCATION_BAR_ELEMENT_PADDING) +
|
| + location_icon_view_->GetMinimumSize().width();
|
| }
|
|
|
| // Compute width of omnibox-trailing content.
|
| @@ -482,7 +482,7 @@ gfx::Size LocationBarView::GetPreferredSize() const {
|
| }
|
|
|
| min_size.set_width(leading_width + omnibox_view_->GetMinimumSize().width() +
|
| - 2 * kHorizontalPadding -
|
| + 2 * GetLayoutConstant(LOCATION_BAR_ELEMENT_PADDING) -
|
| omnibox_view_->GetInsets().width() + trailing_width);
|
| return min_size;
|
| }
|
| @@ -495,14 +495,13 @@ void LocationBarView::Layout() {
|
| location_icon_view_->SetVisible(false);
|
| keyword_hint_view_->SetVisible(false);
|
|
|
| - constexpr int item_padding = kHorizontalPadding;
|
| + const int item_padding = GetLayoutConstant(LOCATION_BAR_ELEMENT_PADDING);
|
|
|
| LocationBarLayout leading_decorations(
|
| LocationBarLayout::LEFT_EDGE, item_padding,
|
| item_padding - omnibox_view_->GetInsets().left());
|
| - LocationBarLayout trailing_decorations(
|
| - LocationBarLayout::RIGHT_EDGE, item_padding,
|
| - item_padding - omnibox_view_->GetInsets().right());
|
| + LocationBarLayout trailing_decorations(LocationBarLayout::RIGHT_EDGE,
|
| + item_padding, item_padding);
|
|
|
| const base::string16 keyword(omnibox_view_->model()->keyword());
|
| // In some cases (e.g. fullscreen mode) we may have 0 height. We still want
|
| @@ -515,7 +514,7 @@ void LocationBarView::Layout() {
|
| location_icon_view_->SetLabel(base::string16());
|
| if (ShouldShowKeywordBubble()) {
|
| leading_decorations.AddDecoration(vertical_padding, location_height, true,
|
| - 0, 0, item_padding,
|
| + 0, item_padding, item_padding,
|
| selected_keyword_view_);
|
| if (selected_keyword_view_->keyword() != keyword) {
|
| selected_keyword_view_->SetKeyword(keyword);
|
| @@ -536,8 +535,8 @@ void LocationBarView::Layout() {
|
| // The largest fraction of the omnibox that can be taken by the EV bubble.
|
| const double kMaxBubbleFraction = 0.5;
|
| leading_decorations.AddDecoration(vertical_padding, location_height, false,
|
| - kMaxBubbleFraction, 0, item_padding,
|
| - location_icon_view_);
|
| + kMaxBubbleFraction, item_padding,
|
| + item_padding, location_icon_view_);
|
| } else {
|
| leading_decorations.AddDecoration(vertical_padding, location_height,
|
| location_icon_view_);
|
| @@ -691,7 +690,8 @@ WebContents* LocationBarView::GetWebContents() {
|
| // LocationBarView, private:
|
|
|
| int LocationBarView::IncrementalMinimumWidth(views::View* view) const {
|
| - return view->visible() ? (kHorizontalPadding + view->GetMinimumSize().width())
|
| + return view->visible() ? (GetLayoutConstant(LOCATION_BAR_ELEMENT_PADDING) +
|
| + view->GetMinimumSize().width())
|
| : 0;
|
| }
|
|
|
| @@ -702,9 +702,8 @@ int LocationBarView::GetHorizontalEdgeThickness() const {
|
| }
|
|
|
| int LocationBarView::GetTotalVerticalPadding() const {
|
| - constexpr int kInteriorPadding = 1;
|
| return BackgroundWith1PxBorder::kLocationBarBorderThicknessDip +
|
| - kInteriorPadding;
|
| + GetLayoutConstant(LOCATION_BAR_ELEMENT_PADDING);
|
| }
|
|
|
| void LocationBarView::RefreshLocationIcon() {
|
|
|