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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 2918753002: Prevent create ScrollbarAnimationController for Mac Overlay Scrollbar (Closed)
Patch Set: fix without MACOSX macro Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « cc/layers/scrollbar_layer_impl_base.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 3737 matching lines...) Expand 10 before | Expand all | Expand 10 after
3748 active_tree_->root_layer_for_testing()->LayerTreeAsJson()); 3748 active_tree_->root_layer_for_testing()->LayerTreeAsJson());
3749 base::JSONWriter::WriteWithOptions( 3749 base::JSONWriter::WriteWithOptions(
3750 *json, base::JSONWriter::OPTIONS_PRETTY_PRINT, &str); 3750 *json, base::JSONWriter::OPTIONS_PRETTY_PRINT, &str);
3751 } 3751 }
3752 return str; 3752 return str;
3753 } 3753 }
3754 3754
3755 void LayerTreeHostImpl::RegisterScrollbarAnimationController( 3755 void LayerTreeHostImpl::RegisterScrollbarAnimationController(
3756 ElementId scroll_element_id, 3756 ElementId scroll_element_id,
3757 float scrollbar_opacity) { 3757 float scrollbar_opacity) {
3758 if (settings().scrollbar_animator == LayerTreeSettings::NO_ANIMATOR)
3759 return;
3760 if (ScrollbarAnimationControllerForElementId(scroll_element_id)) 3758 if (ScrollbarAnimationControllerForElementId(scroll_element_id))
3761 return; 3759 return;
3762 3760
3763 scrollbar_animation_controllers_[scroll_element_id] = 3761 scrollbar_animation_controllers_[scroll_element_id] =
3764 active_tree_->CreateScrollbarAnimationController(scroll_element_id, 3762 active_tree_->CreateScrollbarAnimationController(scroll_element_id,
3765 scrollbar_opacity); 3763 scrollbar_opacity);
3766 } 3764 }
3767 3765
3768 void LayerTreeHostImpl::UnregisterScrollbarAnimationController( 3766 void LayerTreeHostImpl::UnregisterScrollbarAnimationController(
3769 ElementId scroll_element_id) { 3767 ElementId scroll_element_id) {
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
4303 4301
4304 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { 4302 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) {
4305 if (!element_id) 4303 if (!element_id)
4306 return; 4304 return;
4307 if (ScrollbarAnimationController* animation_controller = 4305 if (ScrollbarAnimationController* animation_controller =
4308 ScrollbarAnimationControllerForElementId(element_id)) 4306 ScrollbarAnimationControllerForElementId(element_id))
4309 animation_controller->DidScrollUpdate(); 4307 animation_controller->DidScrollUpdate();
4310 } 4308 }
4311 4309
4312 } // namespace cc 4310 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/scrollbar_layer_impl_base.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698