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

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

Issue 2883213003: [LayoutNG] Implement inline margins for atomic inline boxes (Closed)
Patch Set: Fix Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc b/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc
index 7cadf42c80ba54a217a2467542e15aa34e2a4a4a..81aef02e4ac8ef8f9d4a7ba9a5a413fa908a1f39 100644
--- a/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc
+++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc
@@ -13,6 +13,7 @@
#include "core/layout/ng/ng_constraint_space.h"
#include "core/layout/ng/ng_fragment_builder.h"
#include "core/layout/ng/ng_layout_opportunity_iterator.h"
+#include "core/layout/ng/ng_length_utils.h"
#include "core/style/ComputedStyle.h"
#include "platform/fonts/shaping/HarfBuzzShaper.h"
#include "platform/fonts/shaping/ShapingLineBreaker.h"
@@ -225,6 +226,11 @@ void NGLineBreaker::LayoutAtomicInline(const NGInlineItem& item,
ToNGPhysicalBoxFragment(
item_result->layout_result->PhysicalFragment().Get()))
.InlineSize();
+
+ item_result->margins =
+ ComputeMargins(*constraint_space_, style,
+ constraint_space_->WritingMode(), style.Direction());
+ item_result->inline_size += item_result->margins.InlineSum();
}
// Handles when the last item overflows.
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698