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 b5b1f61f18e55984c8d0aff52600ebfce8eb656f..320618d6440c0849c6996760849f45dd126ee165 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
@@ -354,7 +354,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 |
@@ -753,7 +754,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. |
@@ -804,10 +805,8 @@ bool PaintLayer::updateLayerPosition() |
localPoint -= scrollOffset; |
} |
- bool positionOrOffsetChanged = false; |
if (layoutObject()->isInFlowPositioned()) { |
LayoutSize newOffset = layoutObject()->offsetForInFlowPosition(); |
- positionOrOffsetChanged = newOffset != offsetForInFlowPosition(); |
if (m_rareData || !newOffset.isZero()) |
ensureRareData().offsetForInFlowPosition = newOffset; |
localPoint.move(newOffset); |
@@ -819,7 +818,6 @@ bool PaintLayer::updateLayerPosition() |
localPoint.moveBy(-inlineBoundingBoxOffset); |
if (m_location != localPoint) { |
- positionOrOffsetChanged = true; |
setNeedsRepaint(); |
} |
m_location = localPoint; |
@@ -827,7 +825,6 @@ bool PaintLayer::updateLayerPosition() |
#if ENABLE(ASSERT) |
m_needsPositionUpdate = false; |
#endif |
- return positionOrOffsetChanged; |
} |
TransformationMatrix PaintLayer::perspectiveTransform() const |