From 87e43b7f2be25840748f920ca33ff553833da45f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 14 Dec 2012 17:48:23 -0500 Subject: [PATCH] [OTLayout] Wire tag and list start all the way to Feature To fix FeatureParam issues. No actual fix yet, just plumbing. --- src/hb-ot-layout-common-private.hh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh index da6c8f9f7..1671717e9 100644 --- a/src/hb-ot-layout-common-private.hh +++ b/src/hb-ot-layout-common-private.hh @@ -60,9 +60,14 @@ struct Record return tag.cmp (a); } + struct sanitize_closure_t { + hb_tag_t tag; + void *list_base; + }; inline bool sanitize (hb_sanitize_context_t *c, void *base) { TRACE_SANITIZE (this); - return TRACE_RETURN (c->check_struct (this) && offset.sanitize (c, base)); + const sanitize_closure_t closure = {tag, base}; + return TRACE_RETURN (c->check_struct (this) && offset.sanitize (c, base, &closure)); } Tag tag; /* 4-byte Tag identifier */ @@ -192,7 +197,8 @@ struct LangSys return reqFeatureIndex;; } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c, + const Record::sanitize_closure_t * = NULL) { TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this) && featureIndex.sanitize (c)); } @@ -230,7 +236,8 @@ struct Script inline bool has_default_lang_sys (void) const { return defaultLangSys != 0; } inline const LangSys& get_default_lang_sys (void) const { return this+defaultLangSys; } - inline bool sanitize (hb_sanitize_context_t *c) { + inline bool sanitize (hb_sanitize_context_t *c, + const Record