Changeset 53366 in webkit
- Timestamp:
- Jan 16, 2010 3:30:01 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r53365 r53366 1 2010-01-16 Timothy Hatcher <timothy@apple.com> 2 3 Use String.trim() instead of a regex in the Web Inspector. 4 5 https://bugs.webkit.org/show_bug.cgi?id=33765 6 7 Reviewed by George Staikos. 8 9 * inspector/front-end/ElementsPanel.js: 10 (WebInspector.ElementsPanel.prototype.performSearch): Use .trim(). 11 * inspector/front-end/ObjectPropertiesSection.js: 12 (WebInspector.ObjectPropertyTreeElement.prototype.applyExpression): Ditto. 13 * inspector/front-end/ProfileView.js: 14 * inspector/front-end/SourceFrame.js: 15 (WebInspector.SourceFrame.prototype._evalSelectionInCallFrame): Ditto. 16 * inspector/front-end/StylesSidebarPane.js: 17 (WebInspector.StylePropertyTreeElement.prototype): Ditto. 18 * inspector/front-end/utilities.js: 19 (String.prototype.trimLeadingWhitespace): Removed. 20 (String.prototype.trimTrailingWhitespace): Removed. 21 (String.prototype.trimWhitespace): Removed. 22 1 23 2010-01-16 Oliver Hunt <oliver@apple.com> 2 24 -
trunk/WebCore/inspector/front-end/ElementsPanel.js
r53232 r53366 266 266 this.searchCanceled(); 267 267 268 const whitespaceTrimmedQuery = query.trim Whitespace();268 const whitespaceTrimmedQuery = query.trim(); 269 269 if (!whitespaceTrimmedQuery.length) 270 270 return; -
trunk/WebCore/inspector/front-end/ObjectPropertiesSection.js
r52544 r53366 234 234 applyExpression: function(expression, updateInterface) 235 235 { 236 expression = expression.trim Whitespace();236 expression = expression.trim(); 237 237 var expressionLength = expression.length; 238 238 var self = this; … … 252 252 } 253 253 }; 254 InjectedScriptAccess.setPropertyValue(this.property.parentObjectProxy, this.property.name, expression.trim Whitespace(), callback);254 InjectedScriptAccess.setPropertyValue(this.property.parentObjectProxy, this.property.name, expression.trim(), callback); 255 255 } 256 256 } -
trunk/WebCore/inspector/front-end/ProfileView.js
r53328 r53366 234 234 this.searchCanceled(); 235 235 236 query = query.trim Whitespace();236 query = query.trim(); 237 237 238 238 if (!query.length) -
trunk/WebCore/inspector/front-end/SourceFrame.js
r52820 r53366 445 445 return; 446 446 447 var expression = selection.getRangeAt(0).toString().trim Whitespace();447 var expression = selection.getRangeAt(0).toString().trim(); 448 448 WebInspector.panels.scripts.evaluateInSelectedCallFrame(expression, false, "console", function(result, exception) { 449 449 WebInspector.showConsole(); -
trunk/WebCore/inspector/front-end/StylesSidebarPane.js
r52547 r53366 1311 1311 var section = this.treeOutline.section; 1312 1312 var elementsPanel = WebInspector.panels.elements; 1313 var styleTextLength = styleText.trim Whitespace().length;1313 var styleTextLength = styleText.trim().length; 1314 1314 if (!styleTextLength && updateInterface) { 1315 1315 if (this._newProperty) { … … 1362 1362 } 1363 1363 1364 InjectedScriptAccess.applyStyleText(this.style.id, styleText.trim Whitespace(), this.name, callback);1364 InjectedScriptAccess.applyStyleText(this.style.id, styleText.trim(), this.name, callback); 1365 1365 } 1366 1366 } -
trunk/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
r52547 r53366 243 243 return; 244 244 245 this.nameElement.textContent = this.property.name.trim Whitespace();245 this.nameElement.textContent = this.property.name.trim(); 246 246 247 247 var context = { expanded: this.expanded }; … … 266 266 applyExpression: function(expression, updateInterface) 267 267 { 268 expression = expression.trim Whitespace();268 expression = expression.trim(); 269 269 270 270 if (!expression) -
trunk/WebCore/inspector/front-end/utilities.js
r52495 r53366 332 332 { 333 333 return this.replace(/[\s\xA0]+/g, " "); 334 }335 336 String.prototype.trimLeadingWhitespace = function()337 {338 return this.replace(/^[\s\xA0]+/g, "");339 }340 341 String.prototype.trimTrailingWhitespace = function()342 {343 return this.replace(/[\s\xA0]+$/g, "");344 }345 346 String.prototype.trimWhitespace = function()347 {348 return this.replace(/^[\s\xA0]+|[\s\xA0]+$/g, "");349 334 } 350 335
Note: See TracChangeset
for help on using the changeset viewer.