Bug 113882 - REGRESSION(130231): Leaves m_glyphToCharacterIndexes uninitialized
Summary: REGRESSION(130231): Leaves m_glyphToCharacterIndexes uninitialized
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dominik Röttsches (drott)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-03 09:24 PDT by Dominik Röttsches (drott)
Modified: 2013-04-15 12:59 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.96 KB, text/plain)
2013-04-03 09:35 PDT, Dominik Röttsches (drott)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Röttsches (drott) 2013-04-03 09:24:19 PDT
As commented in https://bugs.webkit.org/show_bug.cgi?id=97993#c13
the patch from r130231 removes

-    hb_glyph_info_t* infos = hb_buffer_get_glyph_infos(harfBuzzBuffer, 0);
-    for (unsigned i = 0; i < m_numGlyphs; ++i)
-        m_glyphToCharacterIndexes[i] = infos[i].cluster;

in HarfBuzzShaper::HarfBuzzRun::applyShapeResult.

And I can't see any replacement for that in r130231. AFAICS, with that, m_glyphToCharacterIndexes becomes uninitialized.

Unfortunately, I don't have a test to prove it yet. But I am suspecting it breaks selection in certain cases.
Comment 1 Dominik Röttsches (drott) 2013-04-03 09:35:52 PDT
Created attachment 196364 [details]
Patch
Comment 2 Dominik Röttsches (drott) 2013-04-04 08:32:30 PDT
Never mind, it is initialized in

@@ -361,6 +346,7 @@ void HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun(HarfBuzzRun* currentRun, hb
     hb_glyph_position_t* glyphPositions = hb_buffer_get_glyph_positions(harfbuzzBuffer, 0);
 
     unsigned numGlyphs = currentRun->numGlyphs();
+    uint16_t* glyphToCharacterIndexes = currentRun->glyphToCharacterIndexes();
Comment 3 Brent Fulgham 2013-04-05 20:28:13 PDT
Comment on attachment 196364 [details]
Patch

Clearing review patch since this was resolved.