Skip to content

Commit

Permalink
libtxt: map pixel coordinates above the text to glyph positions on th…
Browse files Browse the repository at this point in the history
…e first line of text (flutter#4533)

This matches Blink's behavior
  • Loading branch information
jason-simmons authored Jan 10, 2018
1 parent 9536b80 commit e8bfd4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion third_party/txt/src/txt/paragraph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e8bfd4d

Please sign in to comment.