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

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

Issue 2587283004: [layoutng] Add a shrink-to-fit flag to the constraint space (Closed)
Patch Set: review comments Created 4 years 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 a392af7a46970f2588c750f74ebaa5bb253669eb..e85a720b50816012d710a2c73bc503f2ec4395f8 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
@@ -94,6 +94,10 @@ class CORE_EXPORT NGConstraintSpace final
bool IsFixedSizeBlock() const { return is_fixed_size_block_; }
+ // Whether an auto inline-size should be interpreted as shrink-to-fit
+ // (ie. fit-content). This is used for inline-block, floats, etc.
+ bool IsShrinkToFit() const { return is_shrink_to_fit_; }
+
// If specified a layout should produce a Fragment which fragments at the
// blockSize if possible.
NGFragmentationType BlockFragmentationType() const;
@@ -120,6 +124,7 @@ class CORE_EXPORT NGConstraintSpace final
NGLogicalSize percentage_resolution_size,
bool is_fixed_size_inline,
bool is_fixed_size_block,
+ bool is_shrink_to_fit,
bool is_inline_direction_triggers_scrollbar,
bool is_block_direction_triggers_scrollbar,
NGFragmentationType block_direction_fragmentation_type,
@@ -132,6 +137,8 @@ class CORE_EXPORT NGConstraintSpace final
unsigned is_fixed_size_inline_ : 1;
unsigned is_fixed_size_block_ : 1;
+ unsigned is_shrink_to_fit_ : 1;
+
unsigned is_inline_direction_triggers_scrollbar_ : 1;
unsigned is_block_direction_triggers_scrollbar_ : 1;

Powered by Google App Engine
This is Rietveld 408576698