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

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

Issue 2417113002: [LayoutNG] Fix orthogonal writing mode child margin strut from being used in collapsing margins cal… (Closed)
Patch Set: address comments Created 4 years, 2 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.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.h b/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.h
index 28ad7cb8d1c4b38fc4681bf0c81d0e83fa581bb1..4a77cde1f6bd87f2bec3b4110d554cfe7ee4f49a 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.h
@@ -20,7 +20,8 @@ class CORE_EXPORT NGPhysicalFragment final : public NGPhysicalFragmentBase {
NGPhysicalSize overflow,
HeapVector<Member<const NGPhysicalFragmentBase>>& children,
NGMarginStrut margin_strut)
- : NGPhysicalFragmentBase(size, overflow, FragmentBox, margin_strut) {
+ : NGPhysicalFragmentBase(size, overflow, FragmentBox),
+ margin_strut_(margin_strut) {
children_.swap(children);
}
@@ -28,6 +29,8 @@ class CORE_EXPORT NGPhysicalFragment final : public NGPhysicalFragmentBase {
return children_;
}
+ NGMarginStrut MarginStrut() const { return margin_strut_; }
+
DEFINE_INLINE_TRACE_AFTER_DISPATCH() {
visitor->trace(children_);
NGPhysicalFragmentBase::traceAfterDispatch(visitor);
@@ -35,10 +38,18 @@ class CORE_EXPORT NGPhysicalFragment final : public NGPhysicalFragmentBase {
private:
HeapVector<Member<const NGPhysicalFragmentBase>> children_;
+
+ NGMarginStrut margin_strut_;
};
WILL_NOT_BE_EAGERLY_TRACED_CLASS(NGPhysicalFragment);
+DEFINE_TYPE_CASTS(NGPhysicalFragment,
+ NGPhysicalFragmentBase,
+ fragment,
+ fragment->Type() == NGPhysicalFragmentBase::FragmentBox,
+ fragment.Type() == NGPhysicalFragmentBase::FragmentBox);
+
} // namespace blink
#endif // NGPhysicalFragment_h

Powered by Google App Engine
This is Rietveld 408576698