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

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

Issue 1308273010: Adapt and reland old position sticky implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make sticky vertical ref tests expectations not dependent on font size. Created 4 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/paint/PaintLayerScrollableArea.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
index 5f441befd71e298a10e2d1941b88b298653d3530..6b5047416edd2d4e599a5c0b2fcbb4f5aa61b412 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -1234,6 +1234,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