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

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

Issue 2334133002: [css-grid] Cache definite height detection (Closed)
Patch Set: New version using m_hasDefiniteLogicalHeight class member 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
Index: third_party/WebKit/Source/core/layout/LayoutGrid.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutGrid.h b/third_party/WebKit/Source/core/layout/LayoutGrid.h
index 2847078d6ca00f3b8cadac00ce3ff950d1126e8d..3e4c2a66480892282de83d22d0a9c18d7c05728d 100644
--- a/third_party/WebKit/Source/core/layout/LayoutGrid.h
+++ b/third_party/WebKit/Source/core/layout/LayoutGrid.h
@@ -220,6 +220,12 @@ private:
bool isOrthogonalChild(const LayoutBox&) const;
GridTrackSizingDirection flowAwareDirectionForChild(const LayoutBox&, GridTrackSizingDirection) const;
+ bool hasDefiniteLogicalHeight() const
jfernandez 2016/09/15 07:27:11 This method has the same name than the one defined
svillar 2016/09/15 08:02:22 Agree, do not use the same name, someone could be
Manuel Rego 2016/09/15 08:56:04 True, I'll change the name to cachedHasDefiniteLog
+ {
+ SECURITY_DCHECK(m_hasDefiniteLogicalHeight);
+ return m_hasDefiniteLogicalHeight.value();
svillar 2016/09/15 08:02:22 For caching like methods I think it's preferred so
svillar 2016/09/15 08:16:00 Beh, forget about this. We need to call it on ever
+ }
+
typedef Vector<Vector<GridCell>> GridRepresentation;
GridRepresentation m_grid;
bool m_gridIsDirty;
@@ -245,6 +251,8 @@ private:
std::unique_ptr<OrderedTrackIndexSet> m_autoRepeatEmptyColumns { nullptr };
std::unique_ptr<OrderedTrackIndexSet> m_autoRepeatEmptyRows { nullptr };
+
+ Optional<bool> m_hasDefiniteLogicalHeight;
};
DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid());

Powered by Google App Engine
This is Rietveld 408576698