Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1288)

Unified Diff: Source/platform/fonts/Font.cpp

Issue 141433026: Font metrics, version 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adding Layout tests. Should work for simple text. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/platform/fonts/Font.cpp
diff --git a/Source/platform/fonts/Font.cpp b/Source/platform/fonts/Font.cpp
index d003f4826f70accab2d0a81557283567945beb3c..14d6b8afcc1c08a3fe684b9cb2cec7afccedeebc 100644
--- a/Source/platform/fonts/Font.cpp
+++ b/Source/platform/fonts/Font.cpp
@@ -186,7 +186,7 @@ float Font::width(const TextRun& run, int& charsConsumed, String& glyphName) con
return width(run);
}
-FloatRect Font::selectionRectForText(const TextRun& run, const FloatPoint& point, int h, int from, int to) const
+FloatRect Font::selectionRectForText(const TextRun& run, const FloatPoint& point, int h, int from, int to, bool accountForGlyphBounds) const
{
to = (to == -1 ? run.length() : to);
@@ -196,7 +196,7 @@ FloatRect Font::selectionRectForText(const TextRun& run, const FloatPoint& point
codePathToUse = ComplexPath;
if (codePathToUse != ComplexPath)
- return selectionRectForSimpleText(run, point, h, from, to);
+ return selectionRectForSimpleText(run, point, h, from, to, accountForGlyphBounds);
return selectionRectForComplexText(run, point, h, from, to);
}

Powered by Google App Engine
This is Rietveld 408576698