| OLD | NEW |
| 1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 import re | 30 import re |
| 31 | 31 |
| 32 | 32 |
| 33 ACRONYMS = [ | 33 ACRONYMS = [ |
| 34 'CSSOM', | 34 'CSSOM', |
| 35 'CSS', | 35 'CSS', |
| 36 'DNS', | 36 'DNS', |
| 37 'FE', | 37 'FE', |
| 38 'FTP', | 38 'FTP', |
| 39 'HTML', | 39 'HTML', |
| 40 'IME', | |
| 41 'JS', | 40 'JS', |
| 42 'SVG', | 41 'SVG', |
| 43 'URL', | 42 'URL', |
| 44 'WOFF', | 43 'WOFF', |
| 45 'XML', | 44 'XML', |
| 46 'XSLT', | 45 'XSLT', |
| 47 'XSS', | 46 'XSS', |
| 48 ] | 47 ] |
| 49 | 48 |
| 50 | 49 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 87 |
| 89 | 88 |
| 90 def enable_conditional_if_endif(code, feature): | 89 def enable_conditional_if_endif(code, feature): |
| 91 # Jinja2 filter to generate if/endif directive blocks based on a feature | 90 # Jinja2 filter to generate if/endif directive blocks based on a feature |
| 92 if not feature: | 91 if not feature: |
| 93 return code | 92 return code |
| 94 condition = 'ENABLE(%s)' % feature | 93 condition = 'ENABLE(%s)' % feature |
| 95 return ('#if %s\n' % condition + | 94 return ('#if %s\n' % condition + |
| 96 code + | 95 code + |
| 97 '#endif // %s\n' % condition) | 96 '#endif // %s\n' % condition) |
| OLD | NEW |