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

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

Issue 2267383003: [LayoutNG] Introduces NGPhysicalConstraintSpace and makes NGConstraintSpace a "view". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: .. Created 4 years, 4 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_derived_constraint_space.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_derived_constraint_space.h b/third_party/WebKit/Source/core/layout/ng/ng_derived_constraint_space.h
index 1c9f4e2f3690183958378e6c8ddf742731a3724e..59480e6bb8c79d2cea547eaa64a7847266f22208 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_derived_constraint_space.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_derived_constraint_space.h
@@ -15,27 +15,34 @@ namespace blink {
class CORE_EXPORT NGDerivedConstraintSpace final : public NGConstraintSpace {
public:
- ~NGDerivedConstraintSpace();
+ // Constructs a NGConstraintSpace from legacy layout object.
+ static NGDerivedConstraintSpace* CreateFromLayoutObject(const LayoutBox&);
+
+ NGDerivedConstraintSpace(NGWritingMode,
+ NGLogicalSize container_size,
+ bool inline_triggers,
+ bool block_triggers,
+ bool fixed_inline,
+ bool fixed_block,
+ NGFragmentationType);
NGLogicalOffset Offset() const { return offset_; }
NGLogicalSize Size() const override { return size_; }
+ NGDirection Direction() const { return direction_; }
+
+ DEFINE_INLINE_VIRTUAL_TRACE() {
+ visitor->trace(parent_);
+ NGConstraintSpace::trace(visitor);
+ }
private:
- NGDerivedConstraintSpace(const NGConstraintSpace* original,
- NGLogicalOffset offset,
- NGLogicalSize size,
- NGWritingMode writingMode,
- NGDirection direction)
- : original_(original),
- offset_(offset),
- size_(size),
- writingMode_(writingMode),
- direction_(direction) {}
-
- const NGConstraintSpace* original_;
+ Member<NGConstraintSpace> parent_;
NGLogicalOffset offset_;
+
+ // TODO(layout-ng) move to NGPhysicalConstraintSpace?
NGLogicalSize size_;
- NGWritingMode writingMode_;
+
+ // TODO(layout-ng) move to NGConstraintSpace?
NGDirection direction_;
};

Powered by Google App Engine
This is Rietveld 408576698