Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
| index afd92778924c0f381ab4be208aa702b9a4622bf4..a5a91353ff317ef7dd1b90e841ed5250dbd71bc0 100644 |
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
| @@ -81,6 +81,7 @@ |
| #include "platform/wtf/CurrentTime.h" |
| #include "platform/wtf/text/StringBuilder.h" |
| #include "public/platform/WebLayerStickyPositionConstraint.h" |
| +#include "public/platform/WebScrollBoundaryBehavior.h" |
| namespace blink { |
| @@ -1139,11 +1140,27 @@ void CompositedLayerMapping::UpdateGraphicsLayerGeometry( |
| UpdateShouldFlattenTransform(); |
| UpdateChildrenTransform(); |
| UpdateScrollParent(ScrollParent()); |
| + UpdateScrollBoundaryBehavior(); |
| RegisterScrollingLayers(); |
| UpdateCompositingReasons(); |
| } |
| +void CompositedLayerMapping::UpdateScrollBoundaryBehavior() { |
| + EScrollBoundaryBehavior behavior_x = |
| + GetLayoutObject().StyleRef().ScrollBoundaryBehaviorX(); |
| + EScrollBoundaryBehavior behavior_y = |
| + GetLayoutObject().StyleRef().ScrollBoundaryBehaviorY(); |
| + if (scrolling_contents_layer_) { |
| + using ScrollBoundaryBehavior = |
| + WebScrollBoundaryBehavior::ScrollBoundaryBehaviorType; |
|
majidvp
2017/07/05 21:30:03
nit: I don't feel like this using declaration is h
sunyunjia
2017/07/14 02:59:01
Done.
|
| + scrolling_contents_layer_->SetScrollBoundaryBehavior( |
| + WebScrollBoundaryBehavior( |
| + static_cast<ScrollBoundaryBehavior>(behavior_x), |
| + static_cast<ScrollBoundaryBehavior>(behavior_y))); |
| + } |
| +} |
| + |
| void CompositedLayerMapping::UpdateMainGraphicsLayerGeometry( |
| const IntRect& relative_compositing_bounds, |
| const IntRect& local_compositing_bounds, |