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

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

Issue 2313873002: Initial implementation of Collapsing Margins computational logic for LayoutNG (Closed)
Patch Set: synced to the head Created 4 years, 3 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
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 17a289eb3df05afdbe6782f08e2412372187b04a..c4be357477675a71fb3df86e2c90aa5bbcbbaf2f 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_units.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_units.h
@@ -9,6 +9,7 @@
#include "core/layout/ng/ng_direction.h"
#include "core/layout/ng/ng_writing_mode.h"
#include "platform/LayoutUnit.h"
+#include "wtf/text/WTFString.h"
namespace blink {
@@ -116,6 +117,25 @@ struct NGBoxStrut {
}
};
+// This struct is used for the margin collapsing calculation.
+struct NGMarginStrut {
+ LayoutUnit margin_block_start;
+ LayoutUnit margin_block_end;
+
+ LayoutUnit negative_margin_block_start;
+ LayoutUnit negative_margin_block_end;
+
+ void AppendMarginBlockStart(const LayoutUnit& value);
+ void AppendMarginBlockEnd(const LayoutUnit& value);
+
+ String ToString() const;
+};
+
+inline std::ostream& operator<<(std::ostream& stream,
+ const NGMarginStrut& value) {
+ return stream << value.ToString();
+}
+
} // namespace blink
#endif // NGUnits_h

Powered by Google App Engine
This is Rietveld 408576698