Chromium Code Reviews| Index: third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaper.cpp |
| diff --git a/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaper.cpp b/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaper.cpp |
| index 04d38a082bdbab31f04e79092e94c2e6d9db3cd5..d9ba993fa3b54f2e63a899c889c252aed851209f 100644 |
| --- a/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaper.cpp |
| +++ b/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaper.cpp |
| @@ -123,7 +123,13 @@ Vector<CharacterRange> CachingWordShaper::individualCharacterRanges( |
| float totalWidth = shapeResultsForRun(m_shapeCache, font, run, nullptr, |
| &buffer); |
| - return buffer.individualCharacterRanges(run.direction(), totalWidth); |
| + auto ranges = buffer.individualCharacterRanges(run.direction(), totalWidth); |
| + // The shaper can fail to return glyph metrics for all characters (see |
| + // crbug.com/613915) so add empty ranges to ensure all characters have an |
| + // associated range. |
| + while (ranges.size() < static_cast<unsigned>(run.length())) |
|
fs
2016/05/28 14:08:31
So this will do all the padding "at the end", whil
pdr.
2016/05/28 22:58:16
Great questions.
Ultimately I think this should b
fs
2016/05/29 14:35:55
Yes, I do prefer less pairs of belts and suspender
|
| + ranges.append(CharacterRange(0, 0)); |
| + return ranges; |
| } |
| }; // namespace blink |