Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: Tools/Scripts/webkitpy/w3c/test_converter.py

Issue 1162333004: W3C test_converter.py fails to prefix if previous declaration does not have ";" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Tools/Scripts/webkitpy/w3c/test_converter_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 3 # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
4 # 4 #
5 # Redistribution and use in source and binary forms, with or without 5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions 6 # modification, are permitted provided that the following conditions
7 # are met: 7 # are met:
8 # 8 #
9 # 1. Redistributions of source code must retain the above 9 # 1. Redistributions of source code must retain the above
10 # copyright notice, this list of conditions and the following 10 # copyright notice, this list of conditions and the following
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 'text-combine-upright': '-webkit-text-combine' 88 'text-combine-upright': '-webkit-text-combine'
89 } 89 }
90 self.renamed_values = { 90 self.renamed_values = {
91 'text-combine-upright': {'all': 'horizontal'} 91 'text-combine-upright': {'all': 'horizontal'}
92 } 92 }
93 93
94 prop_regex = '([\s{]|^)(' + "|".join(itertools.chain( 94 prop_regex = '([\s{]|^)(' + "|".join(itertools.chain(
95 self.renamed_properties.iterkeys(), 95 self.renamed_properties.iterkeys(),
96 self.renamed_values.iterkeys(), 96 self.renamed_values.iterkeys(),
97 self.prefixed_values.iterkeys(), 97 self.prefixed_values.iterkeys(),
98 (prop.replace('-webkit-', '') for prop in self.prefixed_properties)) ) + ')(\s+:|:[^;]*)' 98 (prop.replace('-webkit-', '') for prop in self.prefixed_properties)) ) + ')(\s*:\s*[-\w]*)'
99 self.prop_re = re.compile(prop_regex) 99 self.prop_re = re.compile(prop_regex)
100 100
101 def output(self): 101 def output(self):
102 return (self.converted_properties, ''.join(self.converted_data)) 102 return (self.converted_properties, ''.join(self.converted_data))
103 103
104 def path_from_webkit_root(self, *comps): 104 def path_from_webkit_root(self, *comps):
105 return self._filesystem.abspath(self._filesystem.join(self._webkit_root, *comps)) 105 return self._filesystem.abspath(self._filesystem.join(self._webkit_root, *comps))
106 106
107 def read_webkit_prefixed_css_property_list(self): 107 def read_webkit_prefixed_css_property_list(self):
108 prefixed_properties = [] 108 prefixed_properties = []
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 self.converted_data.extend(['&#', name, ';']) 254 self.converted_data.extend(['&#', name, ';'])
255 255
256 def handle_comment(self, data): 256 def handle_comment(self, data):
257 self.converted_data.extend(['<!-- ', data, ' -->']) 257 self.converted_data.extend(['<!-- ', data, ' -->'])
258 258
259 def handle_decl(self, decl): 259 def handle_decl(self, decl):
260 self.converted_data.extend(['<!', decl, '>']) 260 self.converted_data.extend(['<!', decl, '>'])
261 261
262 def handle_pi(self, data): 262 def handle_pi(self, data):
263 self.converted_data.extend(['<?', data, '>']) 263 self.converted_data.extend(['<?', data, '>'])
OLDNEW
« no previous file with comments | « no previous file | Tools/Scripts/webkitpy/w3c/test_converter_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698