Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp |
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
index df78365393faacbab2f35a6ed4511e6587ff8dec..c978fab710cdb86aec27f815c57684efc87fb086 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
@@ -314,7 +314,8 @@ void PaintLayer::dirtyAncestorChainHasSelfPaintingLayerDescendantStatus() |
bool PaintLayer::scrollsWithViewport() const |
{ |
- return layoutObject()->style()->position() == FixedPosition && layoutObject()->containerForFixedPosition() == layoutObject()->view(); |
+ return (layoutObject()->style()->position() == FixedPosition && layoutObject()->containerForFixedPosition() == layoutObject()->view()) |
+ || (layoutObject()->style()->position() == StickyPosition && !ancestorScrollingLayer()); |
} |
bool PaintLayer::scrollsWithRespectTo(const PaintLayer* other) const |