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

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

Issue 2313873002: Initial implementation of Collapsing Margins computational logic for LayoutNG (Closed)
Patch Set: synced to the head Created 4 years, 3 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_physical_fragment_base.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment_base.h b/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment_base.h
index 390505116321242b84b38c3f3217c0ee9a43457d..0a5000af6c6d7df907ec1c9a2277159f4df624f4 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment_base.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment_base.h
@@ -7,6 +7,7 @@
#include "core/CoreExport.h"
#include "core/layout/ng/ng_constraint_space.h"
+#include "core/layout/ng/ng_units.h"
#include "platform/LayoutUnit.h"
#include "platform/heap/Handle.h"
#include "wtf/Vector.h"
@@ -58,21 +59,26 @@ class CORE_EXPORT NGPhysicalFragmentBase
has_been_placed_ = true;
}
+ NGMarginStrut MarginStrut() const { return margin_strut_; }
+
DEFINE_INLINE_TRACE_AFTER_DISPATCH() {}
DECLARE_TRACE();
protected:
NGPhysicalFragmentBase(NGPhysicalSize size,
NGPhysicalSize overflow,
- NGFragmentType type)
+ NGFragmentType type,
+ NGMarginStrut margin_strut)
: size_(size),
overflow_(overflow),
+ margin_strut_(margin_strut),
type_(type),
has_been_placed_(false) {}
NGPhysicalSize size_;
NGPhysicalSize overflow_;
NGPhysicalOffset offset_;
+ NGMarginStrut margin_strut_;
unsigned type_ : 1;
unsigned has_been_placed_ : 1;

Powered by Google App Engine
This is Rietveld 408576698