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 0d1e37cc47bd95ef9a776adae99b6cf23583e789..cb24c0af6536720109038f5eaf1c1f0854794d0e 100644 |
--- a/third_party/WebKit/Source/core/layout/ng/ng_units.h |
+++ b/third_party/WebKit/Source/core/layout/ng/ng_units.h |
@@ -26,6 +26,7 @@ struct NGLogicalSize { |
LayoutUnit block_size; |
NGPhysicalSize ConvertToPhysical(NGWritingMode mode) const; |
+ bool operator==(const NGLogicalSize& other) const; |
}; |
// NGLogicalOffset is the position of a rect (typically a fragment) relative to |
@@ -47,6 +48,7 @@ struct NGLogicalOffset { |
NGDirection direction, |
NGPhysicalSize container_size, |
NGPhysicalSize inner_size) const; |
+ bool operator==(const NGLogicalOffset& other) const; |
}; |
// NGPhysicalOffset is the position of a rect (typically a fragment) relative to |
@@ -78,10 +80,31 @@ struct NGPhysicalLocation { |
}; |
struct NGPhysicalRect { |
+ NGPhysicalOffset offset; |
NGPhysicalSize size; |
- NGPhysicalLocation location; |
}; |
+struct CORE_EXPORT NGLogicalRect { |
+ NGLogicalRect() {} |
+ NGLogicalRect(LayoutUnit inline_offset, |
+ LayoutUnit block_offset, |
+ LayoutUnit inline_size, |
+ LayoutUnit block_size) |
+ : offset(inline_offset, block_offset), size(inline_size, block_size) {} |
+ |
+ bool IsEmpty() const; |
+ String ToString() const; |
+ bool operator==(const NGLogicalRect& other) const; |
+ |
+ NGLogicalOffset offset; |
+ NGLogicalSize size; |
+}; |
+ |
+inline std::ostream& operator<<(std::ostream& stream, |
+ const NGLogicalRect& value) { |
+ return stream << value.ToString(); |
+} |
+ |
struct NGPixelSnappedPhysicalRect { |
int top; |
int left; |