| Index: tools/grit/grit/gather/chrome_html.py
|
| diff --git a/tools/grit/grit/gather/chrome_html.py b/tools/grit/grit/gather/chrome_html.py
|
| index e7469bfd5d8eee766c5cb93dc31d45dd04f7ad7d..a8f8eb8ddbf8943af4c061ffb96b56eab246baaf 100755
|
| --- a/tools/grit/grit/gather/chrome_html.py
|
| +++ b/tools/grit/grit/gather/chrome_html.py
|
| @@ -286,6 +286,7 @@ class ChromeHtml(interface.GathererBase):
|
| super(ChromeHtml, self).__init__(*args, **kwargs)
|
| self.allow_external_script_ = False
|
| self.flatten_html_ = False
|
| + self.preprocess_only_ = False
|
| # 1x resources are implicitly already in the source and do not need to be
|
| # added.
|
| self.scale_factors_ = []
|
| @@ -294,8 +295,10 @@ class ChromeHtml(interface.GathererBase):
|
| def SetAttributes(self, attrs):
|
| self.allow_external_script_ = ('allowexternalscript' in attrs and
|
| attrs['allowexternalscript'] == 'true')
|
| - self.flatten_html_ = ('flattenhtml' in attrs and
|
| - attrs['flattenhtml'] == 'true')
|
| + self.preprocess_only_ = ('preprocess' in attrs and
|
| + attrs['preprocess'] == 'true')
|
| + self.flatten_html_ = (self.preprocess_only_ or ('flattenhtml' in attrs and
|
| + attrs['flattenhtml'] == 'true'))
|
|
|
| def SetDefines(self, defines):
|
| if 'scale_factors' in defines:
|
| @@ -346,6 +349,7 @@ class ChromeHtml(interface.GathererBase):
|
| filename,
|
| self.grd_node,
|
| allow_external_script = self.allow_external_script_,
|
| + preprocess_only = self.preprocess_only_,
|
| rewrite_function=lambda fp, t, d: ProcessImageSets(
|
| fp, t, self.scale_factors_, d,
|
| filename_expansion_function=self.filename_expansion_function),
|
|
|