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

Unified Diff: cc/layers/layer.cc

Issue 2769793002: Implement CSS: scroll-boundary-behavior (Closed)
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/chromium/src into scroll-boundary Created 3 years, 9 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/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 223fc65c0c1b7f3d295d643ee26d871de324e14f..b2a1aa137ca76af0de1024dde1bc0fceab2d78a3 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -64,7 +64,8 @@ Layer::Inputs::Inputs(int layer_id)
clip_parent(nullptr),
has_will_change_transform_hint(false),
hide_layer_and_subtree(false),
- client(nullptr) {}
+ client(nullptr),
+ scroll_boundary_behavior(SCROLL_BOUNDARY_BEHAVIOR_PROPAGATE) {}
Layer::Inputs::~Inputs() {}
@@ -310,6 +311,14 @@ void Layer::SetBounds(const gfx::Size& size) {
SetNeedsCommit();
}
+void Layer::SetScrollBoundaryBehavior(ScrollBoundaryBehavior behavior) {
+ if (scrollBoundaryBehavior() == behavior)
+ return;
+ inputs_.scroll_boundary_behavior = behavior;
+
+ SetNeedsCommit();
+}
+
Layer* Layer::RootLayer() {
Layer* layer = this;
while (layer->parent())
@@ -1190,6 +1199,7 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
layer->SetUpdateRect(inputs_.update_rect);
layer->SetHasWillChangeTransformHint(has_will_change_transform_hint());
+ layer->SetScrollBoundaryBehavior(inputs_.scroll_boundary_behavior);
layer->SetNeedsPushProperties();
// Reset any state that should be cleared for the next update.
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | cc/layers/layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698