Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: third_party/harfbuzz/contrib/harfbuzz-unicode.c

Issue 8895014: Fix two truncation bugs in harfbuzz-indic shaper. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/harfbuzz/chromium.patch ('k') | third_party/harfbuzz/src/harfbuzz-indic.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include <stdint.h> 1 #include <stdint.h>
2 #include <stdlib.h> 2 #include <stdlib.h>
3 3
4 #include <harfbuzz-external.h> 4 #include <harfbuzz-external.h>
5 #include <harfbuzz-impl.h> 5 #include <harfbuzz-impl.h>
6 #include <harfbuzz-shaper.h> 6 #include <harfbuzz-shaper.h>
7 #include "harfbuzz-unicode.h" 7 #include "harfbuzz-unicode.h"
8 8
9 #include "tables/grapheme-break-properties.h" 9 #include "tables/grapheme-break-properties.h"
10 #include "tables/mirroring-properties.h" 10 #include "tables/mirroring-properties.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 if (*iter == len) 107 if (*iter == len)
108 break; 108 break;
109 const ssize_t prev_iter = *iter; 109 const ssize_t prev_iter = *iter;
110 const uint32_t cp = utf16_to_code_point(chars, len, iter); 110 const uint32_t cp = utf16_to_code_point(chars, len, iter);
111 if (cp == HB_InvalidCodePoint) 111 if (cp == HB_InvalidCodePoint)
112 return 0; 112 return 0;
113 cps++; 113 cps++;
114 const HB_Script script = code_point_to_script(cp); 114 const HB_Script script = code_point_to_script(cp);
115 115
116 if (script != current_script) { 116 if (script != current_script) {
117 if (current_script == init_script == HB_Script_Inherited) { 117 if (current_script == HB_Script_Inherited && init_script == HB_Script_Inhe rited) {
118 // If we started off as inherited, we take whatever we can find. 118 // If we started off as inherited, we take whatever we can find.
119 output->script = script; 119 output->script = script;
120 current_script = script; 120 current_script = script;
121 continue; 121 continue;
122 } else if (script == HB_Script_Inherited) { 122 } else if (script == HB_Script_Inherited) {
123 continue; 123 continue;
124 } else { 124 } else {
125 *iter = prev_iter; 125 *iter = prev_iter;
126 cps--; 126 cps--;
127 break; 127 break;
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 return ch; 261 return ch;
262 262
263 return ((const struct mirroring_property *) mprop)->b; 263 return ((const struct mirroring_property *) mprop)->b;
264 } 264 }
265 265
266 void * 266 void *
267 HB_Library_Resolve(const char *library, int version, const char *symbol) { 267 HB_Library_Resolve(const char *library, int version, const char *symbol) {
268 abort(); 268 abort();
269 return NULL; 269 return NULL;
270 } 270 }
OLDNEW
« no previous file with comments | « third_party/harfbuzz/chromium.patch ('k') | third_party/harfbuzz/src/harfbuzz-indic.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698