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

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

Issue 2281763002: [layoutng] Move and rename NGBoxMargins to NGBoxStrut (Closed)
Patch Set: Created 4 years, 4 months 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_margin_strut.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2d8ad7e008801f837ca871fdb9ebdb9236f88590..7b466188b3a8aafbbe10bfc134b88ce74af0b8c2 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_units.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_units.h
@@ -47,6 +47,18 @@ struct NGPixelSnappedPhysicalRect {
int height;
};
+// This struct is used for storing margins, borders or padding of a box on all
+// four edges.
+struct NGBoxStrut {
+ LayoutUnit inline_start;
+ LayoutUnit inline_end;
+ LayoutUnit block_start;
+ LayoutUnit block_end;
+
+ LayoutUnit InlineSum() const { return inline_start + inline_end; }
+ LayoutUnit BlockSum() const { return block_start + block_end; }
+};
+
} // namespace blink
#endif // NGUnits_h
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_margin_strut.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698