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

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

Issue 2798203002: NGInlineLayoutAlgorithm should take margins of inline floats into account (Closed)
Patch Set: 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
Index: third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc b/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc
index f18089c598d326dec3cf680e72c2319d6e743e83..15dd76725dab94f698797f6213b5b643f9a3bc3a 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc
@@ -400,6 +400,10 @@ void ApplyAutoMargins(const NGConstraintSpace& constraint_space,
const LayoutUnit& inline_size,
NGBoxStrut* margins) {
DCHECK(margins) << "Margins cannot be NULL here";
+
+ if (style.isFloating())
+ return;
+
const LayoutUnit used_space = inline_size + margins->InlineSum();
const LayoutUnit available_space =
constraint_space.AvailableSize().inline_size - used_space;

Powered by Google App Engine
This is Rietveld 408576698