| Index: chrome/common/extensions/docs/build/directory.py
|
| diff --git a/chrome/common/extensions/docs/build/directory.py b/chrome/common/extensions/docs/build/directory.py
|
| index a751b5a8704231323366b14166c5acb461473c8a..705e039a9b5f3471fb904b46f3f6a20dd846d0a2 100644
|
| --- a/chrome/common/extensions/docs/build/directory.py
|
| +++ b/chrome/common/extensions/docs/build/directory.py
|
| @@ -83,13 +83,13 @@ def parse_idl_file(path):
|
| api_def = idl_schema.Load(path)
|
| for namespace_def in api_def:
|
| namespace_dot = namespace_def['namespace'] + '.'
|
| - types = dict((type_['id'], type_)
|
| - for type_ in namespace_def.get('types', [])
|
| - if type_)
|
| + inline_types = dict((type_['id'], type_)
|
| + for type_ in namespace_def.get('types', [])
|
| + if type_ and type_.get('inline_doc', False))
|
| def SubstituteInlineDoc(prop):
|
| prop_ref_type = prop.get('$ref', '')
|
| - type_obj = types.get(namespace_dot + prop_ref_type,
|
| - types.get(prop_ref_type, {}))
|
| + type_obj = inline_types.get(namespace_dot + prop_ref_type,
|
| + inline_types.get(prop_ref_type, {}))
|
| if not type_obj:
|
| return
|
| if 'properties' in type_obj:
|
| @@ -113,11 +113,9 @@ def parse_idl_file(path):
|
| if (prop.get('type', '') == 'array' and
|
| prop.get('items', {}).get('$ref', '').startswith(namespace_dot)):
|
| prop['items']['$ref'] = prop['items']['$ref'][len(namespace_dot):]
|
| - if prop.get('inline_doc', False):
|
| - del prop['inline_doc']
|
| - SubstituteInlineDoc(prop)
|
| - if 'items' in prop:
|
| - SubstituteInlineDoc(prop['items'])
|
| + SubstituteInlineDoc(prop)
|
| + if 'items' in prop:
|
| + SubstituteInlineDoc(prop['items'])
|
|
|
| for type_ in namespace_def.get('types', []):
|
| if type_.get('id', '').startswith(namespace_dot):
|
|
|