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

Unified Diff: third_party/WebKit/Source/core/layout/ScrollAnchor.h

Issue 2245873002: Disable anchoring if ancestor changes padding or margin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/layout/ScrollAnchor.h
diff --git a/third_party/WebKit/Source/core/layout/ScrollAnchor.h b/third_party/WebKit/Source/core/layout/ScrollAnchor.h
index 06ccf0bd6c38fe1c9c4bb7ce0a14c61aa18f2ae0..a6621ac29ecd76fa49942121ffb8f57f1892f512 100644
--- a/third_party/WebKit/Source/core/layout/ScrollAnchor.h
+++ b/third_party/WebKit/Source/core/layout/ScrollAnchor.h
@@ -66,6 +66,8 @@ public:
private:
void findAnchor();
+ bool paddingOrBorderChanged() const;
+
enum WalkStatus {
Skip = 0,
Constrain,
@@ -132,6 +134,10 @@ private:
// Number of adjustments made since the last clear().
int m_adjustmentCount;
+
+ // Whether any of the ancestors had their border/padding modified in the
+ // layout pass that triggered scroll anchoring.
+ bool m_anyAncestorChangedPaddingOrMargin;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.h ('k') | third_party/WebKit/Source/core/layout/ScrollAnchor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698