Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp

Issue 2733633002: Handle nested position:sticky elements correctly (compositor) (Closed)
Patch Set: Addressed the easier reviewer comments. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 a241925f30d7005a06a2797d6c20320d986afadc..ee0edae79fb21b6d26ac00dedd72a1918f143df3 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp
@@ -232,20 +232,8 @@ bool CompositingReasonFinder::requiresCompositingForScrollDependentPosition(
if (layer->sticksToViewport())
return m_layoutView.frameView()->isScrollable();
- 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();
+ return layer->layoutObject().style()->position() == EPosition::kSticky &&
+ layer->ancestorOverflowLayer()->scrollsOverflow();
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698