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

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

Issue 2739683006: Use Opportunity Iterator to position text fragments in NGLineBuilder (Closed)
Patch Set: add font-family 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 side-by-side diff with in-line comments
Download patch
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 95a0349a1a5ed1763920ffad5805b716bcb2192d..1b6669bdac36660df90020fb506c8dd8935efa4d 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
@@ -135,10 +135,14 @@ NGFragmentationType NGConstraintSpace::BlockFragmentationType() const {
return static_cast<NGFragmentationType>(block_direction_fragmentation_type_);
}
-NGLayoutOpportunityIterator* NGConstraintSpace::LayoutOpportunityIterator() {
+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>(this, this->bfc_offset_);
+ WTF::makeUnique<NGLayoutOpportunityIterator>(this, iter_offset);
}
return layout_opp_iter_.get();
}

Powered by Google App Engine
This is Rietveld 408576698