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 9bb04a993e62ab288ebeb0f8cc56f97fcd5c7f9d..e153ccf0f34b2f3620ca35fdab86cfc7341012be 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
@@ -1008,6 +1008,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 0; |
bokan
2016/10/24 14:11:29
nit: return nullptr
|
+ } |
+ |
if (!layoutObject->parent() && |
layoutObject->node() == layoutObject->document() && |
layoutObject->document().localOwner()) |