Index: Source/platform/fonts/shaping/CachingWordShaper.cpp |
diff --git a/Source/platform/fonts/shaping/CachingWordShaper.cpp b/Source/platform/fonts/shaping/CachingWordShaper.cpp |
index 79cd286b0a6f9c96bf9ded2cf1911cadcc313c6f..2c1d072e7beb001fddfe7f7c04c270e5fcbdb665 100644 |
--- a/Source/platform/fonts/shaping/CachingWordShaper.cpp |
+++ b/Source/platform/fonts/shaping/CachingWordShaper.cpp |
@@ -86,6 +86,14 @@ static inline float shapeResultsForRun(ShapeCache* shapeCache, const Font* font, |
return totalWidth; |
} |
+int CachingWordShaper::offsetForPosition(const Font* font, const TextRun& run, float targetX) |
+{ |
+ Vector<RefPtr<ShapeResult>> results; |
+ shapeResultsForRun(m_shapeCache.get(), font, run, nullptr, &results); |
+ |
+ return ShapeResult::offsetForPosition(results, run, targetX); |
+} |
+ |
float CachingWordShaper::fillGlyphBuffer(const Font* font, const TextRun& run, |
HashSet<const SimpleFontData*>* fallbackFonts, |
GlyphBuffer* glyphBuffer, unsigned from, unsigned to) |