| Index: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
|
| index b14965cd8942153e182585d74d747d5b054ab45a..6488bb360cb8499efb3e8b20add03621c600852d 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
|
| @@ -33,6 +33,7 @@
|
| #include "core/layout/LayoutFlexibleBox.h"
|
| #include "core/layout/LayoutGeometryMap.h"
|
| #include "core/layout/LayoutInline.h"
|
| +#include "core/layout/LayoutTableCell.h"
|
| #include "core/layout/LayoutView.h"
|
| #include "core/layout/compositing/CompositedLayerMapping.h"
|
| #include "core/layout/compositing/PaintLayerCompositor.h"
|
| @@ -988,10 +989,19 @@ void LayoutBoxModelObject::UpdateStickyPositionConstraints() const {
|
| // nested position:sticky elements between themselves and their
|
| // containingBlock, and between the containingBlock and their scrollAncestor.
|
| //
|
| - // The respective search ranges are [container, containingBlock) and
|
| + // The respective search ranges are [locationContainer, containingBlock) and
|
| // [containingBlock, scrollAncestor).
|
| +
|
| + // Table cells are a special case; Blink ignores them for locationContainer()
|
| + // purposes, but their sticky offset does affect descendant sticky objects.
|
| + // TODO(smcgruer): Remove cell override once Blink supports the correct
|
| + // locationContainer for CSS 3.
|
| + LayoutObject* location_container_for_sticky =
|
| + IsTableCell() ? ToLayoutTableCell(this)->Row() : location_container;
|
| +
|
| constraints.SetNearestStickyBoxShiftingStickyBox(
|
| - FindFirstStickyBetween(location_container, containing_block));
|
| + FindFirstStickyBetween(location_container_for_sticky, containing_block));
|
| +
|
| // We cannot use |scrollAncestor| here as it disregards the root
|
| // ancestorOverflowLayer(), which we should include.
|
| constraints.SetNearestStickyBoxShiftingContainingBlock(FindFirstStickyBetween(
|
|
|