Commit 57990468 authored by Fredrik Söderquist's avatar Fredrik Söderquist Committed by Commit Bot

Pass a float height to Font::SelectionRectForText

Rather than converting an int argument to a float in the function (that
return a FloatRect), pass a float argument and let the caller handle a
conversion (if needed.)

Bug: 881188
Change-Id: If3083fc19c866f003b0d60e10246b3088463dcdd
Reviewed-on: https://chromium-review.googlesource.com/1209923Reviewed-by: default avatarDominik Röttsches <drott@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#589471}
parent 41c5a44c
......@@ -364,7 +364,7 @@ static inline FloatRect PixelSnappedSelectionRect(FloatRect rect) {
FloatRect Font::SelectionRectForText(const TextRun& run,
const FloatPoint& point,
int height,
float height,
int from,
int to) const {
to = (to == -1 ? run.length() : to);
......
......@@ -147,7 +147,7 @@ class PLATFORM_EXPORT Font {
BreakGlyphsOption) const;
FloatRect SelectionRectForText(const TextRun&,
const FloatPoint&,
int h,
float height,
int from = 0,
int to = -1) const;
FloatRect BoundingBox(const TextRun&, int from = 0, int to = -1) const;
......
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