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

Side by Side Diff: Source/devtools/front_end/console/ConsoleViewMessage.js

Issue 632573002: Adding regex support to search bar in dev tools console (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Implement regex search similar to Sublime Text Created 6 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 break; 1262 break;
1263 } 1263 }
1264 1264
1265 return sourceString + " " + typeString + " " + levelString + ": " + this .formattedMessage().textContent + "\n" + this._message.url + " line " + this._me ssage.line; 1265 return sourceString + " " + typeString + " " + levelString + ": " + this .formattedMessage().textContent + "\n" + this._message.url + " line " + this._me ssage.line;
1266 }, 1266 },
1267 1267
1268 get text() 1268 get text()
1269 { 1269 {
1270 return this._message.messageText; 1270 return this._message.messageText;
1271 }, 1271 },
1272
1273 /**
1274 * @return {!string}
1275 */
1276 getText: function()
1277 {
1278 return this._messageElement.textContent;
1279 },
1280
1281 highlightMatch: function(start, end, isCurrent)
1282 {
1283 if (!this._formattedMessage)
1284 return;
1285
1286 console.log("Highlighting from position " + start + " to " + end);
1287 WebInspector.highlightSearchResults(this._messageElement,
1288 [new WebInspector.SourceRange(start, end - start + 1)], undefined, i sCurrent);
1289 },
1272 } 1290 }
1273 1291
1274 /** 1292 /**
1275 * @constructor 1293 * @constructor
1276 * @extends {WebInspector.ConsoleViewMessage} 1294 * @extends {WebInspector.ConsoleViewMessage}
1277 * @param {!WebInspector.ConsoleMessage} consoleMessage 1295 * @param {!WebInspector.ConsoleMessage} consoleMessage
1278 * @param {?WebInspector.Linkifier} linkifier 1296 * @param {?WebInspector.Linkifier} linkifier
1279 * @param {number} nestingLevel 1297 * @param {number} nestingLevel
1280 */ 1298 */
1281 WebInspector.ConsoleGroupViewMessage = function(consoleMessage, linkifier, nesti ngLevel) 1299 WebInspector.ConsoleGroupViewMessage = function(consoleMessage, linkifier, nesti ngLevel)
(...skipping 29 matching lines...) Expand all
1311 { 1329 {
1312 if (!this._wrapperElement) { 1330 if (!this._wrapperElement) {
1313 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this ); 1331 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this );
1314 this._wrapperElement.classList.toggle("collapsed", this._collapsed); 1332 this._wrapperElement.classList.toggle("collapsed", this._collapsed);
1315 } 1333 }
1316 return this._wrapperElement; 1334 return this._wrapperElement;
1317 }, 1335 },
1318 1336
1319 __proto__: WebInspector.ConsoleViewMessage.prototype 1337 __proto__: WebInspector.ConsoleViewMessage.prototype
1320 } 1338 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/console/ConsoleView.js ('k') | Source/devtools/front_end/inspectorCommon.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698