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

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

Issue 2519263002: [layout-ng] Convert ng_block_layout_algorithm to yield to the coordinator (Closed)
Patch Set: sync to head Created 4 years 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 e7e7375c0f782bdc9493165c529d4ba7f5a46730..c9c4a70c2e97db625bc267c1c139466480fe944b 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
@@ -36,7 +36,7 @@ class CORE_EXPORT NGBlockLayoutAlgorithm : public NGLayoutAlgorithm {
NGConstraintSpace* space,
NGBreakToken* break_token = nullptr);
- NGLayoutStatus Layout(NGFragmentBase*,
+ NGLayoutStatus Layout(NGPhysicalFragmentBase*,
NGPhysicalFragmentBase**,
NGLayoutAlgorithm**) override;
@@ -45,7 +45,7 @@ class CORE_EXPORT NGBlockLayoutAlgorithm : public NGLayoutAlgorithm {
private:
// Creates a new constraint space for the current child.
NGConstraintSpace* CreateConstraintSpaceForCurrentChild() const;
- bool LayoutCurrentChild();
+ void FinishCurrentChildLayout(NGFragmentBase* fragment);
// Computes collapsed margins for 2 adjoining blocks and updates the resultant
// fragment's MarginStrut if needed.
@@ -98,7 +98,12 @@ class CORE_EXPORT NGBlockLayoutAlgorithm : public NGLayoutAlgorithm {
const ComputedStyle& Style() const { return *style_; }
- enum State { kStateInit, kStateChildLayout, kStateFinalize };
+ enum State {
+ kStateInit,
+ kStatePrepareForChildLayout,
+ kStateChildLayout,
+ kStateFinalize
+ };
State state_;
RefPtr<const ComputedStyle> style_;
« no previous file with comments | « third_party/WebKit/Source/core/layout/BUILD.gn ('k') | third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698