| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 * @param {string} content | 146 * @param {string} content |
| 147 * @param {function(string, !WebInspector.FormatterSourceMapping)} callback | 147 * @param {function(string, !WebInspector.FormatterSourceMapping)} callback |
| 148 */ | 148 */ |
| 149 formatContent: function(mimeType, content, callback) | 149 formatContent: function(mimeType, content, callback) |
| 150 { | 150 { |
| 151 callback(content, new WebInspector.IdentityFormatterSourceMapping()); | 151 callback(content, new WebInspector.IdentityFormatterSourceMapping()); |
| 152 } | 152 } |
| 153 } | 153 } |
| 154 | 154 |
| 155 /** | 155 /** |
| 156 * @constructor | 156 * @typedef {{original: !Array.<number>, formatted: !Array.<number>}} |
| 157 */ | 157 */ |
| 158 WebInspector.FormatterMappingPayload = function() | 158 WebInspector.FormatterMappingPayload; |
| 159 { | |
| 160 this.original = []; | |
| 161 this.formatted = []; | |
| 162 } | |
| 163 | 159 |
| 164 /** | 160 /** |
| 165 * @interface | 161 * @interface |
| 166 */ | 162 */ |
| 167 WebInspector.FormatterSourceMapping = function() | 163 WebInspector.FormatterSourceMapping = function() |
| 168 { | 164 { |
| 169 } | 165 } |
| 170 | 166 |
| 171 WebInspector.FormatterSourceMapping.prototype = { | 167 WebInspector.FormatterSourceMapping.prototype = { |
| 172 /** | 168 /** |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 */ | 257 */ |
| 262 _convertPosition: function(positions1, positions2, position) | 258 _convertPosition: function(positions1, positions2, position) |
| 263 { | 259 { |
| 264 var index = positions1.upperBound(position) - 1; | 260 var index = positions1.upperBound(position) - 1; |
| 265 var convertedPosition = positions2[index] + position - positions1[index]
; | 261 var convertedPosition = positions2[index] + position - positions1[index]
; |
| 266 if (index < positions2.length - 1 && convertedPosition > positions2[inde
x + 1]) | 262 if (index < positions2.length - 1 && convertedPosition > positions2[inde
x + 1]) |
| 267 convertedPosition = positions2[index + 1]; | 263 convertedPosition = positions2[index + 1]; |
| 268 return convertedPosition; | 264 return convertedPosition; |
| 269 } | 265 } |
| 270 } | 266 } |
| OLD | NEW |