OLD | NEW |
1 # Copyright (C) 2010, Google Inc. All rights reserved. | 1 # Copyright (C) 2010, 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 def to_string(self): | 164 def to_string(self): |
165 return WTFStringPrinter(self.val['m_string']).to_string() | 165 return WTFStringPrinter(self.val['m_string']).to_string() |
166 | 166 |
167 | 167 |
168 class blinkLayoutUnitPrinter: | 168 class blinkLayoutUnitPrinter: |
169 "Print a blink::LayoutUnit" | 169 "Print a blink::LayoutUnit" |
170 def __init__(self, val): | 170 def __init__(self, val): |
171 self.val = val | 171 self.val = val |
172 | 172 |
173 def to_string(self): | 173 def to_string(self): |
174 return "%gpx" % (self.val['m_value'] / 64.0) | 174 return "%.14gpx" % (self.val['m_value'] / 64.0) |
175 | 175 |
176 | 176 |
177 class blinkLayoutSizePrinter: | 177 class blinkLayoutSizePrinter: |
178 "Print a blink::LayoutSize" | 178 "Print a blink::LayoutSize" |
179 def __init__(self, val): | 179 def __init__(self, val): |
180 self.val = val | 180 self.val = val |
181 | 181 |
182 def to_string(self): | 182 def to_string(self): |
183 return 'LayoutSize(%s, %s)' % (blinkLayoutUnitPrinter(self.val['m_width'
]).to_string(), blinkLayoutUnitPrinter(self.val['m_height']).to_string()) | 183 return 'LayoutSize(%s, %s)' % (blinkLayoutUnitPrinter(self.val['m_width'
]).to_string(), blinkLayoutUnitPrinter(self.val['m_height']).to_string()) |
184 | 184 |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 padding = '' | 454 padding = '' |
455 while len(stack) > 0: | 455 while len(stack) > 0: |
456 pair = stack.pop() | 456 pair = stack.pop() |
457 print(padding, pair[1], pair[0]) | 457 print(padding, pair[1], pair[0]) |
458 padding = padding + ' ' | 458 padding = padding + ' ' |
459 else: | 459 else: |
460 print('Sorry: I don\'t know how to deal with %s yet.' % target_type) | 460 print('Sorry: I don\'t know how to deal with %s yet.' % target_type) |
461 | 461 |
462 | 462 |
463 PrintPathToRootCommand() | 463 PrintPathToRootCommand() |
OLD | NEW |