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

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

Issue 2525033002: Deprecate NGPhysicalConstraintSpace (Closed)
Patch Set: Created 4 years, 1 month 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_builder.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.h b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.h
index 3f37ac8084116fff36dfa3894c9ae1bf3f284902..932733821f677a0f83639597ae8ce964aec60534 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.h
@@ -11,8 +11,10 @@
namespace blink {
class CORE_EXPORT NGConstraintSpaceBuilder final
- : public GarbageCollected<NGConstraintSpaceBuilder> {
+ : public GarbageCollectedFinalized<NGConstraintSpaceBuilder> {
public:
+ NGConstraintSpaceBuilder(const NGConstraintSpace* parent_space);
+
NGConstraintSpaceBuilder(NGWritingMode writing_mode);
NGConstraintSpaceBuilder& SetAvailableSize(NGLogicalSize available_size);
@@ -20,6 +22,8 @@ class CORE_EXPORT NGConstraintSpaceBuilder final
NGConstraintSpaceBuilder& SetPercentageResolutionSize(
NGLogicalSize percentage_resolution_size);
+ NGConstraintSpaceBuilder& SetTextDirection(TextDirection);
+
NGConstraintSpaceBuilder& SetIsFixedSizeInline(bool is_fixed_size_inline);
NGConstraintSpaceBuilder& SetIsFixedSizeBlock(bool is_fixed_size_block);
@@ -31,13 +35,17 @@ class CORE_EXPORT NGConstraintSpaceBuilder final
NGConstraintSpaceBuilder& SetFragmentationType(NGFragmentationType);
NGConstraintSpaceBuilder& SetIsNewFormattingContext(bool is_new_fc);
+ NGConstraintSpaceBuilder& SetWritingMode(WritingMode writing_mode) {
+ writing_mode_ = writing_mode;
+ return *this;
+ }
ikilpatrick 2016/11/23 17:40:38 .nit nl below this?
Gleb Lanbin 2016/11/23 18:59:50 Done.
// Creates a new constraint space. This may be called multiple times, for
// example the constraint space will be different for a child which:
// - Establishes a new formatting context.
// - Is within a fragmentation container and needs its fragmentation offset
// updated.
// - Has its size is determined by its parent layout (flex, abs-pos).
- NGPhysicalConstraintSpace* ToConstraintSpace();
+ NGConstraintSpace* ToConstraintSpace();
DEFINE_INLINE_TRACE() {}
@@ -46,7 +54,7 @@ class CORE_EXPORT NGConstraintSpaceBuilder final
NGLogicalSize percentage_resolution_size_;
// const bit fields.
ikilpatrick 2016/11/23 17:40:38 remove this comment now?
Gleb Lanbin 2016/11/23 18:59:50 Done.
- const unsigned writing_mode_ : 2;
+ unsigned writing_mode_ : 2;
// mutable bit fields.
unsigned is_fixed_size_inline_ : 1;
@@ -55,6 +63,9 @@ class CORE_EXPORT NGConstraintSpaceBuilder final
unsigned is_block_direction_triggers_scrollbar_ : 1;
unsigned fragmentation_type_ : 2;
unsigned is_new_fc_ : 1;
+ unsigned text_direction_ : 1;
+
+ std::shared_ptr<NGExclusions> exclusions_;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698