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

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

Issue 2852883003: [LayoutNG] Fix 'vertical-align' not to include metrics before alignment (Closed)
Patch Set: glebl nits 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/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 62492def2c190e7acddddfab2ace0f0df4d8788f..c946ea9126f079af2b5a80413cd69a4103023a8d 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
@@ -50,10 +50,6 @@ NGLogicalOffset GetOriginPointForFloats(const NGConstraintSpace& space,
return origin_point;
}
-inline bool IsObjectReplacementCharacter(UChar character) {
- return character == kObjectReplacementCharacter;
-}
-
} // namespace
NGInlineLayoutAlgorithm::NGInlineLayoutAlgorithm(
@@ -479,11 +475,7 @@ bool NGInlineLayoutAlgorithm::PlaceItems(
baseline = LayoutUnit(baseline.Round());
// Check if the line fits into the constraint space in block direction.
- LayoutUnit line_bottom = baseline;
-
- // See http://crrev.com/2840883002
- if (!Node()->Text().IsAllSpecialCharacters<IsObjectReplacementCharacter>())
- line_bottom += line_box.Metrics().descent;
+ LayoutUnit line_bottom = baseline + line_box.Metrics().descent;
if (!container_builder_.Children().IsEmpty() &&
ConstraintSpace().AvailableSize().block_size != NGSizeIndefinite &&

Powered by Google App Engine
This is Rietveld 408576698