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

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

Issue 2453553003: Disable overlay scrollbars in Blink when hidden by the compositor. (Closed)
Patch Set: Rebase 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 unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/property_tree.h » ('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_in_process.h" 5 #include "cc/trees/layer_tree_host_in_process.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 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 861
862 if (layer_tree_->root_layer()) { 862 if (layer_tree_->root_layer()) {
863 for (size_t i = 0; i < info->scrolls.size(); ++i) { 863 for (size_t i = 0; i < info->scrolls.size(); ++i) {
864 Layer* layer = layer_tree_->LayerById(info->scrolls[i].layer_id); 864 Layer* layer = layer_tree_->LayerById(info->scrolls[i].layer_id);
865 if (!layer) 865 if (!layer)
866 continue; 866 continue;
867 layer->SetScrollOffsetFromImplSide(gfx::ScrollOffsetWithDelta( 867 layer->SetScrollOffsetFromImplSide(gfx::ScrollOffsetWithDelta(
868 layer->scroll_offset(), info->scrolls[i].scroll_delta)); 868 layer->scroll_offset(), info->scrolls[i].scroll_delta));
869 SetNeedsUpdateLayers(); 869 SetNeedsUpdateLayers();
870 } 870 }
871 for (size_t i = 0; i < info->scrollbars.size(); ++i) {
872 Layer* layer = layer_tree_->LayerById(info->scrollbars[i].layer_id);
873 if (!layer)
874 continue;
875 layer->SetScrollbarsHiddenFromImplSide(info->scrollbars[i].hidden);
876 }
871 } 877 }
872 878
873 // This needs to happen after scroll deltas have been sent to prevent top 879 // This needs to happen after scroll deltas have been sent to prevent top
874 // controls from clamping the layout viewport both on the compositor and 880 // controls from clamping the layout viewport both on the compositor and
875 // on the main thread. 881 // on the main thread.
876 ApplyViewportDeltas(info); 882 ApplyViewportDeltas(info);
877 } 883 }
878 884
879 const base::WeakPtr<InputHandler>& LayerTreeHostInProcess::GetInputHandler() 885 const base::WeakPtr<InputHandler>& LayerTreeHostInProcess::GetInputHandler()
880 const { 886 const {
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 1029
1024 debug_state_.FromProtobuf(proto.debug_state()); 1030 debug_state_.FromProtobuf(proto.debug_state());
1025 has_gpu_rasterization_trigger_ = proto.has_gpu_rasterization_trigger(); 1031 has_gpu_rasterization_trigger_ = proto.has_gpu_rasterization_trigger();
1026 content_is_suitable_for_gpu_rasterization_ = 1032 content_is_suitable_for_gpu_rasterization_ =
1027 proto.content_is_suitable_for_gpu_rasterization(); 1033 proto.content_is_suitable_for_gpu_rasterization();
1028 id_ = proto.id(); 1034 id_ = proto.id();
1029 next_commit_forces_redraw_ = proto.next_commit_forces_redraw(); 1035 next_commit_forces_redraw_ = proto.next_commit_forces_redraw();
1030 } 1036 }
1031 1037
1032 } // namespace cc 1038 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/property_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698