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

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

Issue 2798203002: NGInlineLayoutAlgorithm should take margins of inline floats into account (Closed)
Patch Set: fix comments Created 3 years, 8 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 | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_inline_layout_algorithm_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/ng/ng_inline_layout_algorithm.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_inline_layout_algorithm.cc b/third_party/WebKit/Source/core/layout/ng/ng_inline_layout_algorithm.cc
index a108dbfab7c70003983ec3048c1c2c8eef9c4def..b72a6407cf76229fae7851fadf06dd848492f1b0 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_inline_layout_algorithm.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_inline_layout_algorithm.cc
@@ -331,10 +331,12 @@ void NGInlineLayoutAlgorithm::LayoutAndPositionFloat(
NGLogicalOffset origin_offset =
GetOriginPointForFloats(ConstraintSpace(), content_size_);
NGLogicalOffset from_offset = ConstraintSpace().BfcOffset();
- // TODO(glebl): add margins calculation.
- NGBoxStrut margins;
+ const ComputedStyle& float_style = node->Style();
+ NGBoxStrut margins =
+ ComputeMargins(*float_space, float_style, float_space->WritingMode(),
ikilpatrick 2017/04/06 17:44:21 .nit (can fix later) I'm not sure why we passed w
+ float_space->Direction());
RefPtr<NGFloatingObject> floating_object = NGFloatingObject::Create(
- node->Style(), float_space->WritingMode(), current_opportunity_.size,
+ float_style, float_space->WritingMode(), current_opportunity_.size,
origin_offset, from_offset, margins,
layout_result->PhysicalFragment().get());
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_inline_layout_algorithm_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698