| Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| index 515cacad14698660e7c442b3bbd0d9c8a45405f9..309a961cfdeb756a4821fe34e31ee6ad0c4ebaab 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| @@ -1042,6 +1042,12 @@ LayoutBox* LayoutBox::findAutoscrollable(LayoutObject* layoutObject) {
|
| while (
|
| layoutObject &&
|
| !(layoutObject->isBox() && toLayoutBox(layoutObject)->canAutoscroll())) {
|
| + // Do not start autoscroll when the node is inside a fixed-position element.
|
| + if (layoutObject->isBox() && toLayoutBox(layoutObject)->hasLayer() &&
|
| + toLayoutBox(layoutObject)->layer()->scrollsWithViewport()) {
|
| + return nullptr;
|
| + }
|
| +
|
| if (!layoutObject->parent() &&
|
| layoutObject->node() == layoutObject->document() &&
|
| layoutObject->document().localOwner())
|
| @@ -1050,7 +1056,8 @@ LayoutBox* LayoutBox::findAutoscrollable(LayoutObject* layoutObject) {
|
| layoutObject = layoutObject->parent();
|
| }
|
|
|
| - return layoutObject && layoutObject->isBox() ? toLayoutBox(layoutObject) : 0;
|
| + return layoutObject && layoutObject->isBox() ? toLayoutBox(layoutObject)
|
| + : nullptr;
|
| }
|
|
|
| static inline int adjustedScrollDelta(int beginningDelta) {
|
|
|