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

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

Issue 2286403004: [LayoutNG] Initial NGLayoutOpportunityIterator implementation (Closed)
Patch Set: Fix typo Created 4 years, 4 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_constraint_space.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc
index fe00b9a702e875f4a9318cbfad5a38faf161c795..79dfe7ea91f743e459c61635b72f3a3a67a27dca 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc
@@ -81,7 +81,6 @@ void NGConstraintSpace::Subtract(const NGFragment*) {
NGLayoutOpportunityIterator NGConstraintSpace::LayoutOpportunities(
unsigned clear,
bool for_inline_or_bfc) {
- // TODO(layout-ng): Implement.
NGLayoutOpportunityIterator iterator(this, clear, for_inline_or_bfc);
return iterator;
}
@@ -131,4 +130,12 @@ void NGConstraintSpace::SetFragmentationType(NGFragmentationType type) {
}
}
+NGConstraintSpace* NGLayoutOpportunityIterator::Next() {
+ auto* exclusions = constraint_space_->PhysicalSpace()->Exclusions();
+ if (!exclusions->head())
+ return new NGConstraintSpace(constraint_space_->WritingMode(),
+ constraint_space_->PhysicalSpace());
+ return nullptr;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698