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

This matches Blink's behavior
This commit is contained in:
Jason Simmons
2018-01-10 10:32:24 -08:00
committed by GitHub
parent 39ba4de88b
commit f95c8890c1

View File

@@ -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;