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

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: Close drawer only in overlay mode. Created 7 years, 8 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 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698