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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_text_layout_algorithm.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_text_layout_algorithm.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_text_layout_algorithm.cc b/third_party/WebKit/Source/core/layout/ng/ng_text_layout_algorithm.cc
index ab37fecc93bdd4b124e68615ef51c9937c414861..ec6a20397700fad74786182643af320bd6c200b9 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_text_layout_algorithm.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_text_layout_algorithm.cc
@@ -9,6 +9,7 @@
#include "core/layout/ng/ng_constraint_space.h"
#include "core/layout/ng/ng_fragment_builder.h"
#include "core/layout/ng/ng_inline_node.h"
+#include "core/layout/ng/ng_layout_opportunity_iterator.h"
#include "core/layout/ng/ng_line_builder.h"
#include "core/layout/ng/ng_text_fragment.h"
#include "core/style/ComputedStyle.h"
@@ -72,6 +73,8 @@ void NGTextLayoutAlgorithm::LayoutInline(NGLineBuilder* line_builder) {
// If there are more available spaces, mark the break opportunity and fetch
// more text.
+ // TODO(layout-ng): check if the height of the linebox can fit within
+ // the current opportunity.
if (line_builder->CanFitOnLine()) {
line_builder->SetBreakOpportunity();
continue;

Powered by Google App Engine
This is Rietveld 408576698