| Index: third_party/WebKit/Source/core/frame/FrameView.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| index 5da4872eb103abb7749faa4eaa3bf5719b998f62..9c2a250fdc0917d248438f7d1e7bfd841be0f1ef 100644
|
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| @@ -2592,7 +2592,7 @@ IntRect FrameView::scrollableAreaBoundingBox() const {
|
| .enclosingBoundingBox();
|
| }
|
|
|
| -bool FrameView::isScrollable() {
|
| +bool FrameView::isScrollable() const {
|
| return getScrollingReasons() == Scrollable;
|
| }
|
|
|
| @@ -2634,6 +2634,9 @@ FrameView::ScrollingReasons FrameView::getScrollingReasons() const {
|
| }
|
|
|
| void FrameView::updateParentScrollableAreaSet() {
|
| + if (RuntimeEnabledFeatures::rootLayerScrollingEnabled())
|
| + return;
|
| +
|
| // That ensures that only inner frames are cached.
|
| FrameView* parentFrameView = this->parentFrameView();
|
| if (!parentFrameView)
|
| @@ -3659,7 +3662,8 @@ void FrameView::setParent(Widget* parentView) {
|
| void FrameView::removeChild(Widget* child) {
|
| ASSERT(child->parent() == this);
|
|
|
| - if (child->isFrameView())
|
| + if (child->isFrameView() &&
|
| + !RuntimeEnabledFeatures::rootLayerScrollingEnabled())
|
| removeScrollableArea(toFrameView(child));
|
|
|
| child->setParent(0);
|
| @@ -4888,15 +4892,20 @@ void FrameView::updateSubFrameScrollOnMainReason(
|
| return;
|
|
|
| reasons |= toLocalFrame(frame).view()->mainThreadScrollingReasonsPerFrame();
|
| - if (WebLayer* scrollLayer =
|
| - toLocalFrame(frame).view()->layerForScrolling()->platformLayer()) {
|
| - if (reasons) {
|
| - scrollLayer->addMainThreadScrollingReasons(reasons);
|
| - } else {
|
| - // Clear all main thread scrolling reasons except the one that's set
|
| - // if there is a running scroll animation.
|
| - scrollLayer->clearMainThreadScrollingReasons(
|
| - ~MainThreadScrollingReason::kHandlingScrollFromMainThread);
|
| + if (GraphicsLayer* layerForScrolling = toLocalFrame(frame)
|
| + .view()
|
| + ->layoutViewportScrollableArea()
|
| + ->layerForScrolling()) {
|
| + if (WebLayer* platformLayerForScrolling =
|
| + layerForScrolling->platformLayer()) {
|
| + if (reasons) {
|
| + platformLayerForScrolling->addMainThreadScrollingReasons(reasons);
|
| + } else {
|
| + // Clear all main thread scrolling reasons except the one that's set
|
| + // if there is a running scroll animation.
|
| + platformLayerForScrolling->clearMainThreadScrollingReasons(
|
| + ~MainThreadScrollingReason::kHandlingScrollFromMainThread);
|
| + }
|
| }
|
| }
|
|
|
|
|