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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h

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/ng_block_layout_algorithm.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
index 3c4aa9317466098e5e86cad2952bbdc70416d160..215cbc68c4d96174e66df45cd33701032d5290ef 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
@@ -43,7 +43,7 @@ class CORE_EXPORT NGBlockLayoutAlgorithm : public NGLayoutAlgorithm {
const NGConstraintSpace& space);
// Creates a new constraint space for the current child.
- NGConstraintSpace* CreateConstraintSpaceForChild(NGLayoutInputNode*);
+ RefPtr<NGConstraintSpace> CreateConstraintSpaceForChild(NGLayoutInputNode*);
void FinishChildLayout(NGLayoutInputNode*,
NGConstraintSpace*,
RefPtr<NGLayoutResult>);
@@ -71,13 +71,14 @@ class CORE_EXPORT NGBlockLayoutAlgorithm : public NGLayoutAlgorithm {
}
const NGConstraintSpace& ConstraintSpace() const {
+ DCHECK(constraint_space_);
return *constraint_space_;
}
const ComputedStyle& Style() const { return node_->Style(); }
Persistent<NGBlockNode> node_;
- Persistent<NGConstraintSpace> constraint_space_;
+ NGConstraintSpace* constraint_space_;
ikilpatrick 2017/03/02 17:20:15 Just a pointer as STACK_ALLOCATED(). Going to chan
// The break token from which we are currently resuming layout.
Persistent<NGBlockBreakToken> break_token_;

Powered by Google App Engine
This is Rietveld 408576698