| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 * @interface | 133 * @interface |
| 134 */ | 134 */ |
| 135 Sources.FormatterSourceMapping = function() {}; | 135 Sources.FormatterSourceMapping = function() {}; |
| 136 | 136 |
| 137 Sources.FormatterSourceMapping.prototype = { | 137 Sources.FormatterSourceMapping.prototype = { |
| 138 /** | 138 /** |
| 139 * @param {number} lineNumber | 139 * @param {number} lineNumber |
| 140 * @param {number=} columnNumber | 140 * @param {number=} columnNumber |
| 141 * @return {!Array.<number>} | 141 * @return {!Array.<number>} |
| 142 */ | 142 */ |
| 143 originalToFormatted: function(lineNumber, columnNumber) {}, | 143 originalToFormatted(lineNumber, columnNumber) {}, |
| 144 | 144 |
| 145 /** | 145 /** |
| 146 * @param {number} lineNumber | 146 * @param {number} lineNumber |
| 147 * @param {number=} columnNumber | 147 * @param {number=} columnNumber |
| 148 * @return {!Array.<number>} | 148 * @return {!Array.<number>} |
| 149 */ | 149 */ |
| 150 formattedToOriginal: function(lineNumber, columnNumber) {} | 150 formattedToOriginal(lineNumber, columnNumber) {} |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 /** | 153 /** |
| 154 * @implements {Sources.FormatterSourceMapping} | 154 * @implements {Sources.FormatterSourceMapping} |
| 155 * @unrestricted | 155 * @unrestricted |
| 156 */ | 156 */ |
| 157 Sources.IdentityFormatterSourceMapping = class { | 157 Sources.IdentityFormatterSourceMapping = class { |
| 158 /** | 158 /** |
| 159 * @override | 159 * @override |
| 160 * @param {number} lineNumber | 160 * @param {number} lineNumber |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 * @return {number} | 226 * @return {number} |
| 227 */ | 227 */ |
| 228 _convertPosition(positions1, positions2, position) { | 228 _convertPosition(positions1, positions2, position) { |
| 229 var index = positions1.upperBound(position) - 1; | 229 var index = positions1.upperBound(position) - 1; |
| 230 var convertedPosition = positions2[index] + position - positions1[index]; | 230 var convertedPosition = positions2[index] + position - positions1[index]; |
| 231 if (index < positions2.length - 1 && convertedPosition > positions2[index +
1]) | 231 if (index < positions2.length - 1 && convertedPosition > positions2[index +
1]) |
| 232 convertedPosition = positions2[index + 1]; | 232 convertedPosition = positions2[index + 1]; |
| 233 return convertedPosition; | 233 return convertedPosition; |
| 234 } | 234 } |
| 235 }; | 235 }; |
| OLD | NEW |