| Index: chrome/browser/ui/views/tabs/tab_strip.cc
|
| diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
|
| index 99b804179e95f6b799f31577b89dc624f6bb4b6e..7778f84893e5c9bddb5cb7f64aa6d062ea4fe46f 100644
|
| --- a/chrome/browser/ui/views/tabs/tab_strip.cc
|
| +++ b/chrome/browser/ui/views/tabs/tab_strip.cc
|
| @@ -119,6 +119,9 @@ const int kPinnedToNonPinnedOffset = 2;
|
| const int kPinnedToNonPinnedOffset = 3;
|
| #endif
|
|
|
| +// The vertical offset of the tab strip button.
|
| +const int kNewTabButtonVerticalOffset = 7;
|
| +
|
| // Returns the size of the new tab button, not including any bounds extension to
|
| // enlarge the clickable area.
|
| gfx::Size GetNewTabButtonSize() {
|
| @@ -445,7 +448,7 @@ bool NewTabButton::GetHitTestMask(gfx::Path* mask) const {
|
| if (ui::MaterialDesignController::IsModeMaterial()) {
|
| SkPath border;
|
| const float scale = GetWidget()->GetCompositor()->device_scale_factor();
|
| - GetBorderPath(TabStrip::kNewTabButtonVerticalOffset * scale, scale,
|
| + GetBorderPath(kNewTabButtonVerticalOffset * scale, scale,
|
| tab_strip_->SizeTabButtonToTopOfTabStrip(), &border);
|
| mask->addPath(border, SkMatrix::MakeScale(1 / scale));
|
| } else if (tab_strip_->SizeTabButtonToTopOfTabStrip()) {
|
| @@ -457,7 +460,7 @@ bool NewTabButton::GetHitTestMask(gfx::Path* mask) const {
|
| mask->addRect(RectToSkRect(button_bounds));
|
| } else {
|
| SkScalar w = SkIntToScalar(width());
|
| - SkScalar v_offset = SkIntToScalar(TabStrip::kNewTabButtonVerticalOffset);
|
| + SkScalar v_offset = SkIntToScalar(kNewTabButtonVerticalOffset);
|
|
|
| // These values are defined by the shape of the new tab image. Should that
|
| // image ever change, these values will need to be updated. They're so
|
| @@ -568,8 +571,7 @@ void NewTabButton::PaintFill(bool pressed,
|
| // no flip.
|
| x += size.width();
|
| }
|
| - canvas->TileImageInt(*background, x,
|
| - TabStrip::kNewTabButtonVerticalOffset + offset_y,
|
| + canvas->TileImageInt(*background, x, kNewTabButtonVerticalOffset + offset_y,
|
| x_scale, 1.0f, 0, 0, size.width(), size.height());
|
|
|
| // For non-MD, adjust the alpha of the fill to match that of inactive tabs
|
| @@ -655,9 +657,6 @@ void TabStrip::RemoveTabDelegate::AnimationCanceled(
|
| ///////////////////////////////////////////////////////////////////////////////
|
| // TabStrip, public:
|
|
|
| -// static
|
| -const int TabStrip::kNewTabButtonVerticalOffset = 7;
|
| -
|
| TabStrip::TabStrip(TabStripController* controller)
|
| : controller_(controller),
|
| newtab_button_(NULL),
|
|
|