[OTLayout] Wire tag and list start all the way to Feature
To fix FeatureParam issues. No actual fix yet, just plumbing.
This commit is contained in:
parent
85bc44b90a
commit
87e43b7f2b
|
@ -60,9 +60,14 @@ struct Record
|
||||||
return tag.cmp (a);
|
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) {
|
inline bool sanitize (hb_sanitize_context_t *c, void *base) {
|
||||||
TRACE_SANITIZE (this);
|
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 */
|
Tag tag; /* 4-byte Tag identifier */
|
||||||
|
@ -192,7 +197,8 @@ struct LangSys
|
||||||
return reqFeatureIndex;;
|
return reqFeatureIndex;;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool sanitize (hb_sanitize_context_t *c) {
|
inline bool sanitize (hb_sanitize_context_t *c,
|
||||||
|
const Record<LangSys>::sanitize_closure_t * = NULL) {
|
||||||
TRACE_SANITIZE (this);
|
TRACE_SANITIZE (this);
|
||||||
return TRACE_RETURN (c->check_struct (this) && featureIndex.sanitize (c));
|
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 bool has_default_lang_sys (void) const { return defaultLangSys != 0; }
|
||||||
inline const LangSys& get_default_lang_sys (void) const { return this+defaultLangSys; }
|
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<Script>::sanitize_closure_t * = NULL) {
|
||||||
TRACE_SANITIZE (this);
|
TRACE_SANITIZE (this);
|
||||||
return TRACE_RETURN (defaultLangSys.sanitize (c, this) && langSys.sanitize (c, this));
|
return TRACE_RETURN (defaultLangSys.sanitize (c, this) && langSys.sanitize (c, this));
|
||||||
}
|
}
|
||||||
|
@ -413,7 +420,8 @@ struct Feature
|
||||||
inline const FeatureParams &get_feature_params (void) const
|
inline const FeatureParams &get_feature_params (void) const
|
||||||
{ return this+featureParams; }
|
{ return this+featureParams; }
|
||||||
|
|
||||||
inline bool sanitize (hb_sanitize_context_t *c) {
|
inline bool sanitize (hb_sanitize_context_t *c,
|
||||||
|
const Record<Feature>::sanitize_closure_t *closure) {
|
||||||
TRACE_SANITIZE (this);
|
TRACE_SANITIZE (this);
|
||||||
return TRACE_RETURN (c->check_struct (this) && lookupIndex.sanitize (c) &&
|
return TRACE_RETURN (c->check_struct (this) && lookupIndex.sanitize (c) &&
|
||||||
featureParams.sanitize (c, this));
|
featureParams.sanitize (c, this));
|
||||||
|
|
Loading…
Reference in New Issue