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

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

Issue 1308273010: Adapt and reland old position sticky implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Merge and attempt to fix base URL Created 5 years, 2 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/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index 15b0c804d92e667f0293f6a0ff79ef431b90714e..ee47316918cae73553ad5c91d7d887d57d7076f5 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -313,7 +313,8 @@ void PaintLayer::dirtyAncestorChainHasSelfPaintingLayerDescendantStatus()
bool PaintLayer::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 PaintLayer::scrollsWithRespectTo(const PaintLayer* other) const
@@ -323,6 +324,11 @@ bool PaintLayer::scrollsWithRespectTo(const PaintLayer* other) const
return ancestorScrollingLayer() != other->ancestorScrollingLayer();
}
+void PaintLayer::updateLayerPositionAfterFrameScroll(const DoubleSize& scrollDelta)
+{
+ updateLayerPosition();
+}
+
void PaintLayer::updateLayerPositionsAfterOverflowScroll(const DoubleSize& scrollDelta)
{
m_clipper.clearClipRectsIncludingDescendants();

Powered by Google App Engine
This is Rietveld 408576698