Index: third_party/WebKit/Source/core/layout/ng/ng_length_utils.h |
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_length_utils.h b/third_party/WebKit/Source/core/layout/ng/ng_length_utils.h |
index f5285dc6f2af80089773d9116f80a1167eb9c148..2a08e928c5546666b3d008978f9709fadf79d3d6 100644 |
--- a/third_party/WebKit/Source/core/layout/ng/ng_length_utils.h |
+++ b/third_party/WebKit/Source/core/layout/ng/ng_length_utils.h |
@@ -15,6 +15,7 @@ class LayoutUnit; |
class Length; |
class NGConstraintSpace; |
struct NGBoxStrut; |
+class NGFragment; |
enum class LengthResolveType { |
MinSize, |
@@ -63,6 +64,15 @@ CORE_EXPORT NGBoxStrut computeBorders(const ComputedStyle&); |
CORE_EXPORT NGBoxStrut computePadding(const NGConstraintSpace&, |
const ComputedStyle&); |
+// Resolves margin: auto in the inline direction after a box has been laid out. |
+// This uses the container size from the constraint space and the box size from |
+// the fragment to compute the margins that are auto, if any, and adjusts |
+// the given NGBoxStrut accordingly. |
+CORE_EXPORT void ApplyAutoMargins(const NGConstraintSpace&, |
+ const ComputedStyle&, |
+ const NGFragment&, |
+ NGBoxStrut& margins); |
+ |
} // namespace blink |
#endif // NGLengthUtils_h |