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. |