Index: third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc |
diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc |
index c81a44a30c07ffce977f8e719aba85da6a328e90..5676fcbd73b759d0a700fb96d177394b092ad3a3 100644 |
--- a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc |
+++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc |
@@ -49,6 +49,11 @@ NGLogicalOffset GetOriginPointForFloats(const NGConstraintSpace& space, |
origin_point.block_offset += content_size; |
return origin_point; |
} |
+ |
+inline bool IsObjectReplacementCharacter(UChar character) { |
+ return character == kObjectReplacementCharacter; |
+} |
+ |
} // namespace |
NGInlineLayoutAlgorithm::NGInlineLayoutAlgorithm( |
@@ -469,7 +474,11 @@ bool NGInlineLayoutAlgorithm::PlaceItems( |
baseline = LayoutUnit(baseline.Round()); |
// Check if the line fits into the constraint space in block direction. |
- LayoutUnit line_bottom = baseline + line_box.Metrics().descent; |
+ LayoutUnit line_bottom = baseline; |
+ |
+ if (!Node()->Text().IsAllSpecialCharacters<IsObjectReplacementCharacter>()) |
kojii
2017/04/26 00:51:34
This doesn't look correct, but I admit ascent/desc
|
+ line_bottom += line_box.Metrics().descent; |
+ |
if (!container_builder_.Children().IsEmpty() && |
ConstraintSpace().AvailableSize().block_size != NGSizeIndefinite && |
line_bottom > ConstraintSpace().AvailableSize().block_size) { |