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

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

Issue 2438313003: [LayoutNG] Remove derived constraint spaces from opportunity iterator. (Closed)
Patch Set: address comments. Created 4 years, 2 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 e3f3c33d3533919351579f90fa7edabf74dad072..e71fffaf89368d3e4a16bb6eeca86c3fd9ce2be3 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
@@ -15,11 +15,11 @@
namespace blink {
-typedef const NGConstraintSpace NGLayoutOpportunity;
-typedef HeapVector<Member<const NGLayoutOpportunity>> NGLayoutOpportunities;
+typedef NGLogicalRect NGLayoutOpportunity;
+typedef Vector<NGLayoutOpportunity> NGLayoutOpportunities;
class CORE_EXPORT NGLayoutOpportunityIterator final
- : public GarbageCollected<NGLayoutOpportunityIterator> {
+ : public GarbageCollectedFinalized<NGLayoutOpportunityIterator> {
public:
NGLayoutOpportunityIterator(NGConstraintSpace* space,
unsigned clear,
@@ -27,11 +27,10 @@ class CORE_EXPORT NGLayoutOpportunityIterator final
// Gets the next Layout Opportunity or nullptr if the search is exhausted.
// TODO(chrome-layout-team): Refactor with using C++ <iterator> library.
- NGLayoutOpportunity* Next();
+ const NGLayoutOpportunity Next();
DEFINE_INLINE_VIRTUAL_TRACE() {
visitor->trace(constraint_space_);
- visitor->trace(opportunities_);
visitor->trace(opportunity_tree_root_);
}
@@ -49,7 +48,7 @@ class CORE_EXPORT NGLayoutOpportunityIterator final
Member<NGConstraintSpace> constraint_space_;
NGLayoutOpportunities opportunities_;
- Vector<Member<NGLayoutOpportunity>>::const_iterator opportunity_iter_;
+ NGLayoutOpportunities::const_iterator opportunity_iter_;
Member<NGLayoutOpportunityTreeNode> opportunity_tree_root_;
};

Powered by Google App Engine
This is Rietveld 408576698