Chromium Code Reviews| Index: Source/core/paint/DeprecatedPaintLayer.cpp |
| diff --git a/Source/core/paint/DeprecatedPaintLayer.cpp b/Source/core/paint/DeprecatedPaintLayer.cpp |
| index 561020b810667e0304e8f6c13af08d4f3a715cec..f62aae8c10dbe6299fbe966773f6e5e8268f10b4 100644 |
| --- a/Source/core/paint/DeprecatedPaintLayer.cpp |
| +++ b/Source/core/paint/DeprecatedPaintLayer.cpp |
| @@ -313,7 +313,16 @@ void DeprecatedPaintLayer::dirtyAncestorChainHasSelfPaintingLayerDescendantStatu |
| bool DeprecatedPaintLayer::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 DeprecatedPaintLayer::scrollsWithScrollAncestor() const |
| +{ |
| + // TODO(flackr): This could check if the ancestor scroller for this layer is scrollable and |
| + // composited but this would need to be determined before the composite phase as it's used |
| + // as a compositing reason. |
|
flackr
2015/09/15 21:13:11
Is there an easy way to check the scroll ancestor
|
| + return layoutObject()->style()->position() == StickyPosition; |
| } |
| bool DeprecatedPaintLayer::scrollsWithRespectTo(const DeprecatedPaintLayer* other) const |