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

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: address comments 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..ca9dcb63a722bd2fbd1c173c590286b3d543cbe3 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,15 @@
#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 {
+ // NOTE: Accessing the margin strut ignoring the writing mode here is fine.
+ // Changing the writing mode establishes a new formatting context, for which
+ // a margin strut is never set for a fragment.
+ return toNGPhysicalFragment(physical_fragment_)->MarginStrut();
+}
+
+} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_fragment.h ('k') | third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698