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

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

Issue 2632523002: [LayoutNG] Initial support for multicol, introducing NGBlockBreakToken. (Closed)
Patch Set: Add TODO. Created 3 years, 11 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.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h
index ccbe235e943272929795f4aa43b1dd563aef0b45..b04888f754ce5bf5467f83093c3b1eddb97b9788 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h
@@ -70,6 +70,12 @@ class CORE_EXPORT NGConstraintSpace final
// TODO(layout-ng): Set offset via NGConstraintSpacebuilder.
void SetOffset(const NGLogicalOffset& offset) { offset_ = offset; }
+ // Return the block-direction space available in the current fragmentainer.
+ LayoutUnit FragmentainerSpaceAvailable() const {
+ DCHECK(HasBlockFragmentation());
+ return fragmentainer_space_available_;
+ }
+
// Whether the current constraint space is for the newly established
// Formatting Context.
bool IsNewFormattingContext() const { return is_new_fc_; }
@@ -104,6 +110,12 @@ class CORE_EXPORT NGConstraintSpace final
// blockSize if possible.
NGFragmentationType BlockFragmentationType() const;
+ // Return true if this contraint space participates in a fragmentation
+ // context.
+ bool HasBlockFragmentation() const {
+ return BlockFragmentationType() != kFragmentNone;
+ }
+
// Modifies constraint space to account for a placed fragment. Depending on
// the shape of the fragment this will either modify the inline or block
// size, or add an exclusion.
@@ -124,6 +136,7 @@ class CORE_EXPORT NGConstraintSpace final
TextDirection,
NGLogicalSize available_size,
NGLogicalSize percentage_resolution_size,
+ LayoutUnit fragmentainer_space_available,
bool is_fixed_size_inline,
bool is_fixed_size_block,
bool is_shrink_to_fit,
@@ -136,6 +149,8 @@ class CORE_EXPORT NGConstraintSpace final
NGLogicalSize available_size_;
NGLogicalSize percentage_resolution_size_;
+ LayoutUnit fragmentainer_space_available_;
+
unsigned is_fixed_size_inline_ : 1;
unsigned is_fixed_size_block_ : 1;

Powered by Google App Engine
This is Rietveld 408576698