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

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: 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
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 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 867
868 if (layer_tree_->root_layer()) { 868 if (layer_tree_->root_layer()) {
869 for (size_t i = 0; i < info->scrolls.size(); ++i) { 869 for (size_t i = 0; i < info->scrolls.size(); ++i) {
870 Layer* layer = layer_tree_->LayerById(info->scrolls[i].layer_id); 870 Layer* layer = layer_tree_->LayerById(info->scrolls[i].layer_id);
871 if (!layer) 871 if (!layer)
872 continue; 872 continue;
873 layer->SetScrollOffsetFromImplSide(gfx::ScrollOffsetWithDelta( 873 layer->SetScrollOffsetFromImplSide(gfx::ScrollOffsetWithDelta(
874 layer->scroll_offset(), info->scrolls[i].scroll_delta)); 874 layer->scroll_offset(), info->scrolls[i].scroll_delta));
875 SetNeedsUpdateLayers(); 875 SetNeedsUpdateLayers();
876 } 876 }
877 for (size_t i = 0; i < info->scrollbars.size(); ++i) {
878 Layer* layer = layer_tree_->LayerById(info->scrollbars[i].layer_id);
879 if (!layer)
880 continue;
881 layer->SetScrollbarsHiddenFromImplSide(info->scrollbars[i].hidden);
882 }
877 } 883 }
878 884
879 // This needs to happen after scroll deltas have been sent to prevent top 885 // This needs to happen after scroll deltas have been sent to prevent top
880 // controls from clamping the layout viewport both on the compositor and 886 // controls from clamping the layout viewport both on the compositor and
881 // on the main thread. 887 // on the main thread.
882 ApplyViewportDeltas(info); 888 ApplyViewportDeltas(info);
883 } 889 }
884 890
885 const base::WeakPtr<InputHandler>& LayerTreeHostInProcess::GetInputHandler() 891 const base::WeakPtr<InputHandler>& LayerTreeHostInProcess::GetInputHandler()
886 const { 892 const {
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 1035
1030 debug_state_.FromProtobuf(proto.debug_state()); 1036 debug_state_.FromProtobuf(proto.debug_state());
1031 has_gpu_rasterization_trigger_ = proto.has_gpu_rasterization_trigger(); 1037 has_gpu_rasterization_trigger_ = proto.has_gpu_rasterization_trigger();
1032 content_is_suitable_for_gpu_rasterization_ = 1038 content_is_suitable_for_gpu_rasterization_ =
1033 proto.content_is_suitable_for_gpu_rasterization(); 1039 proto.content_is_suitable_for_gpu_rasterization();
1034 id_ = proto.id(); 1040 id_ = proto.id();
1035 next_commit_forces_redraw_ = proto.next_commit_forces_redraw(); 1041 next_commit_forces_redraw_ = proto.next_commit_forces_redraw();
1036 } 1042 }
1037 1043
1038 } // namespace cc 1044 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698