| 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 56800093787b87b15d1a160963068475c3f7b939..2fcb719cf2391cb6314855bb25ed5829f89577b8 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| @@ -673,9 +673,12 @@ void LayoutBox::scrollRectToVisible(const LayoutRect& rect,
|
| }
|
| }
|
|
|
| - // If we are fixed-position, it is useless to scroll the parent.
|
| - if (hasLayer() && layer()->scrollsWithViewport())
|
| + // If we are fixed-position and scroll with the viewport, it is useless to
|
| + // scroll the parent.
|
| + if (style()->position() == FixedPosition && hasLayer() &&
|
| + layer()->scrollsWithViewport()) {
|
| return;
|
| + }
|
|
|
| if (frame()->page()->autoscrollController().autoscrollInProgress())
|
| parentBox = enclosingScrollableBox();
|
|
|