Index: Source/platform/fonts/shaping/CachingWordShaper.cpp |
diff --git a/Source/platform/fonts/shaping/CachingWordShaper.cpp b/Source/platform/fonts/shaping/CachingWordShaper.cpp |
index b9b2d77c9bad48c9dcf3cb0b6bdb9bb6fc0b6e61..b632fd49e7764c79e964a65396fac03cd3e98844 100644 |
--- a/Source/platform/fonts/shaping/CachingWordShaper.cpp |
+++ b/Source/platform/fonts/shaping/CachingWordShaper.cpp |
@@ -56,12 +56,14 @@ float CachingWordShaper::width(const Font* font, const TextRun& run, |
{ |
float width = 0; |
RefPtr<ShapeResult> wordResult; |
- CachingWordShapeIterator iterator(m_shapeCache, run, font, fallbackFonts); |
+ CachingWordShapeIterator iterator(m_shapeCache, run, font); |
while (iterator.next(&wordResult)) { |
if (wordResult) { |
width += wordResult->width(); |
if (glyphBounds) |
glyphBounds->unite(wordResult->bounds()); |
+ if (fallbackFonts) |
+ wordResult->fallbackFonts(fallbackFonts); |
} |
} |
@@ -72,13 +74,15 @@ static inline float shapeResultsForRun(ShapeCache* shapeCache, const Font* font, |
const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts, |
Vector<RefPtr<ShapeResult>>* results) |
{ |
- CachingWordShapeIterator iterator(shapeCache, run, font, fallbackFonts); |
+ CachingWordShapeIterator iterator(shapeCache, run, font); |
RefPtr<ShapeResult> wordResult; |
float totalWidth = 0; |
while (iterator.next(&wordResult)) { |
if (wordResult) { |
results->append(wordResult); |
totalWidth += wordResult->width(); |
+ if (fallbackFonts) |
+ wordResult->fallbackFonts(fallbackFonts); |
} |
} |
return totalWidth; |