| 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 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1856 /** | 1856 /** |
| 1857 * @param {number} lineNumber | 1857 * @param {number} lineNumber |
| 1858 */ | 1858 */ |
| 1859 highlightLine: function(lineNumber) | 1859 highlightLine: function(lineNumber) |
| 1860 { | 1860 { |
| 1861 this.clearLineHighlight(); | 1861 this.clearLineHighlight(); |
| 1862 this._highlightedLine = lineNumber; | 1862 this._highlightedLine = lineNumber; |
| 1863 this.revealLine(lineNumber); | 1863 this.revealLine(lineNumber); |
| 1864 | 1864 |
| 1865 if (!this._readOnly) | 1865 if (!this._readOnly) |
| 1866 this._restoreSelection(WebInspector.TextRange.createFromLocation(lin
eNumber, 0), false); | 1866 this.setSelection(WebInspector.TextRange.createFromLocation(lineNumb
er, 0)); |
| 1867 | 1867 |
| 1868 this.addDecoration(lineNumber, "webkit-highlighted-line"); | 1868 this.addDecoration(lineNumber, "webkit-highlighted-line"); |
| 1869 }, | 1869 }, |
| 1870 | 1870 |
| 1871 clearLineHighlight: function() | 1871 clearLineHighlight: function() |
| 1872 { | 1872 { |
| 1873 if (typeof this._highlightedLine === "number") { | 1873 if (typeof this._highlightedLine === "number") { |
| 1874 this.removeDecoration(this._highlightedLine, "webkit-highlighted-lin
e"); | 1874 this.removeDecoration(this._highlightedLine, "webkit-highlighted-lin
e"); |
| 1875 delete this._highlightedLine; | 1875 delete this._highlightedLine; |
| 1876 } | 1876 } |
| (...skipping 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3746 var braces = this._braceMatcher.enclosingBraces(lineNumber, column); | 3746 var braces = this._braceMatcher.enclosingBraces(lineNumber, column); |
| 3747 if (braces && braces.rightBrace.lineNumber === lineNumber && braces.righ
tBrace.column === column) { | 3747 if (braces && braces.rightBrace.lineNumber === lineNumber && braces.righ
tBrace.column === column) { |
| 3748 this._mainPanel.setSelection(WebInspector.TextRange.createFromLocati
on(lineNumber, column + 1)); | 3748 this._mainPanel.setSelection(WebInspector.TextRange.createFromLocati
on(lineNumber, column + 1)); |
| 3749 return true; | 3749 return true; |
| 3750 } else | 3750 } else |
| 3751 return false; | 3751 return false; |
| 3752 }, | 3752 }, |
| 3753 } | 3753 } |
| 3754 | 3754 |
| 3755 WebInspector.debugDefaultTextEditor = false; | 3755 WebInspector.debugDefaultTextEditor = false; |
| OLD | NEW |