| Index: tools/grit/grit/format/html_inline.py
|
| diff --git a/tools/grit/grit/format/html_inline.py b/tools/grit/grit/format/html_inline.py
|
| index 253632de173e6a5d44fe3952c84deb646ee1622b..ca1541358d664e5112db2b6b288f0062528c53eb 100755
|
| --- a/tools/grit/grit/format/html_inline.py
|
| +++ b/tools/grit/grit/format/html_inline.py
|
| @@ -239,12 +239,18 @@ def DoInline(
|
| rewrite_function,
|
| filename_expansion_function=filename_expansion_function))
|
| return ""
|
| -
|
| - return pattern % InlineToString(
|
| - filepath, grd_node, allow_external_script=allow_external_script,
|
| + # To recursively save inlined files, we need InlinedData instance returned
|
| + # by DoInline.
|
| + inlined_data_inst=DoInline(filepath, grd_node,
|
| + allow_external_script=allow_external_script,
|
| strip_whitespace=strip_whitespace,
|
| filename_expansion_function=filename_expansion_function)
|
|
|
| + inlined_files.update(inlined_data_inst.inlined_files)
|
| +
|
| + return pattern % inlined_data_inst.inlined_data;
|
| +
|
| +
|
| def InlineIncludeFiles(src_match):
|
| """Helper function to directly inline generic external files (without
|
| wrapping them with any kind of tags).
|
| @@ -286,10 +292,15 @@ def DoInline(
|
| # Even if names_only is set, the CSS file needs to be opened, because it
|
| # can link to images that need to be added to the file set.
|
| inlined_files.add(filepath)
|
| +
|
| + # Inline stylesheets included in this css file.
|
| + text = _INCLUDE_RE.sub(InlineIncludeFiles,
|
| + util.ReadFile(filepath, util.BINARY))
|
| # When resolving CSS files we need to pass in the path so that relative URLs
|
| # can be resolved.
|
| - return pattern % InlineCSSText(util.ReadFile(filepath, util.BINARY),
|
| - filepath)
|
| +
|
| + return pattern % InlineCSSText(text, filepath)
|
| +
|
|
|
| def InlineCSSImages(text, filepath=input_filepath):
|
| """Helper function that inlines external images in CSS backgrounds."""
|
|
|