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

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

Issue 2304493002: Ignore redundant calls to ScrollAnchor::save. (Closed)
Patch Set: add TODO; skip restore if !m_saved Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ScrollAnchor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e31506970d89bad86113bc54d997dcd68892a0ab..d2ac3eb187e743dabb9557b8785ae89fbba49ba2 100644
--- a/third_party/WebKit/Source/core/layout/ScrollAnchor.h
+++ b/third_party/WebKit/Source/core/layout/ScrollAnchor.h
@@ -110,6 +110,13 @@ private:
// change since the last layout. It is recomputed in save(), and used to
// suppress the adjustment in restore(). More at http://bit.ly/sanaclap.
bool m_scrollAnchorDisablingStyleChanged;
+
+ // True iff save has been called, and restore has not been called since
+ // the call to save. In this state, additional calls to save are ignored,
+ // to make things easier for multi-pass layout modes such as flexbox.
+ // TODO(skobes): explore anchoring at frame boundaries instead of layouts,
+ // which would allow this field to be removed.
+ bool m_saved;
};
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ScrollAnchor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698