| 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 d5405dc977d6bbf3aa9568b0be0ba97b6bf8ac49..76b13050aa1763c36d32a372dbdc3ad818bcfead 100644
|
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| @@ -2596,7 +2596,7 @@ IntRect FrameView::scrollableAreaBoundingBox() const {
|
| .enclosingBoundingBox();
|
| }
|
|
|
| -bool FrameView::isScrollable() {
|
| +bool FrameView::isScrollable() const {
|
| return getScrollingReasons() == Scrollable;
|
| }
|
|
|
| @@ -2638,6 +2638,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)
|
| @@ -3663,7 +3666,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);
|
| @@ -4873,15 +4877,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);
|
| + }
|
| }
|
| }
|
|
|
|
|