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

Unified Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js

Issue 2270033003: DevTools: include traces when exporting console log via 'Save as' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use contentElement instead of formattedMessage Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js
diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js b/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js
index 88394e264d6298cd10b887e4860b92ad36993763..0f01f6b5242b5b9d7deb3f771fd299296255d2fb 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js
@@ -871,9 +871,7 @@ WebInspector.ConsoleViewMessage.prototype = {
matchesFilterRegex: function(regexObject)
{
regexObject.lastIndex = 0;
- var text = this.searchableElement().deepTextContent();
- if (this._anchorElement)
- text += " " + this._anchorElement.textContent;
+ var text = this.contentElement().deepTextContent();
return regexObject.test(text);
},
@@ -882,14 +880,14 @@ WebInspector.ConsoleViewMessage.prototype = {
*/
updateTimestamp: function(show)
{
- if (!this._formattedMessage)
+ if (!this._element)
return;
if (show && !this.timestampElement) {
this.timestampElement = createElementWithClass("span", "console-timestamp");
this.timestampElement.textContent = (new Date(this._message.timestamp)).toConsoleTime() + " ";
var afterRepeatCountChild = this._repeatCountElement && this._repeatCountElement.nextSibling;
- this._formattedMessage.insertBefore(this.timestampElement, this._formattedMessage.firstChild);
+ this._element.insertBefore(this.timestampElement, this._element.firstChild);
return;
}
@@ -1158,7 +1156,7 @@ WebInspector.ConsoleViewMessage.prototype = {
break;
}
- return sourceString + " " + typeString + " " + levelString + ": " + this.formattedMessage().textContent + "\n" + this._message.url + " line " + this._message.line;
+ return sourceString + " " + typeString + " " + levelString + ": " + this.contentElement().textContent + "\n" + this._message.url + " line " + this._message.line;
},
get text()
@@ -1179,15 +1177,15 @@ WebInspector.ConsoleViewMessage.prototype = {
if (!this._searchRegex)
return;
- var text = this.searchableElement().deepTextContent();
+ var text = this.contentElement().deepTextContent();
var match;
this._searchRegex.lastIndex = 0;
var sourceRanges = [];
while ((match = this._searchRegex.exec(text)) && match[0])
sourceRanges.push(new WebInspector.SourceRange(match.index, match[0].length));
- if (sourceRanges.length && this.searchableElement())
- this._searchHighlightNodes = WebInspector.highlightSearchResults(this.searchableElement(), sourceRanges, this._searchHiglightNodeChanges);
+ if (sourceRanges.length && this.contentElement())
+ this._searchHighlightNodes = WebInspector.highlightSearchResults(this.contentElement(), sourceRanges, this._searchHiglightNodeChanges);
},
/**
@@ -1215,15 +1213,6 @@ WebInspector.ConsoleViewMessage.prototype = {
},
/**
- * @return {!Element}
- */
- searchableElement: function()
- {
- this.formattedMessage();
- return this._messageElement;
- },
-
- /**
* @param {string} string
* @return {?Element}
*/

Powered by Google App Engine
This is Rietveld 408576698