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

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

Issue 2525033002: Deprecate NGPhysicalConstraintSpace (Closed)
Patch Set: update TestExpectations 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_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..ccff60e2b9b60ce417ca23b66640618a65bf8f7a 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,15 @@ class CORE_EXPORT NGConstraintSpaceBuilder final
NGConstraintSpaceBuilder& SetFragmentationType(NGFragmentationType);
NGConstraintSpaceBuilder& SetIsNewFormattingContext(bool is_new_fc);
+ NGConstraintSpaceBuilder& SetWritingMode(NGWritingMode writing_mode);
+
// 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() {}
@@ -45,16 +51,17 @@ class CORE_EXPORT NGConstraintSpaceBuilder final
NGLogicalSize available_size_;
NGLogicalSize percentage_resolution_size_;
- // const bit fields.
- const unsigned writing_mode_ : 2;
-
- // mutable bit fields.
+ unsigned writing_mode_ : 2;
+ unsigned parent_writing_mode_ : 2;
unsigned is_fixed_size_inline_ : 1;
unsigned is_fixed_size_block_ : 1;
unsigned is_inline_direction_triggers_scrollbar_ : 1;
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