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

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

Issue 2417113002: [LayoutNG] Fix orthogonal writing mode child margin strut from being used in collapsing margins cal… (Closed)
Patch Set: spelling. Created 4 years, 2 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_fragment.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragment.cc b/third_party/WebKit/Source/core/layout/ng/ng_fragment.cc
index 4085e380af9aea6c8746769477c7eb5125ff9ab5..0b59fba6d135112f3707d07e285f1a76dfd5d5a6 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_fragment.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_fragment.cc
@@ -4,4 +4,16 @@
#include "core/layout/ng/ng_fragment.h"
-namespace blink {} // namespace blink
+#include "core/layout/ng/ng_physical_fragment.h"
+
+namespace blink {
+
+NGMarginStrut NGFragment::MarginStrut() const {
+ return writing_mode_ ==
Gleb Lanbin 2016/10/13 23:59:51 it's better to use IF instead of a long ternary op
+ toNGPhysicalFragment(physical_fragment_)
+ ->MarginStrutWritingMode()
+ ? toNGPhysicalFragment(physical_fragment_)->MarginStrut()
Gleb Lanbin 2016/10/13 23:59:51 toNGPhysicalFragment(physical_fragment_)->MarginSt
+ : NGMarginStrut();
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698