Index: third_party/WebKit/Source/core/layout/ng/ng_units.h |
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_units.h b/third_party/WebKit/Source/core/layout/ng/ng_units.h |
index 8ea43bdcf50770ac4797cbb2cf439f2712889127..a6cad5b5cec036eec190539f6c3e434eade6659e 100644 |
--- a/third_party/WebKit/Source/core/layout/ng/ng_units.h |
+++ b/third_party/WebKit/Source/core/layout/ng/ng_units.h |
@@ -16,10 +16,12 @@ namespace blink { |
class LayoutUnit; |
struct NGPhysicalOffset; |
struct NGPhysicalSize; |
+struct NGBoxStrut; |
struct MinAndMaxContentSizes { |
LayoutUnit min_content; |
LayoutUnit max_content; |
+ LayoutUnit ShrinkToFit(LayoutUnit available_size) const; |
}; |
struct NGLogicalSize { |
@@ -38,6 +40,11 @@ struct NGLogicalSize { |
} |
}; |
+inline std::ostream& operator<<(std::ostream& stream, |
+ const NGLogicalSize& value) { |
+ return stream << value.inline_size << "x" << value.block_size; |
+} |
+ |
// NGLogicalOffset is the position of a rect (typically a fragment) relative to |
// its parent rect in the logical coordinate system. |
struct NGLogicalOffset { |
@@ -167,16 +174,17 @@ struct NGPixelSnappedPhysicalRect { |
// Struct to store physical dimensions, independent of writing mode and |
// direction. |
// See https://drafts.csswg.org/css-writing-modes-3/#abstract-box |
-struct NGPhysicalBoxStrut { |
+struct CORE_EXPORT NGPhysicalBoxStrut { |
LayoutUnit left; |
LayoutUnit right; |
LayoutUnit top; |
LayoutUnit bottom; |
+ NGBoxStrut ConvertToLogical(NGWritingMode, TextDirection) const; |
}; |
// This struct is used for storing margins, borders or padding of a box on all |
// four edges. |
-struct NGBoxStrut { |
+struct CORE_EXPORT NGBoxStrut { |
LayoutUnit inline_start; |
LayoutUnit inline_end; |
LayoutUnit block_start; |