def AppendDirectlyDependentFilenamesTo(self,
                                        dependent_filenames,
                                        include_raw_scripts=True):
     super(HTMLModule,
           self).AppendDirectlyDependentFilenamesTo(dependent_filenames,
                                                    include_raw_scripts)
     for contents in self._parser_results.inline_stylesheets:
         module_dirname = os.path.dirname(self.resource.absolute_path)
         ss = style_sheet.ParsedStyleSheet(self.loader, module_dirname,
                                           contents)
         ss.AppendDirectlyDependentFilenamesTo(dependent_filenames)
    def GetHTMLForInlineStylesheet(self, contents):
        if self.current_module == None:
            if re.search('url\(.+\)', contents):
                raise Exception(
                    'Default HTMLGenerationController cannot handle inline style urls'
                )
            return contents

        module_dirname = os.path.dirname(
            self.current_module.resource.absolute_path)
        ss = style_sheet.ParsedStyleSheet(self.current_module.loader,
                                          module_dirname, contents)
        return ss.contents_with_inlined_images