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

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

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_line_builder.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_line_builder.h b/third_party/WebKit/Source/core/layout/ng/ng_line_builder.h
index fb5651b6f05a5d88834c02a8a39e1d70f497c5b5..6dcb0ef920414077a1ce08ed26b9437c28caffd1 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_line_builder.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_line_builder.h
@@ -7,6 +7,7 @@
#include "core/CoreExport.h"
#include "core/layout/ng/geometry/ng_logical_offset.h"
+#include "core/layout/ng/ng_layout_opportunity_iterator.h"
#include "core/layout/ng/ng_physical_fragment.h"
#include "platform/fonts/FontBaseline.h"
#include "platform/heap/Handle.h"
@@ -30,7 +31,7 @@ class CORE_EXPORT NGLineBuilder final {
STACK_ALLOCATED();
public:
- NGLineBuilder(NGInlineNode*, const NGConstraintSpace*);
+ NGLineBuilder(NGInlineNode*, NGConstraintSpace*);
const NGConstraintSpace& ConstraintSpace() const {
return *constraint_space_;
@@ -139,8 +140,11 @@ class CORE_EXPORT NGLineBuilder final {
const LineItemChunk&,
LineBoxData*);
+ // Finds the next layout opportunity for the next text fragment.
+ void FindNextLayoutOpportunity();
+
Persistent<NGInlineNode> inline_box_;
- const NGConstraintSpace* constraint_space_; // Not owned as STACK_ALLOCATED.
+ NGConstraintSpace* constraint_space_; // Not owned as STACK_ALLOCATED.
Vector<RefPtr<NGPhysicalFragment>, 32> fragments_;
Vector<NGLogicalOffset, 32> offsets_;
Vector<LineBoxData, 32> line_box_data_list_;
@@ -156,6 +160,9 @@ class CORE_EXPORT NGLineBuilder final {
LayoutUnit max_inline_size_;
FontBaseline baseline_type_;
+ NGLogicalOffset bfc_offset_;
+ NGLogicalRect current_opportunity_;
+
#if DCHECK_IS_ON()
unsigned is_bidi_reordered_ : 1;
#endif

Powered by Google App Engine
This is Rietveld 408576698