| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Apple Inc. All rights reserved. | 3 * Copyright (C) 2010 Apple Inc. 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 are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 1856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1867 /** | 1867 /** |
| 1868 * @param {number} lineNumber | 1868 * @param {number} lineNumber |
| 1869 */ | 1869 */ |
| 1870 highlightLine: function(lineNumber) | 1870 highlightLine: function(lineNumber) |
| 1871 { | 1871 { |
| 1872 this.clearLineHighlight(); | 1872 this.clearLineHighlight(); |
| 1873 this._highlightedLine = lineNumber; | 1873 this._highlightedLine = lineNumber; |
| 1874 this.revealLine(lineNumber); | 1874 this.revealLine(lineNumber); |
| 1875 | 1875 |
| 1876 if (!this._readOnly) | 1876 if (!this._readOnly) |
| 1877 this._restoreSelection(WebInspector.TextRange.createFromLocation(lin
eNumber, 0), false); | 1877 this.setSelection(WebInspector.TextRange.createFromLocation(lineNumb
er, 0)); |
| 1878 | 1878 |
| 1879 this.addDecoration(lineNumber, "webkit-highlighted-line"); | 1879 this.addDecoration(lineNumber, "webkit-highlighted-line"); |
| 1880 }, | 1880 }, |
| 1881 | 1881 |
| 1882 clearLineHighlight: function() | 1882 clearLineHighlight: function() |
| 1883 { | 1883 { |
| 1884 if (typeof this._highlightedLine === "number") { | 1884 if (typeof this._highlightedLine === "number") { |
| 1885 this.removeDecoration(this._highlightedLine, "webkit-highlighted-lin
e"); | 1885 this.removeDecoration(this._highlightedLine, "webkit-highlighted-lin
e"); |
| 1886 delete this._highlightedLine; | 1886 delete this._highlightedLine; |
| 1887 } | 1887 } |
| (...skipping 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3762 var braces = this._braceMatcher.enclosingBraces(lineNumber, column); | 3762 var braces = this._braceMatcher.enclosingBraces(lineNumber, column); |
| 3763 if (braces && braces.rightBrace.lineNumber === lineNumber && braces.righ
tBrace.column === column) { | 3763 if (braces && braces.rightBrace.lineNumber === lineNumber && braces.righ
tBrace.column === column) { |
| 3764 this._mainPanel.setSelection(WebInspector.TextRange.createFromLocati
on(lineNumber, column + 1)); | 3764 this._mainPanel.setSelection(WebInspector.TextRange.createFromLocati
on(lineNumber, column + 1)); |
| 3765 return true; | 3765 return true; |
| 3766 } else | 3766 } else |
| 3767 return false; | 3767 return false; |
| 3768 }, | 3768 }, |
| 3769 } | 3769 } |
| 3770 | 3770 |
| 3771 WebInspector.debugDefaultTextEditor = false; | 3771 WebInspector.debugDefaultTextEditor = false; |
| OLD | NEW |