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

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

Issue 2930963002: [LayoutNG] Refactor of NGLineBreaker. (Closed)
Patch Set: rebase Created 3 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8d088bf6b320a3bda06a7a4b432f74b4821e770c..59a32a267d923f1e19c011951ce26be508b7c3bc 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
@@ -7,7 +7,6 @@
#include "core/layout/LayoutBlock.h"
#include "core/layout/LayoutView.h"
#include "core/layout/ng/ng_constraint_space_builder.h"
-#include "core/layout/ng/ng_layout_opportunity_iterator.h"
namespace blink {
@@ -50,8 +49,7 @@ NGConstraintSpace::NGConstraintSpace(
margin_strut_(margin_strut),
bfc_offset_(bfc_offset),
exclusions_(exclusions),
- clearance_offset_(clearance_offset),
- layout_opp_iter_(nullptr) {
+ clearance_offset_(clearance_offset) {
unpositioned_floats_.swap(unpositioned_floats);
}
@@ -130,26 +128,12 @@ RefPtr<NGConstraintSpace> NGConstraintSpace::CreateFromLayoutObject(
void NGConstraintSpace::AddExclusion(const NGExclusion& exclusion) {
exclusions_->Add(exclusion);
- // Invalidate the Layout Opportunity Iterator.
- layout_opp_iter_.reset();
}
NGFragmentationType NGConstraintSpace::BlockFragmentationType() const {
return static_cast<NGFragmentationType>(block_direction_fragmentation_type_);
}
-NGLayoutOpportunityIterator* NGConstraintSpace::LayoutOpportunityIterator(
- const NGLogicalOffset& iter_offset) {
- if (layout_opp_iter_ && layout_opp_iter_->Offset() != iter_offset)
- layout_opp_iter_.reset();
-
- if (!layout_opp_iter_) {
- layout_opp_iter_ = WTF::MakeUnique<NGLayoutOpportunityIterator>(
- Exclusions().get(), AvailableSize(), iter_offset);
- }
- return layout_opp_iter_.get();
-}
-
bool NGConstraintSpace::operator==(const NGConstraintSpace& other) const {
// TODO(cbiesinger): For simplicity and performance, for now, we only
// consider two constraint spaces equal if neither one has unpositioned
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698