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

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

Issue 2457393006: [ash-md] Added ink drop to system menu rows that inherit from ActionableView. (Closed)
Patch Set: Fixed the failing test: 'SpokenFeedbackTest.NavigateSystemTray' Created 4 years, 1 month 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 | « ash/common/system/update/tray_update.cc ('k') | ui/views/animation/ink_drop_highlight_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/ink_drop_highlight.cc
diff --git a/ui/views/animation/ink_drop_highlight.cc b/ui/views/animation/ink_drop_highlight.cc
index d2077b16c32dd24d9c0d76a088d876a228c914c1..12202a26fce3e38eaa938559723ce283cba299f8 100644
--- a/ui/views/animation/ink_drop_highlight.cc
+++ b/ui/views/animation/ink_drop_highlight.cc
@@ -139,7 +139,10 @@ gfx::Transform InkDropHighlight::CalculateTransform(
const gfx::Size& size) const {
gfx::Transform transform;
transform.Translate(center_point_.x(), center_point_.y());
- transform.Scale(size.width() / size_.width(), size.height() / size_.height());
+ // TODO(bruthig): Fix the InkDropHighlight to work well when initialized with
+ // a (0x0) size. See https://crbug.com/661618.
+ transform.Scale(size_.width() == 0 ? 0 : size.width() / size_.width(),
+ size_.height() == 0 ? 0 : size.height() / size_.height());
gfx::Vector2dF layer_offset = layer_delegate_->GetCenteringOffset();
transform.Translate(-layer_offset.x(), -layer_offset.y());
return transform;
« no previous file with comments | « ash/common/system/update/tray_update.cc ('k') | ui/views/animation/ink_drop_highlight_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698