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

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

Issue 2346473003: Do not collapse margins with padding/border b/w parent and first/last child (Closed)
Patch Set: 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.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_units.cc b/third_party/WebKit/Source/core/layout/ng/ng_units.cc
index 4f45a68dcab327a8166c123a649c9dae56847d6a..771ed654dcb856099ac0a8695156ed50a802ad6f 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_units.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_units.cc
@@ -79,6 +79,14 @@ void NGMarginStrut::AppendMarginBlockEnd(const LayoutUnit& value) {
}
}
+void NGMarginStrut::SetMarginBlockStart(const LayoutUnit& value) {
+ if (value < 0) {
+ negative_margin_block_start = value;
+ } else {
+ margin_block_start = value;
+ }
+}
+
void NGMarginStrut::SetMarginBlockEnd(const LayoutUnit& value) {
if (value < 0) {
negative_margin_block_end = value;

Powered by Google App Engine
This is Rietveld 408576698