未验证 提交 e8bfd4d0 编写于 作者: J Jason Simmons 提交者: GitHub

libtxt: map pixel coordinates above the text to glyph positions on the first line of text (#4533)

This matches Blink's behavior
上级 9536b807
......@@ -955,7 +955,7 @@ std::vector<Paragraph::TextBox> Paragraph::GetRectsForRange(size_t start,
Paragraph::PositionWithAffinity Paragraph::GetGlyphPositionAtCoordinate(
double dx,
double dy) const {
if (line_heights_.empty() || dy < 0)
if (line_heights_.empty())
return PositionWithAffinity(0, DOWNSTREAM);
size_t y_index;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册