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

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

Issue 2955843002: [LayoutNG] Make floats push line boxes down if no break opportunities can fit
Patch Set: Rebase Created 3 years, 5 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_layout_opportunity_iterator.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h b/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h
index 07c2a69ed30aac16e9a295b1cb754a9c1c6550ea..6144fa7c1037e94691739bfac125767c4906049d 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h
@@ -38,6 +38,12 @@ class CORE_EXPORT NGLayoutOpportunityIterator final {
const NGLogicalSize& available_size,
const NGLogicalOffset& offset);
+ // @return If there is no more opportunities to iterate.
+ // This also means that the last returned opportunity does not have
+ // exclusions, because the iterator adds an opportunity of the
+ // initial available size at the end.
+ bool IsAtEnd() const { return opportunity_iter_ == opportunities_.end(); }
+
// Gets the next Layout Opportunity or empty one if the search is exhausted.
// TODO(chrome-layout-team): Refactor with using C++ <iterator> library.
// TODO(glebl): Refactor the iterator to return unique_ptr here.

Powered by Google App Engine
This is Rietveld 408576698