OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include <unordered_map> | 7 #include <unordered_map> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 scroll_layer->SetBounds(gfx::Size(10, 10)); | 746 scroll_layer->SetBounds(gfx::Size(10, 10)); |
747 layer_tree_host_->UpdateLayers(); | 747 layer_tree_host_->UpdateLayers(); |
748 LayerTreeHostImpl* host_impl = layer_tree_host_->host_impl(); | 748 LayerTreeHostImpl* host_impl = layer_tree_host_->host_impl(); |
749 host_impl->CreatePendingTree(); | 749 host_impl->CreatePendingTree(); |
750 layer_tree_host_->CommitAndCreatePendingTree(); | 750 layer_tree_host_->CommitAndCreatePendingTree(); |
751 host_impl->ActivateSyncTree(); | 751 host_impl->ActivateSyncTree(); |
752 EXPECT_TRUE(host_impl->ScrollbarAnimationControllerForElementId( | 752 EXPECT_TRUE(host_impl->ScrollbarAnimationControllerForElementId( |
753 scroll_layer->element_id())); | 753 scroll_layer->element_id())); |
754 | 754 |
755 scroll_layer->SetBounds(gfx::Size(20, 20)); | 755 scroll_layer->SetBounds(gfx::Size(20, 20)); |
| 756 scroll_layer->ShowScrollbars(); |
756 scroll_layer->SetForceRenderSurfaceForTesting(true); | 757 scroll_layer->SetForceRenderSurfaceForTesting(true); |
757 layer_tree_host_->UpdateLayers(); | 758 layer_tree_host_->UpdateLayers(); |
758 host_impl->CreatePendingTree(); | 759 host_impl->CreatePendingTree(); |
759 layer_tree_host_->CommitAndCreatePendingTree(); | 760 layer_tree_host_->CommitAndCreatePendingTree(); |
760 host_impl->ActivateSyncTree(); | 761 host_impl->ActivateSyncTree(); |
761 EffectNode* node = | 762 EffectNode* node = |
762 host_impl->active_tree()->property_trees()->effect_tree.Node( | 763 host_impl->active_tree()->property_trees()->effect_tree.Node( |
763 scrollbar_layer->effect_tree_index()); | 764 scrollbar_layer->effect_tree_index()); |
764 EXPECT_EQ(node->opacity, 1.f); | 765 EXPECT_EQ(node->opacity, 1.f); |
765 } | 766 } |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1279 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); | 1280 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); |
1280 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); | 1281 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); |
1281 | 1282 |
1282 // Horizontal Scrollbars. | 1283 // Horizontal Scrollbars. |
1283 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); | 1284 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); |
1284 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); | 1285 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); |
1285 } | 1286 } |
1286 | 1287 |
1287 } // namespace | 1288 } // namespace |
1288 } // namespace cc | 1289 } // namespace cc |
OLD | NEW |