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

Unified Diff: third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc

Issue 2724133003: [LayoutNG] Switch NGConstraintSpace to being RefCounted. (Closed)
Patch Set: moar. Created 3 years, 10 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/ng/layout_ng_block_flow.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc b/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
index 7eb001cca76aa9e5e24e4945cd80be64794b6bc2..bcfe05417fb3cb2000ac27b23972a769be8b5c16 100644
--- a/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
+++ b/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
@@ -20,14 +20,15 @@ bool LayoutNGBlockFlow::isOfType(LayoutObjectType type) const {
void LayoutNGBlockFlow::layoutBlock(bool relayoutChildren) {
LayoutAnalyzer::BlockScope analyzer(*this);
- auto* constraint_space = NGConstraintSpace::CreateFromLayoutObject(*this);
+ RefPtr<NGConstraintSpace> constraint_space =
+ NGConstraintSpace::CreateFromLayoutObject(*this);
// TODO(layout-dev): This should be created in the constructor once instead.
// There is some internal state which needs to be cleared between layout
// passes (probably FirstChild(), etc).
m_box = new NGBlockNode(this);
- RefPtr<NGLayoutResult> result = m_box->Layout(constraint_space);
+ RefPtr<NGLayoutResult> result = m_box->Layout(constraint_space.get());
if (isOutOfFlowPositioned()) {
// In legacy layout, abspos differs from regular blocks in that abspos

Powered by Google App Engine
This is Rietveld 408576698