Title: [173463] trunk/Source/WebInspectorUI
- Revision
- 173463
- Author
- [email protected]
- Date
- 2014-09-10 08:51:19 -0700 (Wed, 10 Sep 2014)
Log Message
Web Inspector: Remove unused Console search highlight methods
https://bugs.webkit.org/show_bug.cgi?id=136661
Patch by Joseph Pecoraro <[email protected]> on 2014-09-10
Reviewed by Timothy Hatcher.
ESLint's no-undef warning complained about some undefined references
in these functions that would have thrown exceptions. Turns out this
code is unused, and we do highlighting in the console separately.
* UserInterface/Views/ConsoleCommand.js:
(WebInspector.ConsoleCommand.prototype.clearHighlight): Deleted.
(WebInspector.ConsoleCommand.prototype.highlightSearchResults): Deleted.
(WebInspector.ConsoleCommand.prototype.matchesRegex): Deleted.
* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype.clearHighlight): Deleted.
(WebInspector.ConsoleMessageImpl.prototype.highlightSearchResults): Deleted.
(WebInspector.ConsoleMessageImpl.prototype.matchesRegex): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (173462 => 173463)
--- trunk/Source/WebInspectorUI/ChangeLog 2014-09-10 15:49:02 UTC (rev 173462)
+++ trunk/Source/WebInspectorUI/ChangeLog 2014-09-10 15:51:19 UTC (rev 173463)
@@ -1,5 +1,25 @@
2014-09-10 Joseph Pecoraro <[email protected]>
+ Web Inspector: Remove unused Console search highlight methods
+ https://bugs.webkit.org/show_bug.cgi?id=136661
+
+ Reviewed by Timothy Hatcher.
+
+ ESLint's no-undef warning complained about some undefined references
+ in these functions that would have thrown exceptions. Turns out this
+ code is unused, and we do highlighting in the console separately.
+
+ * UserInterface/Views/ConsoleCommand.js:
+ (WebInspector.ConsoleCommand.prototype.clearHighlight): Deleted.
+ (WebInspector.ConsoleCommand.prototype.highlightSearchResults): Deleted.
+ (WebInspector.ConsoleCommand.prototype.matchesRegex): Deleted.
+ * UserInterface/Views/ConsoleMessageImpl.js:
+ (WebInspector.ConsoleMessageImpl.prototype.clearHighlight): Deleted.
+ (WebInspector.ConsoleMessageImpl.prototype.highlightSearchResults): Deleted.
+ (WebInspector.ConsoleMessageImpl.prototype.matchesRegex): Deleted.
+
+2014-09-10 Joseph Pecoraro <[email protected]>
+
Web Inspector: Fix ESLint* no-avoidable-bind warnings
https://bugs.webkit.org/show_bug.cgi?id=136690
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleCommand.js (173462 => 173463)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleCommand.js 2014-09-10 15:49:02 UTC (rev 173462)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleCommand.js 2014-09-10 15:51:19 UTC (rev 173463)
@@ -39,34 +39,6 @@
// Public
- clearHighlight: function()
- {
- var highlightedMessage = this._formattedCommand;
- delete this._formattedCommand;
- this._formatCommand();
- this._element.replaceChild(this._formattedCommand, highlightedMessage);
- },
-
- highlightSearchResults: function(regexObject)
- {
- regexObject.lastIndex = 0;
- var text = this.command;
- var match = regexObject.exec(text);
- var offset = 0;
- var matchRanges = [];
- while (match) {
- matchRanges.push({ offset: match.index, length: match[0].length });
- match = regexObject.exec(text);
- }
- highlightSearchResults(this._formattedCommand, matchRanges);
- this._element.scrollIntoViewIfNeeded();
- },
-
- matchesRegex: function(regexObject)
- {
- return regexObject.test(this.command);
- },
-
toMessageElement: function()
{
if (!this._element) {
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageImpl.js (173462 => 173463)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageImpl.js 2014-09-10 15:49:02 UTC (rev 173462)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageImpl.js 2014-09-10 15:51:19 UTC (rev 173463)
@@ -453,40 +453,6 @@
return String.format(parameters[0].description, parameters.slice(1), formatters, formattedResult, append);
},
- clearHighlight: function()
- {
- if (!this._formattedMessage)
- return;
-
- var highlightedMessage = this._formattedMessage;
- delete this._formattedMessage;
- this._formatMessage();
- this._element.replaceChild(this._formattedMessage, highlightedMessage);
- },
-
- highlightSearchResults: function(regexObject)
- {
- if (!this._formattedMessage)
- return;
-
- regexObject.lastIndex = 0;
- var text = this.message;
- var match = regexObject.exec(text);
- var offset = 0;
- var matchRanges = [];
- while (match) {
- matchRanges.push({ offset: match.index, length: match[0].length });
- match = regexObject.exec(text);
- }
- highlightSearchResults(this._formattedMessage, matchRanges);
- this._element.scrollIntoViewIfNeeded();
- },
-
- matchesRegex: function(regexObject)
- {
- return regexObject.test(this.message);
- },
-
toMessageElement: function()
{
if (this._element)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes