| Index: third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp
|
| index d9d504bf573b63b0e753f78cd7ab3c20467d2b50..a241925f30d7005a06a2797d6c20320d986afadc 100644
|
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp
|
| @@ -231,8 +231,21 @@ bool CompositingReasonFinder::requiresCompositingForScrollDependentPosition(
|
| // container rather than the enclosing frame.
|
| if (layer->sticksToViewport())
|
| return m_layoutView.frameView()->isScrollable();
|
| - return layer->layoutObject().style()->position() == EPosition::kSticky &&
|
| - layer->ancestorOverflowLayer()->scrollsOverflow();
|
| +
|
| + if (layer->layoutObject().style()->position() != EPosition::kSticky)
|
| + return false;
|
| +
|
| + // Don't promote nested sticky elements; the compositor can't handle them.
|
| + // TODO(smcgruer): Add cc nested sticky support (http://crbug.com/672710)
|
| + PaintLayerScrollableArea* scrollableArea =
|
| + layer->ancestorOverflowLayer()->getScrollableArea();
|
| + DCHECK(scrollableArea->stickyConstraintsMap().contains(
|
| + const_cast<PaintLayer*>(layer)));
|
| +
|
| + return layer->ancestorOverflowLayer()->scrollsOverflow() &&
|
| + !scrollableArea->stickyConstraintsMap()
|
| + .at(const_cast<PaintLayer*>(layer))
|
| + .hasAncestorStickyElement();
|
| }
|
|
|
| } // namespace blink
|
|
|