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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 2453553003: Disable overlay scrollbars in Blink when hidden by the compositor. (Closed)
Patch Set: 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
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 7f0bf2500360f358be9389dd7c76b20ff61463c9..f3f86443063dbd7ebdf96082497067fcae982a36 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) {
}

Powered by Google App Engine
This is Rietveld 408576698