 Chromium Code Reviews
 Chromium Code Reviews Issue 2020863002:
  Guard against invalid glyph shaping results  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 2020863002:
  Guard against invalid glyph shaping results  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| Index: third_party/WebKit/Source/platform/fonts/Font.cpp | 
| diff --git a/third_party/WebKit/Source/platform/fonts/Font.cpp b/third_party/WebKit/Source/platform/fonts/Font.cpp | 
| index c268653f2c66b24c22610714271bdc0a76dd3aa1..7265af3eba9f963314105e0490e778b168fb442a 100644 | 
| --- a/third_party/WebKit/Source/platform/fonts/Font.cpp | 
| +++ b/third_party/WebKit/Source/platform/fonts/Font.cpp | 
| @@ -767,7 +767,9 @@ Vector<CharacterRange> Font::individualCharacterRanges(const TextRun& run) const | 
| // will be improved shaping in SVG when compared to HTML. | 
| FontCachePurgePreventer purgePreventer; | 
| CachingWordShaper shaper(m_fontFallbackList->shapeCache(m_fontDescription)); | 
| - return shaper.individualCharacterRanges(this, run); | 
| + auto ranges = shaper.individualCharacterRanges(this, run); | 
| + DCHECK(ranges.size() == static_cast<unsigned>(run.length())); | 
| 
fs
2016/05/28 14:08:31
Nit: DCHECK_EQ?
 
pdr.
2016/05/28 22:58:15
Done (also have a followup to remove those unruly
 
fs
2016/05/29 14:35:55
Yeah, no one likes static cats...
 | 
| + return ranges; | 
| } | 
| float Font::floatWidthForSimpleText(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts, FloatRect* glyphBounds) const |