| Index: ui/app_list/views/contents_animator.cc
|
| diff --git a/ui/app_list/views/contents_animator.cc b/ui/app_list/views/contents_animator.cc
|
| index fd8048b199b928157e3ba4bd31018b98ccba8869..5f866e58407c0592d2744ecbeaeaae92991302fd 100644
|
| --- a/ui/app_list/views/contents_animator.cc
|
| +++ b/ui/app_list/views/contents_animator.cc
|
| @@ -100,6 +100,20 @@ void ContentsAnimator::UpdateSearchBoxForDefaultAnimation(double progress,
|
| contents_view()->ConvertRectToWidget(search_box_rect));
|
| }
|
|
|
| +void ContentsAnimator::ClipPageToOnscreenBounds(
|
| + int page_index,
|
| + const gfx::Rect& current_bounds,
|
| + const gfx::Rect& onscreen_bounds) {
|
| + int search_results_index =
|
| + contents_view()->GetPageIndexForState(AppListModel::STATE_SEARCH_RESULTS);
|
| + if (page_index != search_results_index)
|
| + return;
|
| +
|
| + contents_view()
|
| + ->GetPageView(page_index)
|
| + ->set_clip_insets(current_bounds.InsetsFrom(onscreen_bounds));
|
| +}
|
| +
|
| // DefaultAnimator
|
|
|
| DefaultAnimator::DefaultAnimator(ContentsView* contents_view)
|
| @@ -123,7 +137,10 @@ void DefaultAnimator::Update(double progress, int from_page, int to_page) {
|
| gfx::Tween::RectValueBetween(progress, to_page_origin, to_page_onscreen));
|
|
|
| contents_view()->GetPageView(from_page)->SetBoundsRect(from_page_rect);
|
| + ClipPageToOnscreenBounds(from_page, from_page_rect, from_page_onscreen);
|
| +
|
| contents_view()->GetPageView(to_page)->SetBoundsRect(to_page_rect);
|
| + ClipPageToOnscreenBounds(to_page, to_page_rect, to_page_onscreen);
|
|
|
| UpdateCustomPageForDefaultAnimation(progress, from_page, to_page);
|
| UpdateSearchBoxForDefaultAnimation(progress, from_page, to_page);
|
|
|