summaryrefslogtreecommitdiffstats
path: root/third_party/harfbuzz/src
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-07 22:17:03 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-07 22:17:03 +0000
commit78f151842235a81b44e20c3ca574892c98c8176a (patch)
treed00a4dca7c4a4d4b6cf81ed03cd32faf4cc45013 /third_party/harfbuzz/src
parent6d1b02e8d93289c3a4e9fbfe310f2c2e232cee3f (diff)
downloadchromium_src-78f151842235a81b44e20c3ca574892c98c8176a.zip
chromium_src-78f151842235a81b44e20c3ca574892c98c8176a.tar.gz
chromium_src-78f151842235a81b44e20c3ca574892c98c8176a.tar.bz2
Linux: fix jump jump based on uninitialised value.
This is causing layout test flakiness and a curious effect where text seems to twitch back and forth randomly. I'm not at all sure about this fix. I'll send it upstream for review, but I want to get it fixed locally first because it's causing problems for us. http://codereview.chromium.org/165165 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22803 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/harfbuzz/src')
-rw-r--r--third_party/harfbuzz/src/harfbuzz-hebrew.c3
-rw-r--r--third_party/harfbuzz/src/harfbuzz-shaper.cpp3
2 files changed, 3 insertions, 3 deletions
diff --git a/third_party/harfbuzz/src/harfbuzz-hebrew.c b/third_party/harfbuzz/src/harfbuzz-hebrew.c
index 533a063..2bda386 100644
--- a/third_party/harfbuzz/src/harfbuzz-hebrew.c
+++ b/third_party/harfbuzz/src/harfbuzz-hebrew.c
@@ -56,6 +56,8 @@ HB_Bool HB_HebrewShape(HB_ShaperItem *shaper_item)
assert(shaper_item->item.script == HB_Script_Hebrew);
+ HB_HeuristicSetGlyphAttributes(shaper_item);
+
#ifndef NO_OPENTYPE
if (HB_SelectScript(shaper_item, hebrew_features)) {
@@ -64,7 +66,6 @@ HB_Bool HB_HebrewShape(HB_ShaperItem *shaper_item)
return FALSE;
- HB_HeuristicSetGlyphAttributes(shaper_item);
HB_OpenTypeShape(shaper_item, /*properties*/0);
return HB_OpenTypePosition(shaper_item, availableGlyphs, /*doLogClusters*/TRUE);
}
diff --git a/third_party/harfbuzz/src/harfbuzz-shaper.cpp b/third_party/harfbuzz/src/harfbuzz-shaper.cpp
index 36b9282..3628c88 100644
--- a/third_party/harfbuzz/src/harfbuzz-shaper.cpp
+++ b/third_party/harfbuzz/src/harfbuzz-shaper.cpp
@@ -433,7 +433,7 @@ void HB_HeuristicSetGlyphAttributes(HB_ShaperItem *item)
// ### zeroWidth and justification are missing here!!!!!
- assert(item->num_glyphs <= length);
+ assert(length <= item->num_glyphs);
// qDebug("QScriptEngine::heuristicSetGlyphAttributes, num_glyphs=%d", item->num_glyphs);
HB_GlyphAttributes *attributes = item->attributes;
@@ -451,7 +451,6 @@ void HB_HeuristicSetGlyphAttributes(HB_ShaperItem *item)
}
++glyph_pos;
}
- assert(glyph_pos == item->num_glyphs);
// first char in a run is never (treated as) a mark
int cStart = 0;