Chromium Code Reviews| 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 13ad90d19de26da9a0d2cb6928d177f0892fa477..dc1d92cc4b4080470ab9199fa82a76b4c95fed4a 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
| @@ -339,11 +339,26 @@ void PaintLayer::dirtyAncestorChainHasSelfPaintingLayerDescendantStatus() { |
| } |
| bool PaintLayer::scrollsWithViewport() const { |
| - return (layoutObject()->style()->position() == FixedPosition && |
| - layoutObject()->containerForFixedPosition() == |
| - layoutObject()->view()) || |
| - (layoutObject()->style()->position() == StickyPosition && |
| - !ancestorScrollingLayer()); |
| + if (layoutObject()->style()->position() == FixedPosition && |
|
pdr.
2016/12/06 04:38:51
Can you move the spv2 codepath outside like so?
if
chrishtr
2016/12/06 23:56:06
This isn't quite right, because the method should
|
| + layoutObject()->containerForFixedPosition() == layoutObject()->view()) |
| + return true; |
| + if (layoutObject()->style()->position() == StickyPosition) { |
| + if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { |
| + DCHECK(layoutObject()->paintProperties()); |
| + return layoutObject() |
| + ->paintProperties() |
| + ->localBorderBoxProperties() |
| + ->propertyTreeState.scroll() == |
| + layoutObject() |
| + ->view() |
| + ->paintProperties() |
| + ->contentsProperties() |
| + .propertyTreeState.scroll(); |
| + } else { |
| + return !ancestorScrollingLayer(); |
| + } |
| + } |
| + return false; |
| } |
| bool PaintLayer::scrollsWithRespectTo(const PaintLayer* other) const { |