Always initialize |m_totalWidth| in HarfBuzzShaper::shape.

R=leviw@chromium.org
BUG=476647

Review URL: https://codereview.chromium.org/1108663003

git-svn-id: svn://svn.chromium.org/blink/trunk@194541 bbb929c8-8fbe-4397-9dbb-9b2b20218538
bool HarfBuzzShaper::fillGlyphBuffer(GlyphBuffer* glyphBuffer)
{
    ASSERT(glyphBuffer);

    unsigned numRuns = m_harfBuzzRuns.size();
    float advanceSoFar = 0;
    for (unsigned runIndex = 0; runIndex < numRuns; ++runIndex) {
        HarfBuzzRun* currentRun = m_harfBuzzRuns[m_run.ltr() ? runIndex : numRuns - runIndex - 1].get();
        if (!currentRun->numGlyphs())
            continue;
        advanceSoFar += forTextEmphasis()
            ? fillGlyphBufferForTextEmphasis(glyphBuffer, currentRun, advanceSoFar)
            : fillGlyphBufferFromHarfBuzzRun(glyphBuffer, currentRun, advanceSoFar);
    }
    return glyphBuffer->size();
}

bool HarfBuzzShaper::fillGlyphBuffer(GlyphBuffer* glyphBuffer)
{
    ASSERT(glyphBuffer);

    unsigned numRuns = m_harfBuzzRuns.size();
    float advanceSoFar = 0;
    for (unsigned runIndex = 0; runIndex < numRuns; ++runIndex) {
        HarfBuzzRun* currentRun = m_harfBuzzRuns[m_run.ltr() ? runIndex : numRuns - runIndex - 1].get();
        if (!currentRun->numGlyphs())
            continue;
        advanceSoFar += forTextEmphasis()
            ? fillGlyphBufferForTextEmphasis(glyphBuffer, currentRun, advanceSoFar)
            : fillGlyphBufferFromHarfBuzzRun(glyphBuffer, currentRun, advanceSoFar);
    }
    return glyphBuffer->size();
}
