summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authorjshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-12 21:39:06 +0000
committerjshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-12 21:39:06 +0000
commit6e0398f34b4569e2b7f913fc7b20c73c242ab08b (patch)
tree8c7bbd92e87a950a4e1535bc91b6f3362f293c11 /third_party
parentf35725926137f7c80e943cf527a60ca1b8bd4cca (diff)
downloadchromium_src-6e0398f34b4569e2b7f913fc7b20c73c242ab08b.zip
chromium_src-6e0398f34b4569e2b7f913fc7b20c73c242ab08b.tar.gz
chromium_src-6e0398f34b4569e2b7f913fc7b20c73c242ab08b.tar.bz2
Fix two truncation bugs in harfbuzz-indic shaper.
This bugs in isMark and isLetter lead 'init' feature to be applied even when a syllable is not at the beginning of a word. See http://www.microsoft.com/typography/otfntdev/bengalot/features.htm for 'init' feature application in Bengali. It turned out that the upstream also fixed this (see https://bugs.freedesktop.org/show_bug.cgi?id=30319) exactly the same way. Change the upstream reference to 93d8573ddcf97648983a1c1b5cdda8a3ec6d4432 in README.chromium and remove 2 patches in chromium.patch because they're all landed in the upstream @93d8573ddcf97648 Two removed patches are: - Fix OOB access (in Tibetan shaper) @ff0612c2e7df1b86fc - Fix crash! (in harfbuzz-gpos.c) @81c8ef785b079980a In addition, the following upstream fix is included by going to 93d8573ddc. - Fix bug in contrib/harfbuzz-unicode.cc @93d8573ddcf9 Webkit bug to add a layout test for 'init' is https://bugs.webkit.org/show_bug.cgi?id=74310 BUG=107031 TEST=With Lohit Bengali font installed (the default on CrOS devices), go to http://i18nl10n.com/fonts/beng3.html and the result should be the same as the left in the screenshot attached to the bug instead of the right. A webkit layout test will be added and will be mentioned in the bug later. Review URL: http://codereview.chromium.org/8895014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114082 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/harfbuzz/README.chromium4
-rw-r--r--third_party/harfbuzz/chromium.patch27
-rw-r--r--third_party/harfbuzz/contrib/harfbuzz-unicode.c2
-rw-r--r--third_party/harfbuzz/src/harfbuzz-indic.cpp4
4 files changed, 5 insertions, 32 deletions
diff --git a/third_party/harfbuzz/README.chromium b/third_party/harfbuzz/README.chromium
index 12fd39a..c536a1e 100644
--- a/third_party/harfbuzz/README.chromium
+++ b/third_party/harfbuzz/README.chromium
@@ -2,8 +2,8 @@ Name: harfbuzz
Short Name: harfbuzz
URL: http://anongit.freedesktop.org/git/harfbuzz.old.git
Version: 0
-Date: 20110808
-Revision: d10a264823e81631336bab37f08a52cc243d3654
+Date: 20111101
+Revision: 93d8573ddcf97648983a1c1b5cdda8a3ec6d4432
Security Critical: yes
Description:
diff --git a/third_party/harfbuzz/chromium.patch b/third_party/harfbuzz/chromium.patch
index 84fe509..d3f405d 100644
--- a/third_party/harfbuzz/chromium.patch
+++ b/third_party/harfbuzz/chromium.patch
@@ -34,20 +34,6 @@ index 3837087..ce2ca6c 100644
#ifndef NO_OPENTYPE
if (HB_SelectScript(item, item->item.script == HB_Script_Arabic ? arabic_features : syriac_features)) {
-diff --git a/src/harfbuzz-gpos.c b/src/harfbuzz-gpos.c
-index a216005..7bd3b3b 100644
---- a/src/harfbuzz-gpos.c
-+++ b/src/harfbuzz-gpos.c
-@@ -3012,6 +3012,9 @@ static HB_Error Lookup_MarkMarkPos( GPOS_Instance* gpi,
- j--;
- }
-
-+ if ( i > buffer->in_pos )
-+ return HB_Err_Not_Covered;
-+
- error = _HB_OPEN_Coverage_Index( &mmp->Mark2Coverage, IN_GLYPH( j ),
- &mark2_index );
- if ( error )
diff --git a/src/harfbuzz-shaper.cpp b/src/harfbuzz-shaper.cpp
index ce4d4ac..5999e08 100644
--- a/src/harfbuzz-shaper.cpp
@@ -134,16 +120,3 @@ index ab5c07a..72c9aa3 100644
} HB_ShaperFlag;
/*
-diff --git a/src/harfbuzz-tibetan.c b/src/harfbuzz-tibetan.c
-index bfa31b1..847ac52 100644
---- a/src/harfbuzz-tibetan.c
-+++ b/src/harfbuzz-tibetan.c
-@@ -90,7 +90,7 @@ static const unsigned char tibetanForm[0x80] = {
-
-
- #define tibetan_form(c) \
-- (TibetanForm)tibetanForm[c - 0x0f40]
-+ ((c) >= 0x0f40 && (c) <= 0x0fc0 ? (TibetanForm)tibetanForm[(c) - 0x0f40] : TibetanOther)
-
- static const HB_OpenTypeFeature tibetan_features[] = {
- { HB_MAKE_TAG('c', 'c', 'm', 'p'), CcmpProperty },
diff --git a/third_party/harfbuzz/contrib/harfbuzz-unicode.c b/third_party/harfbuzz/contrib/harfbuzz-unicode.c
index 86458d0..f830216 100644
--- a/third_party/harfbuzz/contrib/harfbuzz-unicode.c
+++ b/third_party/harfbuzz/contrib/harfbuzz-unicode.c
@@ -114,7 +114,7 @@ hb_utf16_script_run_next(unsigned *num_code_points, HB_ScriptItem *output,
const HB_Script script = code_point_to_script(cp);
if (script != current_script) {
- if (current_script == init_script == HB_Script_Inherited) {
+ if (current_script == HB_Script_Inherited && init_script == HB_Script_Inherited) {
// If we started off as inherited, we take whatever we can find.
output->script = script;
current_script = script;
diff --git a/third_party/harfbuzz/src/harfbuzz-indic.cpp b/third_party/harfbuzz/src/harfbuzz-indic.cpp
index 4d8418b..ffe9573 100644
--- a/third_party/harfbuzz/src/harfbuzz-indic.cpp
+++ b/third_party/harfbuzz/src/harfbuzz-indic.cpp
@@ -37,7 +37,7 @@ static HB_Bool isLetter(HB_UChar16 ucs)
FLAG(HB_Letter_Titlecase) |
FLAG(HB_Letter_Modifier) |
FLAG(HB_Letter_Other);
- return FLAG(HB_GetUnicodeCharCategory(ucs)) & test;
+ return !!(FLAG(HB_GetUnicodeCharCategory(ucs)) & test);
}
static HB_Bool isMark(HB_UChar16 ucs)
@@ -45,7 +45,7 @@ static HB_Bool isMark(HB_UChar16 ucs)
const int test = FLAG(HB_Mark_NonSpacing) |
FLAG(HB_Mark_SpacingCombining) |
FLAG(HB_Mark_Enclosing);
- return FLAG(HB_GetUnicodeCharCategory(ucs)) & test;
+ return !!(FLAG(HB_GetUnicodeCharCategory(ucs)) & test);
}
enum Form {