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 8d1acb0fd921de3457807fea646a0663891ac439..76442a99e572512aadba33fc6382472f83b9adf6 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
@@ -322,7 +322,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 |
@@ -720,7 +721,7 @@ bool PaintLayer::update3DTransformedDescendantStatus() |
return has3DTransform(); |
} |
-bool PaintLayer::updateLayerPosition() |
+void PaintLayer::updateLayerPosition() |
{ |
LayoutPoint localPoint; |
LayoutPoint inlineBoundingBoxOffset; // We don't put this into the Layer x/y for inlines, so we need to subtract it out when done. |
@@ -771,10 +772,8 @@ bool PaintLayer::updateLayerPosition() |
localPoint -= scrollOffset; |
} |
- bool positionOrOffsetChanged = false; |
if (layoutObject()->isInFlowPositioned()) { |
LayoutSize newOffset = layoutObject()->offsetForInFlowPosition(); |
- positionOrOffsetChanged = newOffset != m_offsetForInFlowPosition; |
m_offsetForInFlowPosition = newOffset; |
localPoint.move(m_offsetForInFlowPosition); |
} else { |
@@ -785,7 +784,6 @@ bool PaintLayer::updateLayerPosition() |
localPoint.moveBy(-inlineBoundingBoxOffset); |
if (m_location != localPoint) { |
- positionOrOffsetChanged = true; |
setNeedsRepaint(); |
} |
m_location = localPoint; |
@@ -793,7 +791,6 @@ bool PaintLayer::updateLayerPosition() |
#if ENABLE(ASSERT) |
m_needsPositionUpdate = false; |
#endif |
- return positionOrOffsetChanged; |
} |
TransformationMatrix PaintLayer::perspectiveTransform() const |