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

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: spelling. 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..60d4084f5260346d58e5406fd8b216927b426f6e 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
@@ -19,8 +19,11 @@ class CORE_EXPORT NGPhysicalFragment final : public NGPhysicalFragmentBase {
NGPhysicalFragment(NGPhysicalSize size,
NGPhysicalSize overflow,
HeapVector<Member<const NGPhysicalFragmentBase>>& children,
- NGMarginStrut margin_strut)
- : NGPhysicalFragmentBase(size, overflow, FragmentBox, margin_strut) {
+ NGMarginStrut margin_strut,
+ NGWritingMode margin_strut_writing_mode)
+ : NGPhysicalFragmentBase(size, overflow, FragmentBox),
+ margin_strut_(margin_strut),
+ margin_strut_writing_mode_(margin_strut_writing_mode) {
children_.swap(children);
}
@@ -28,6 +31,11 @@ class CORE_EXPORT NGPhysicalFragment final : public NGPhysicalFragmentBase {
return children_;
}
+ NGMarginStrut MarginStrut() const { return margin_strut_; }
+ NGWritingMode MarginStrutWritingMode() const {
+ return static_cast<NGWritingMode>(margin_strut_writing_mode_);
+ }
+
DEFINE_INLINE_TRACE_AFTER_DISPATCH() {
visitor->trace(children_);
NGPhysicalFragmentBase::traceAfterDispatch(visitor);
@@ -35,10 +43,19 @@ class CORE_EXPORT NGPhysicalFragment final : public NGPhysicalFragmentBase {
private:
HeapVector<Member<const NGPhysicalFragmentBase>> children_;
+
+ NGMarginStrut margin_strut_;
+ unsigned margin_strut_writing_mode_ : 2;
Gleb Lanbin 2016/10/13 23:59:51 move writing_mode to NGMarginStrut ?
};
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