| Index: third_party/WebKit/Source/core/dom/Document.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
|
| index 4c5698d9b2f75ecd9beedc41ca75cfde121445cf..ca0f30059cb543f8748d60c12659137f331237f2 100644
|
| --- a/third_party/WebKit/Source/core/dom/Document.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp
|
| @@ -203,6 +203,7 @@
|
| #include "core/page/FrameTree.h"
|
| #include "core/page/Page.h"
|
| #include "core/page/PointerLockController.h"
|
| +#include "core/page/scrolling/OverscrollController.h"
|
| #include "core/page/scrolling/RootScrollerController.h"
|
| #include "core/page/scrolling/ScrollStateCallback.h"
|
| #include "core/page/scrolling/ScrollingCoordinator.h"
|
| @@ -1940,6 +1941,16 @@ void Document::InheritHtmlAndBodyElementStyles(StyleRecalcChange change) {
|
|
|
| ScrollSnapType snap_type = overflow_style->GetScrollSnapType();
|
| const LengthPoint& snap_destination = overflow_style->ScrollSnapDestination();
|
| + EScrollBoundaryBehavior scroll_boundary_behavior_x =
|
| + overflow_style->ScrollBoundaryBehaviorX();
|
| + EScrollBoundaryBehavior scroll_boundary_behavior_y =
|
| + overflow_style->ScrollBoundaryBehaviorY();
|
| + using ScrollBoundaryBehaviorType =
|
| + WebScrollBoundaryBehavior::ScrollBoundaryBehaviorType;
|
| + GetPage()->GetOverscrollController().SetScrollBoundaryBehavior(
|
| + WebScrollBoundaryBehavior(
|
| + static_cast<ScrollBoundaryBehaviorType>(scroll_boundary_behavior_x),
|
| + static_cast<ScrollBoundaryBehaviorType>(scroll_boundary_behavior_y)));
|
|
|
| RefPtr<ComputedStyle> document_style = GetLayoutViewItem().MutableStyle();
|
| if (document_style->GetWritingMode() != root_writing_mode ||
|
| @@ -1953,7 +1964,9 @@ void Document::InheritHtmlAndBodyElementStyles(StyleRecalcChange change) {
|
| document_style->OverflowY() != overflow_y ||
|
| document_style->ColumnGap() != column_gap ||
|
| document_style->GetScrollSnapType() != snap_type ||
|
| - document_style->ScrollSnapDestination() != snap_destination) {
|
| + document_style->ScrollSnapDestination() != snap_destination ||
|
| + document_style->ScrollBoundaryBehaviorX() != scroll_boundary_behavior_x ||
|
| + document_style->ScrollBoundaryBehaviorY() != scroll_boundary_behavior_y) {
|
| RefPtr<ComputedStyle> new_style = ComputedStyle::Clone(*document_style);
|
| new_style->SetWritingMode(root_writing_mode);
|
| new_style->SetDirection(root_direction);
|
| @@ -1966,6 +1979,8 @@ void Document::InheritHtmlAndBodyElementStyles(StyleRecalcChange change) {
|
| new_style->SetColumnGap(column_gap);
|
| new_style->SetScrollSnapType(snap_type);
|
| new_style->SetScrollSnapDestination(snap_destination);
|
| + new_style->SetScrollBoundaryBehaviorX(scroll_boundary_behavior_x);
|
| + new_style->SetScrollBoundaryBehaviorY(scroll_boundary_behavior_y);
|
| GetLayoutViewItem().SetStyle(new_style);
|
| SetupFontBuilder(*new_style);
|
| }
|
|
|