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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_units.h

Issue 2489953006: Utility routines for ng_units (Closed)
Patch Set: Created 4 years, 1 month 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_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..ac8f42398457b545bbc745d3e5f064c7a87c32f1 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 container_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 {
@@ -172,6 +179,7 @@ struct NGPhysicalBoxStrut {
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

Powered by Google App Engine
This is Rietveld 408576698