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

Unified Diff: third_party/WebKit/Source/core/paint/DeprecatedPaintLayer.cpp

Issue 1308273010: Adapt and reland old position sticky implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move compositor plumbing into a separate review. Created 5 years, 3 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/paint/DeprecatedPaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/DeprecatedPaintLayer.cpp b/third_party/WebKit/Source/core/paint/DeprecatedPaintLayer.cpp
index dbb7a96f043b03c69d120f701f0b22a8722d8b4f..af747f57a22e8f8b8991246de7d3153dd25ea28e 100644
--- a/third_party/WebKit/Source/core/paint/DeprecatedPaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/DeprecatedPaintLayer.cpp
@@ -313,7 +313,8 @@ void DeprecatedPaintLayer::dirtyAncestorChainHasSelfPaintingLayerDescendantStatu
bool DeprecatedPaintLayer::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 DeprecatedPaintLayer::scrollsWithRespectTo(const DeprecatedPaintLayer* other) const

Powered by Google App Engine
This is Rietveld 408576698