Bug 1994921 - Cherry-pick commit b98ec96 from upstream harfbuzz to fix AAT shaping error. a=pascalc DONTBUILD

Original Revision: https://phabricator.services.mozilla.com/D269165

Differential Revision: https://phabricator.services.mozilla.com/D269196
This commit is contained in:
Jonathan Kew
2025-10-29 23:24:48 +00:00
committed by rvandermeulen@mozilla.com
parent b59c04e51a
commit 8cc419a251
4 changed files with 18 additions and 1 deletions

View File

@@ -87,7 +87,7 @@ struct hb_cache_t
{ {
unsigned int k = key & ((1u<<cache_bits)-1); unsigned int k = key & ((1u<<cache_bits)-1);
unsigned int v = values[k]; unsigned int v = values[k];
if ((key_bits + value_bits - cache_bits == 8 * sizeof (item_t) && v == (unsigned int) -1) || if ((key_bits + value_bits - cache_bits == 8 * sizeof (item_t) && (item_t) v == (item_t) -1) ||
(v >> value_bits) != (key >> cache_bits)) (v >> value_bits) != (key >> cache_bits))
return false; return false;
*value = v & ((1u<<value_bits)-1); *value = v & ((1u<<value_bits)-1);

View File

@@ -0,0 +1,7 @@
<!DOCTYPE html>
<meta charset=utf-8>
<div style="font:24px sans-serif">
<p>The two following lines should NOT look the same:</p>
<p>&#x0C95;&#x0CB0;&#x200D;&#x0CA8;&#x0CBE;&#x0C9F;&#x0C95;</p>
<p>&#x0C95;&#x0CB0;&#x200D;&#x0CA8;&#x0CBE;&#x0C9F;&#x0C95;</p>
</div>

View File

@@ -0,0 +1,7 @@
<!DOCTYPE html>
<meta charset=utf-8>
<div style="font:24px sans-serif">
<p>The two following lines should NOT look the same:</p>
<p>&#x0C95;&#x0CB0;&#x0CCD;&#x0CA8;&#x0CBE;&#x0C9F;&#x0C95;</p>
<p>&#x0C95;&#x0CB0;&#x200D;&#x0CA8;&#x0CBE;&#x0C9F;&#x0C95;</p>
</div>

View File

@@ -368,5 +368,8 @@ pref(intl.icu4x.segmenter.enabled,false) == ethiopic-wordspace.html ethiopic-wor
pref(layout.css.prefers-color-scheme.content-override,0) == utf16-bom.txt utf16-bom-ref.txt pref(layout.css.prefers-color-scheme.content-override,0) == utf16-bom.txt utf16-bom-ref.txt
test-pref(layout.css.prefers-color-scheme.content-override,0) ref-pref(layout.css.prefers-color-scheme.content-override,1) != utf16-bom.txt utf16-bom-ref.txt test-pref(layout.css.prefers-color-scheme.content-override,0) ref-pref(layout.css.prefers-color-scheme.content-override,1) != utf16-bom.txt utf16-bom-ref.txt
# Test for Kannada AAT shaping bug 1994921
!= kannada-1.html kannada-1-notref.html
# Reset default prefs. # Reset default prefs.
defaults defaults