Index: third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc |
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc b/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc |
index 95aa08381fffd84f8e8aad8b55e64a54c7854154..c059aa8d7b325d101929e7b86bc868bca5921660 100644 |
--- a/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc |
+++ b/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc |
@@ -396,6 +396,32 @@ NGBoxStrut ComputePadding(const NGConstraintSpace& constraint_space, |
return padding; |
} |
+LayoutUnit ComputeMarginBorderPaddingInlineStart( |
cbiesinger
2017/05/22 19:02:58
I'd rather not add functions like these; why not u
kojii
2017/05/22 19:22:42
It computes 4 values and discard 3 out of that. I'
kojii
2017/05/22 19:26:31
BTW, you might know but in case, the legacy has Ma
|
+ const NGConstraintSpace& constraint_space, |
+ const ComputedStyle& style) { |
+ MinMaxContentSize empty_sizes; |
+ return ResolveInlineLength(constraint_space, style, empty_sizes, |
+ style.MarginStart(), |
+ LengthResolveType::kMarginBorderPaddingSize) + |
+ LayoutUnit(style.BorderStartWidth()) + |
+ ResolveInlineLength(constraint_space, style, empty_sizes, |
+ style.PaddingStart(), |
+ LengthResolveType::kMarginBorderPaddingSize); |
+} |
+ |
+LayoutUnit ComputeMarginBorderPaddingInlineEnd( |
+ const NGConstraintSpace& constraint_space, |
+ const ComputedStyle& style) { |
+ MinMaxContentSize empty_sizes; |
+ return ResolveInlineLength(constraint_space, style, empty_sizes, |
+ style.MarginEnd(), |
+ LengthResolveType::kMarginBorderPaddingSize) + |
+ LayoutUnit(style.BorderEndWidth()) + |
+ ResolveInlineLength(constraint_space, style, empty_sizes, |
+ style.PaddingEnd(), |
+ LengthResolveType::kMarginBorderPaddingSize); |
+} |
+ |
void ApplyAutoMargins(const NGConstraintSpace& constraint_space, |
const ComputedStyle& style, |
const LayoutUnit& inline_size, |