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

Side by Side Diff: Tools/gdb/webkit.py

Issue 1202773002: Prevent scientific notation in LayoutUnit gdb prettyprinter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698