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

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

Issue 1870663002: Reland main thread position sticky implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only descend into children which have an ancestor overflow layer. Created 4 years, 8 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/PaintLayerScrollableArea.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
index 5cbad74c0712eab45fc51f9d37312013da2bed2b..d30b32f104526f04e2ca1aeb9f5a9a17dd098964 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -1235,6 +1235,26 @@ void PaintLayerScrollableArea::updateResizerStyle()
}
}
+void PaintLayerScrollableArea::invalidateAllStickyConstraints()
+{
+ if (PaintLayerScrollableAreaRareData* d = rareData()) {
+ for (PaintLayer* stickyLayer : d->m_stickyConstraintsMap.keys()) {
+ if (stickyLayer->layoutObject()->style()->position() == StickyPosition)
+ stickyLayer->setNeedsCompositingInputsUpdate();
+ }
+ d->m_stickyConstraintsMap.clear();
+ }
+}
+
+void PaintLayerScrollableArea::invalidateStickyConstraintsFor(PaintLayer* layer, bool needsCompositingUpdate)
+{
+ if (PaintLayerScrollableAreaRareData* d = rareData()) {
+ d->m_stickyConstraintsMap.remove(layer);
+ if (needsCompositingUpdate && layer->layoutObject()->style()->position() == StickyPosition)
+ layer->setNeedsCompositingInputsUpdate();
+ }
+}
+
IntSize PaintLayerScrollableArea::offsetFromResizeCorner(const IntPoint& absolutePoint) const
{
// Currently the resize corner is either the bottom right corner or the bottom left corner.
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698