Simplify range mapping computation in SVGTextQuery/SVGInlineTextBox

Reduce SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates to
a simple offset/base adjustment and an intersection (which is what it
did - just in an unnecessarily verbose way.)

In SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates, drop the
intersection code, and leave that to the SVGInlineTextBox method.
Move the call to modifyStartEndPositionsRespectingLigatures() after the
intersection, because we don't want to do any adjustments on an empty
range. This is ok because modifyStartEndPositionsRespectingLigatures()
should never expand the range outside of the fragment it operating on.
Moving the call means it needs to be adjusted to work on offsets within
the fragment, so do that.

BUG=471205,470326

Review URL: https://codereview.chromium.org/1049673002

git-svn-id: svn://svn.chromium.org/blink/trunk@193017 bbb929c8-8fbe-4397-9dbb-9b2b20218538
2 files changed
tree: 5749f99dce2338b863b6675b344b7a89d7ca8a6b
  1. third_party/