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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.cc

Issue 2734923002: Add LayoutOpportunityIterator method to NGConstraintSpace (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/layout/ng/ng_layout_opportunity_iterator.h" 5 #include "core/layout/ng/ng_layout_opportunity_iterator.h"
6 6
7 #include "core/layout/ng/ng_constraint_space.h"
7 #include "core/layout/ng/ng_exclusion.h" 8 #include "core/layout/ng/ng_exclusion.h"
8 #include "wtf/NonCopyingSort.h" 9 #include "wtf/NonCopyingSort.h"
9 10
10 namespace blink { 11 namespace blink {
11 namespace { 12 namespace {
12 13
13 // Collects all opportunities from leaves of Layout Opportunity spatial tree. 14 // Collects all opportunities from leaves of Layout Opportunity spatial tree.
14 void CollectAllOpportunities(const NGLayoutOpportunityTreeNode* node, 15 void CollectAllOpportunities(const NGLayoutOpportunityTreeNode* node,
15 NGLayoutOpportunities& opportunities) { 16 NGLayoutOpportunities& opportunities) {
16 if (!node) 17 if (!node)
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 270
270 const NGLayoutOpportunity NGLayoutOpportunityIterator::Next() { 271 const NGLayoutOpportunity NGLayoutOpportunityIterator::Next() {
271 if (opportunity_iter_ == opportunities_.end()) 272 if (opportunity_iter_ == opportunities_.end())
272 return NGLayoutOpportunity(); 273 return NGLayoutOpportunity();
273 auto* opportunity = opportunity_iter_; 274 auto* opportunity = opportunity_iter_;
274 opportunity_iter_++; 275 opportunity_iter_++;
275 return NGLayoutOpportunity(*opportunity); 276 return NGLayoutOpportunity(*opportunity);
276 } 277 }
277 278
278 } // namespace blink 279 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698