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

Unified Diff: cc/layers/layer.cc

Issue 2769793002: Implement CSS: scroll-boundary-behavior (Closed)
Patch Set: update the tests Created 3 years, 6 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 21f7f0d4e4849ef987475bb891dbf2d71712308b..c5cc08dc661467efcd1c4d9b766177001b06effa 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -65,7 +65,9 @@ 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(
+ ScrollBoundaryBehavior::kScrollBoundaryBehaviorTypeAuto) {}
Layer::Inputs::~Inputs() {}
@@ -306,6 +308,14 @@ void Layer::SetBounds(const gfx::Size& size) {
SetNeedsCommit();
}
+void Layer::SetScrollBoundaryBehavior(const ScrollBoundaryBehavior& behavior) {
+ if (scroll_boundary_behavior() == behavior)
+ return;
+ inputs_.scroll_boundary_behavior = behavior;
ajuma 2017/06/30 20:46:49 This also needs to update the scroll node if there
sunyunjia 2017/07/14 02:59:00 Done.
+
+ SetNeedsCommit();
+}
+
Layer* Layer::RootLayer() {
Layer* layer = this;
while (layer->parent())
@@ -1204,6 +1214,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.

Powered by Google App Engine
This is Rietveld 408576698