diff options
author | andybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 02:03:49 +0000 |
---|---|---|
committer | andybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 02:03:49 +0000 |
commit | 10abd198e989f003f5f2fcaad735bf3566a5f8ba (patch) | |
tree | c123193e87d254fc8a63526bcce584ea39569f87 /tools/grit | |
parent | ff7321db2060aa69b63b2090b0e5eb92d2df704e (diff) | |
download | chromium_src-10abd198e989f003f5f2fcaad735bf3566a5f8ba.zip chromium_src-10abd198e989f003f5f2fcaad735bf3566a5f8ba.tar.gz chromium_src-10abd198e989f003f5f2fcaad735bf3566a5f8ba.tar.bz2 |
o Add user customizable launch type for apps by adding options in each apps context menu.
o Updated some comments that were using the outdated NOTIFY_PREF_CHANGED notification.
o Make LAUNCH_PINNED the default type returned by ExtensionPrefs if it does not already exist.
o Some minor refactoring within the code to reduce duplication.
BUG=54731
TEST=NONE
patch from issue 3419010
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=60997
Reverted: http://crrev.com/61000
Review URL: http://codereview.chromium.org/3453029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61021 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/grit')
-rwxr-xr-x | tools/grit/grit/format/html_inline.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/grit/grit/format/html_inline.py b/tools/grit/grit/format/html_inline.py index b23f951..71d0f68 100755 --- a/tools/grit/grit/format/html_inline.py +++ b/tools/grit/grit/format/html_inline.py @@ -136,12 +136,12 @@ def InlineFile(input_filename, output_filename, grd_node): """Helper function to inline external script files""" return InlineFileContents(src_match, '<script>%s</script>') - def InlineCssText(text, css_filepath): + def InlineCSSText(text, css_filepath): """Helper function that inlines external resources in CSS text""" filepath = os.path.dirname(css_filepath) - return InlineCssBackgroundImages(text, filepath) + return InlineCSSImages(text, filepath) - def InlineCssFile(src_match, inlined_files=inlined_files): + def InlineCSSFile(src_match, inlined_files=inlined_files): """Helper function to inline external css files. Args: @@ -157,11 +157,11 @@ def InlineFile(input_filename, output_filename, grd_node): inlined_files.add(filepath) # When resolving CSS files we need to pass in the path so that relative URLs # can be resolved. - return '<style>%s</style>' % InlineCssText(ReadFile(filepath), filepath) + return '<style>%s</style>' % InlineCSSText(ReadFile(filepath), filepath) - def InlineCssBackgroundImages(text, filepath=input_filepath): + def InlineCSSImages(text, filepath=input_filepath): """Helper function that inlines external images in CSS backgrounds.""" - return re.sub('background(?:-image)?:[ ]*url\((?:\'|\")' + + return re.sub('(?:content|background(?:-image)?):[ ]*url\((?:\'|\")' + '(?P<filename>[^"\'\)\(]*)(?:\'|\")', lambda m: SrcReplace(m, filepath), text) @@ -174,7 +174,7 @@ def InlineFile(input_filename, output_filename, grd_node): flat_text = re.sub( '<link rel="stylesheet".+?href="(?P<filename>[^"\']*)".*?>', - InlineCssFile, + InlineCSSFile, flat_text) flat_text = re.sub( @@ -194,7 +194,7 @@ def InlineFile(input_filename, output_filename, grd_node): flat_text) # TODO(arv): Only do this inside <style> tags. - flat_text = InlineCssBackgroundImages(flat_text) + flat_text = InlineCSSImages(flat_text) flat_text = re.sub('<link rel="icon".+?href="(?P<filename>[^"\']*)"', SrcReplace, |