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

Unified Diff: ui/views/animation/ink_drop_host_view.cc

Issue 2897533003: Change default ink drop center points to center of contents bounds (Closed)
Patch Set: fix compile Created 3 years, 7 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 | « chrome/browser/ui/views/toolbar/toolbar_button.cc ('k') | ui/views/view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/ink_drop_host_view.cc
diff --git a/ui/views/animation/ink_drop_host_view.cc b/ui/views/animation/ink_drop_host_view.cc
index 9748c8b01e086e0f53bd6e1c33a92d712e9fe6a1..cbf80ff3c6136fa1689cf453a7ccee787a22018f 100644
--- a/ui/views/animation/ink_drop_host_view.cc
+++ b/ui/views/animation/ink_drop_host_view.cc
@@ -157,13 +157,14 @@ std::unique_ptr<InkDrop> InkDropHostView::CreateInkDrop() {
}
std::unique_ptr<InkDropRipple> InkDropHostView::CreateInkDropRipple() const {
- return CreateDefaultInkDropRipple(GetLocalBounds().CenterPoint());
+ return CreateDefaultInkDropRipple(
+ GetMirroredRect(GetContentsBounds()).CenterPoint());
}
std::unique_ptr<InkDropHighlight> InkDropHostView::CreateInkDropHighlight()
const {
return CreateDefaultInkDropHighlight(
- gfx::RectF(GetLocalBounds()).CenterPoint());
+ gfx::RectF(GetMirroredRect(GetContentsBounds())).CenterPoint());
}
std::unique_ptr<InkDropRipple> InkDropHostView::CreateDefaultInkDropRipple(
@@ -198,7 +199,7 @@ void InkDropHostView::SetInkDropMode(InkDropMode ink_drop_mode) {
gfx::Point InkDropHostView::GetInkDropCenterBasedOnLastEvent() const {
return last_ripple_triggering_event_
? last_ripple_triggering_event_->location()
- : GetLocalBounds().CenterPoint();
+ : GetMirroredRect(GetContentsBounds()).CenterPoint();
}
void InkDropHostView::AnimateInkDrop(InkDropState state,
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_button.cc ('k') | ui/views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698