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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 2453553003: Disable overlay scrollbars in Blink when hidden by the compositor. (Closed)
Patch Set: Rebase Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_common.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common.cc
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index e6ea05ea39c0b1e6e8c07c45f982b830b76ecd5a..03676a352441f9bff4fc7726cfd1a9f4705e3e7c 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -184,6 +184,30 @@ void LayerTreeHostCommon::ScrollUpdateInfo::FromProtobuf(
scroll_delta = ProtoToVector2d(proto.scroll_delta());
}
+LayerTreeHostCommon::ScrollbarsUpdateInfo::ScrollbarsUpdateInfo()
+ : layer_id(Layer::INVALID_ID), hidden(true) {}
+
+LayerTreeHostCommon::ScrollbarsUpdateInfo::ScrollbarsUpdateInfo(int layer_id,
+ bool hidden)
+ : layer_id(layer_id), hidden(hidden) {}
+
+bool LayerTreeHostCommon::ScrollbarsUpdateInfo::operator==(
+ const LayerTreeHostCommon::ScrollbarsUpdateInfo& other) const {
+ return layer_id == other.layer_id && hidden == other.hidden;
+}
+
+void LayerTreeHostCommon::ScrollbarsUpdateInfo::ToProtobuf(
+ proto::ScrollbarsUpdateInfo* proto) const {
+ proto->set_layer_id(layer_id);
+ proto->set_hidden(hidden);
+}
+
+void LayerTreeHostCommon::ScrollbarsUpdateInfo::FromProtobuf(
+ const proto::ScrollbarsUpdateInfo& proto) {
+ layer_id = proto.layer_id();
+ hidden = proto.hidden();
+}
+
ScrollAndScaleSet::ScrollAndScaleSet()
: page_scale_delta(1.f), top_controls_delta(0.f) {
}
« no previous file with comments | « cc/trees/layer_tree_host_common.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698