Index: chrome/browser/ui/views/bar_control_button.cc |
diff --git a/chrome/browser/ui/views/bar_control_button.cc b/chrome/browser/ui/views/bar_control_button.cc |
index 0e4336d5533964aabfe476257ce75bcf48ac4f9f..3b915af5e6dbf9aca76e3e49672dc23f4e198210 100644 |
--- a/chrome/browser/ui/views/bar_control_button.cc |
+++ b/chrome/browser/ui/views/bar_control_button.cc |
@@ -66,8 +66,7 @@ void BarControlButton::OnNativeThemeChanged(const ui::NativeTheme* theme) { |
void BarControlButton::Layout() { |
ImageButton::Layout(); |
- ink_drop_animation_controller_->SetInkDropCenter( |
- GetLocalBounds().CenterPoint()); |
+ ink_drop_animation_controller_->SetInkDropCenter(CalculateInkDropCenter()); |
} |
void BarControlButton::AddInkDropLayer(ui::Layer* ink_drop_layer) { |
@@ -83,6 +82,10 @@ void BarControlButton::RemoveInkDropLayer(ui::Layer* ink_drop_layer) { |
SetPaintToLayer(false); |
} |
+gfx::Point BarControlButton::CalculateInkDropCenter() const { |
+ return GetLocalBounds().CenterPoint(); |
+} |
+ |
bool BarControlButton::OnMousePressed(const ui::MouseEvent& event) { |
if (IsTriggerableEvent(event)) { |
ink_drop_animation_controller_->AnimateToState( |