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

Side by Side Diff: third_party/harfbuzz-ng/src/hb-ot-layout-gsubgpos-private.hh

Issue 2163983005: Roll HarfBuzz to 1.3.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months 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
OLDNEW
1 /* 1 /*
2 * Copyright © 2007,2008,2009,2010 Red Hat, Inc. 2 * Copyright © 2007,2008,2009,2010 Red Hat, Inc.
3 * Copyright © 2010,2012 Google, Inc. 3 * Copyright © 2010,2012 Google, Inc.
4 * 4 *
5 * This is part of HarfBuzz, a text shaping library. 5 * This is part of HarfBuzz, a text shaping library.
6 * 6 *
7 * Permission is hereby granted, without written agreement and without 7 * Permission is hereby granted, without written agreement and without
8 * license or royalty fees, to use, copy, modify, and distribute this 8 * license or royalty fees, to use, copy, modify, and distribute this
9 * software and its documentation for any purpose, provided that the 9 * software and its documentation for any purpose, provided that the
10 * above copyright notice and the following two paragraphs appear in 10 * above copyright notice and the following two paragraphs appear in
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 continue; 989 continue;
990 990
991 unsigned int new_len = buffer->backtrack_len () + buffer->lookahead_len (); 991 unsigned int new_len = buffer->backtrack_len () + buffer->lookahead_len ();
992 int delta = new_len - orig_len; 992 int delta = new_len - orig_len;
993 993
994 if (!delta) 994 if (!delta)
995 continue; 995 continue;
996 996
997 /* Recursed lookup changed buffer len. Adjust. */ 997 /* Recursed lookup changed buffer len. Adjust. */
998 998
999 /* end can't go back past the current match position. 999 end = int (end) + delta;
1000 * Note: this is only true because we do NOT allow MultipleSubst 1000 if (end <= match_positions[idx])
1001 * with zero sequence len. */ 1001 {
1002 end = MAX (MIN((int) match_positions[idx] + 1, (int) new_len), int (end) + d elta); 1002 /* There can't be any further changes. */
1003 assert (end == match_positions[idx]);
1004 break;
1005 }
1003 1006
1004 unsigned int next = idx + 1; /* next now is the position after the recursed lookup. */ 1007 unsigned int next = idx + 1; /* next now is the position after the recursed lookup. */
1005 1008
1006 if (delta > 0) 1009 if (delta > 0)
1007 { 1010 {
1008 if (unlikely (delta + count > HB_MAX_CONTEXT_LENGTH)) 1011 if (unlikely (delta + count > HB_MAX_CONTEXT_LENGTH))
1009 break; 1012 break;
1010 } 1013 }
1011 else 1014 else
1012 { 1015 {
(...skipping 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after
2287 lookupList; /* LookupList table */ 2290 lookupList; /* LookupList table */
2288 public: 2291 public:
2289 DEFINE_SIZE_STATIC (10); 2292 DEFINE_SIZE_STATIC (10);
2290 }; 2293 };
2291 2294
2292 2295
2293 } /* namespace OT */ 2296 } /* namespace OT */
2294 2297
2295 2298
2296 #endif /* HB_OT_LAYOUT_GSUBGPOS_PRIVATE_HH */ 2299 #endif /* HB_OT_LAYOUT_GSUBGPOS_PRIVATE_HH */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698