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

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

Issue 2755143003: [LayoutNG] Make NGLineBuilder work with inline floats (Closed)
Patch Set: make setIsInPlacedTree to be available for LayoutNG 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 536508b345acc16ccb6a63e259b7e38372562d5f..f6a8e86378d54de1f21ef8374d1b597c210d42f7 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_constraint_space_builder.h"
#include "core/layout/ng/ng_fragment_builder.h"
#include "core/layout/ng/ng_layout_opportunity_iterator.h"
#include "core/layout/ng/ng_physical_fragment.h"
@@ -111,6 +112,14 @@ class CORE_EXPORT NGLineBuilder final {
void BidiReorder(Vector<LineItemChunk, 32>*);
+ // Lays out the inline float.
+ // List of actions:
+ // - tries to position the float right away if we have enough space.
+ // - updates the current_opportunity if we actually place the float.
+ // - if it's too wide then we add the float to the unpositioned list so it can
+ // be positioned after we're done with the current line.
+ void LayoutAndPositionFloat(LayoutUnit end_position, LayoutObject*);
+
// Represents block-direction metrics for an |NGLayoutInlineItem|.
struct InlineItemMetrics {
float ascent;
@@ -181,6 +190,8 @@ class CORE_EXPORT NGLineBuilder final {
NGLogicalRect current_opportunity_;
unsigned is_horizontal_writing_mode_ : 1;
+
+ NGConstraintSpaceBuilder space_builder_;
#if DCHECK_IS_ON()
unsigned is_bidi_reordered_ : 1;
#endif
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_block_node.cc ('k') | third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698