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

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 with master (removing horizontal-bt test) Created 5 years 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 71c699920159b8cfb6b664a842bb261c24c6ff37..ac0bd10ab0671bdd44b2ec5cab3e485744b91333 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -314,7 +314,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
@@ -324,6 +325,11 @@ bool PaintLayer::scrollsWithRespectTo(const PaintLayer* other) const
return ancestorScrollingLayer() != other->ancestorScrollingLayer();
}
+void PaintLayer::updateLayerPositionAfterFrameScroll(const DoubleSize& scrollDelta)
chrishtr 2015/12/09 00:37:38 What's the point of declaring a new method with an
flackr 2015/12/10 23:43:15 I was trying to be consistent with the other metho
+{
+ updateLayerPosition();
+}
+
void PaintLayer::updateLayerPositionsAfterOverflowScroll(const DoubleSize& scrollDelta)
{
m_clipper.clearClipRectsIncludingDescendants();

Powered by Google App Engine
This is Rietveld 408576698