| Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| index f9e9c1e7acdc96ee82cd141590d4d6d39b267ada..ccef006b1f6c036b15470d427d2a0ec196111ebe 100644
|
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| @@ -302,6 +302,16 @@ void CompositedLayerMapping::updateStickyConstraints(
|
| const StickyPositionScrollingConstraints& constraints =
|
| ancestorOverflowLayer->getScrollableArea()->stickyConstraintsMap().get(
|
| &m_owningLayer);
|
| +
|
| + // Find the layout offset of the unshifted sticky box within its enclosing layer.
|
| + LayoutPoint enclosingLayerOffset;
|
| + m_owningLayer.enclosingLayerWithCompositedLayerMapping(ExcludeSelf)
|
| + ->convertToLayerCoords(m_owningLayer.ancestorOverflowLayer(),
|
| + enclosingLayerOffset);
|
| + FloatPoint stickyBoxOffset =
|
| + constraints.scrollContainerRelativeStickyBoxRect().location();
|
| + stickyBoxOffset.moveBy(FloatPoint(-enclosingLayerOffset));
|
| +
|
| webConstraint.isSticky = true;
|
| webConstraint.isAnchoredLeft =
|
| constraints.anchorEdges() &
|
| @@ -319,6 +329,8 @@ void CompositedLayerMapping::updateStickyConstraints(
|
| webConstraint.rightOffset = constraints.rightOffset();
|
| webConstraint.topOffset = constraints.topOffset();
|
| webConstraint.bottomOffset = constraints.bottomOffset();
|
| + webConstraint.parentRelativeStickyBoxOffset =
|
| + roundedIntPoint(stickyBoxOffset);
|
| webConstraint.scrollContainerRelativeStickyBoxRect =
|
| enclosingIntRect(constraints.scrollContainerRelativeStickyBoxRect());
|
| webConstraint.scrollContainerRelativeContainingBlockRect = enclosingIntRect(
|
|
|