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

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

Issue 2655783006: Top down version of algorithm to position margins and floats in LayoutNG (Closed)
Patch Set: Created 3 years, 11 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 f2a5972ad045506ea1c6e327c37fc7f977d8f66c..0304b910ce93db98a0efaf3d9f3f920b59845076 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_units.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_units.h
@@ -303,39 +303,18 @@ inline std::ostream& operator<<(std::ostream& stream, const NGBoxStrut& value) {
}
// This struct is used for the margin collapsing calculation.
-// TODO(glebl): Deprecated. It's being replaced by NGMarginStrut
-struct CORE_EXPORT NGDeprecatedMarginStrut {
- LayoutUnit margin_block_start;
- LayoutUnit margin_block_end;
-
- LayoutUnit negative_margin_block_start;
- LayoutUnit negative_margin_block_end;
-
- LayoutUnit BlockEndSum() const;
-
- void AppendMarginBlockStart(const LayoutUnit& value);
- void AppendMarginBlockEnd(const LayoutUnit& value);
- void SetMarginBlockStart(const LayoutUnit& value);
- void SetMarginBlockEnd(const LayoutUnit& value);
-
- bool IsEmpty() const;
-
- String ToString() const;
-
- bool operator==(const NGDeprecatedMarginStrut& other) const;
-};
-
-// This struct is used for the margin collapsing calculation.
struct CORE_EXPORT NGMarginStrut {
LayoutUnit margin;
LayoutUnit negative_margin;
- bool operator==(const NGMarginStrut& other) const;
-
+ // Appends negative or positive value to the current margin strut.
void Append(const LayoutUnit& value);
+ // Collapses positive and negative margins producing a sum of them.
LayoutUnit Collapse() const;
+ bool operator==(const NGMarginStrut& other) const;
+
String ToString() const;
};

Powered by Google App Engine
This is Rietveld 408576698