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

Unified Diff: cc/trees/layer_tree_host_common.h

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.h
diff --git a/cc/trees/layer_tree_host_common.h b/cc/trees/layer_tree_host_common.h
index a3b261baa5887dccd2a58fe552816454eac4d9f5..a48a4cfa6b317742cfb121f66fde492fd1b0033f 100644
--- a/cc/trees/layer_tree_host_common.h
+++ b/cc/trees/layer_tree_host_common.h
@@ -28,6 +28,7 @@ namespace cc {
namespace proto {
class ScrollUpdateInfo;
+class ScrollbarsUpdateInfo;
class ScrollAndScaleSet;
}
@@ -142,7 +143,7 @@ class CC_EXPORT LayerTreeHostCommon {
struct CC_EXPORT ScrollUpdateInfo {
int layer_id;
// TODO(miletus): Use ScrollOffset once LayerTreeHost/Blink fully supports
- // franctional scroll offset.
+ // fractional scroll offset.
gfx::Vector2d scroll_delta;
ScrollUpdateInfo();
@@ -152,6 +153,19 @@ class CC_EXPORT LayerTreeHostCommon {
void ToProtobuf(proto::ScrollUpdateInfo* proto) const;
void FromProtobuf(const proto::ScrollUpdateInfo& proto);
};
+
+ struct CC_EXPORT ScrollbarsUpdateInfo {
+ int layer_id;
+ bool hidden;
+
+ ScrollbarsUpdateInfo();
+ ScrollbarsUpdateInfo(int layer_id, bool hidden);
+
+ bool operator==(const ScrollbarsUpdateInfo& other) const;
+
+ void ToProtobuf(proto::ScrollbarsUpdateInfo* proto) const;
+ void FromProtobuf(const proto::ScrollbarsUpdateInfo& proto);
+ };
};
struct CC_EXPORT ScrollAndScaleSet {
@@ -168,6 +182,7 @@ struct CC_EXPORT ScrollAndScaleSet {
float page_scale_delta;
gfx::Vector2dF elastic_overscroll_delta;
float top_controls_delta;
+ std::vector<LayerTreeHostCommon::ScrollbarsUpdateInfo> scrollbars;
std::vector<std::unique_ptr<SwapPromise>> swap_promises;
bool EqualsForTesting(const ScrollAndScaleSet& other) const;

Powered by Google App Engine
This is Rietveld 408576698