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

Side by Side Diff: Source/devtools/front_end/DefaultTextEditor.js

Issue 14329024: [DevTools] Close drawer on blur after short timeout. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed comments. Created 7 years, 7 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
OLDNEW
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
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
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;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698