Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Unified Diff: ui/views/controls/button/custom_button.cc

Issue 1927983002: Fixed Back/Forward buttons to not hide ink drop when long press shows drop down menu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Changed base::WrapUnique() to make_scoped_ptr(). Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/button/custom_button.h ('k') | ui/views/controls/button/custom_button_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/custom_button.cc
diff --git a/ui/views/controls/button/custom_button.cc b/ui/views/controls/button/custom_button.cc
index c99fcaacb72310a5b0ee26654b7f84a0d5370a9a..6e80eb12d9facebcb5cb902edf29d0e47499eb32 100644
--- a/ui/views/controls/button/custom_button.cc
+++ b/ui/views/controls/button/custom_button.cc
@@ -341,7 +341,7 @@ void CustomButton::ShowContextMenu(const gfx::Point& p,
// we won't get a mouse exited and reset state. Reset it now to be sure.
if (state_ != STATE_DISABLED)
SetState(STATE_NORMAL);
- if (ink_drop_delegate_) {
+ if (hide_ink_drop_when_showing_context_menu_ && ink_drop_delegate_) {
ink_drop_delegate_->SetHovered(false);
ink_drop_delegate_->OnAction(InkDropState::HIDDEN);
}
@@ -443,6 +443,7 @@ CustomButton::CustomButton(ButtonListener* listener)
notify_action_(NOTIFY_ON_RELEASE),
has_ink_drop_action_on_click_(false),
ink_drop_action_on_click_(InkDropState::ACTION_TRIGGERED),
+ hide_ink_drop_when_showing_context_menu_(true),
ink_drop_base_color_(gfx::kPlaceholderColor),
md_focus_ring_(nullptr) {
hover_animation_.SetSlideDuration(kHoverFadeDurationMs);
« no previous file with comments | « ui/views/controls/button/custom_button.h ('k') | ui/views/controls/button/custom_button_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698