Commit 5a949335 authored by Koji Ishii's avatar Koji Ishii Committed by Commit Bot

Fix invalid DCHECK in ComputeEmphasisMarkOutsets

|emphasis_mark_height| could be zero if `font-size` is zero,
but the DCHECK did not include the case.

Bug: 1105882
Change-Id: Ia5665778ecb2d396d156c6b6e2e8a2f69151889e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2374918
Auto-Submit: Koji Ishii <kojii@chromium.org>
Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801476}
parent b8afe093
......@@ -27,7 +27,7 @@ FontHeight ComputeEmphasisMarkOutsets(const ComputedStyle& style) {
const Font& font = style.GetFont();
LayoutUnit emphasis_mark_height =
LayoutUnit(font.EmphasisMarkHeight(style.TextEmphasisMarkString()));
DCHECK_GT(emphasis_mark_height, LayoutUnit());
DCHECK_GE(emphasis_mark_height, LayoutUnit());
return style.GetTextEmphasisLineLogicalSide() == LineLogicalSide::kOver
? FontHeight(emphasis_mark_height, LayoutUnit())
: FontHeight(LayoutUnit(), emphasis_mark_height);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment