Chromium Code Reviews| Index: ui/views/animation/ink_drop_impl.cc |
| diff --git a/ui/views/animation/ink_drop_impl.cc b/ui/views/animation/ink_drop_impl.cc |
| index b61932fe6cd6e020bf778cbd4cf1e198403c9a82..98c8d84d2e8b71bd721467094a389b8fbda52aa3 100644 |
| --- a/ui/views/animation/ink_drop_impl.cc |
| +++ b/ui/views/animation/ink_drop_impl.cc |
| @@ -575,7 +575,8 @@ InkDropImpl::HighlightStateFactory::CreateVisibleState( |
| return nullptr; |
| } |
| -InkDropImpl::InkDropImpl(InkDropHost* ink_drop_host) |
| +InkDropImpl::InkDropImpl(InkDropHost* ink_drop_host, |
| + const gfx::Size& layer_size) |
| : ink_drop_host_(ink_drop_host), |
| root_layer_(new ui::Layer(ui::LAYER_NOT_DRAWN)), |
| root_layer_added_to_host_(false), |
| @@ -585,6 +586,7 @@ InkDropImpl::InkDropImpl(InkDropHost* ink_drop_host) |
| is_focused_(false), |
| exiting_highlight_state_(false), |
| destroying_(false) { |
| + root_layer_->SetBounds(gfx::Rect(layer_size)); |
| SetAutoHighlightMode(AutoHighlightMode::NONE); |
| root_layer_->set_name("InkDropImpl:RootLayer"); |
| } |
| @@ -620,6 +622,10 @@ void InkDropImpl::SetAutoHighlightMode(AutoHighlightMode auto_highlight_mode) { |
| SetHighlightState(highlight_state_factory_->CreateStartState()); |
| } |
| +void InkDropImpl::UpdateLayerSize(const gfx::Size& layer_size) { |
| + root_layer_->SetBounds(gfx::Rect(layer_size)); |
|
bruthig
2016/11/14 19:09:38
nit: A comment here saying that "we are updating |
mohsen
2016/11/14 20:19:39
Done.
|
| +} |
| + |
| InkDropState InkDropImpl::GetTargetInkDropState() const { |
| if (!ink_drop_ripple_) |
| return InkDropState::HIDDEN; |