Web Inspector: Default string comparisons to treat numeric characters as numbers
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Jun 2017 21:47:05 +0000 (21:47 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Jun 2017 21:47:05 +0000 (21:47 +0000)
commitb01dee24c694bd3842965cbd9aaa9d990e63a04b
treeaff93c1d49d8671f80aeb3f7e2501883d80db29a
parentb9101d13f73253cd0ef71f1d2e573d547e4429ff
Web Inspector: Default string comparisons to treat numeric characters as numbers
https://bugs.webkit.org/show_bug.cgi?id=173984

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

* UserInterface/Base/Utilities.js:
(String.prototype.extendedLocaleCompare):
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames.compare):
* UserInterface/Controllers/ResourceQueryController.js:
(WebInspector.ResourceQueryController.prototype.executeQuery):
* UserInterface/Views/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype._sortDataGrid.localeCompare):
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties):
* UserInterface/Views/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype._sortDataGrid.localeCompare):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAttributes):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByNode):
* UserInterface/Views/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView.prototype._sortDataGrid.comparator):
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements):
* UserInterface/Views/FolderizedTreeElement.js:
(WebInspector.FolderizedTreeElement.prototype._compareTreeElementsByMainTitle):
* UserInterface/Views/HeapSnapshotDataGridTree.js:
(WebInspector.HeapSnapshotDataGridTree.buildSortComparator):
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView.prototype.dataGridSortComparator):
* UserInterface/Views/NewTabContentView.js:
(WebInspector.NewTabContentView.prototype._updateShownTabs):
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype._compareDataGridNodesByStartTime):
* UserInterface/Views/ProbeDetailsSidebarPanel.js:
(WebInspector.ProbeDetailsSidebarPanel.prototype.inspect):
* UserInterface/Views/QuickConsole.js:
(WebInspector.QuickConsole.prototype._compareExecutionContextPathComponents):
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid.sortDataGrid.comparator):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._compareTreeElements):
* UserInterface/Views/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.compareResourceTreeElements):
(WebInspector.ResourceTreeElement.compareFolderAndResourceTreeElements):
* UserInterface/Views/ScriptDetailsTimelineView.js:
(WebInspector.ScriptDetailsTimelineView.prototype.dataGridSortComparator):
* UserInterface/Views/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel.prototype._compareTreeElements):
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype._sortComparator):

LayoutTests:

* inspector/unit-tests/string-utilities.html:
Add tests for String.prototype.extendedLocaleCompare.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
26 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/unit-tests/string-utilities-expected.txt
LayoutTests/inspector/unit-tests/string-utilities.html
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/Utilities.js
Source/WebInspectorUI/UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js
Source/WebInspectorUI/UserInterface/Controllers/ResourceQueryController.js
Source/WebInspectorUI/UserInterface/Views/ApplicationCacheFrameContentView.js
Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js
Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.js
Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/DOMStorageContentView.js
Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/FolderizedTreeElement.js
Source/WebInspectorUI/UserInterface/Views/HeapSnapshotDataGridTree.js
Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js
Source/WebInspectorUI/UserInterface/Views/NewTabContentView.js
Source/WebInspectorUI/UserInterface/Views/OverviewTimelineView.js
Source/WebInspectorUI/UserInterface/Views/ProbeDetailsSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/QuickConsole.js
Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/ResourceTreeElement.js
Source/WebInspectorUI/UserInterface/Views/ScriptDetailsTimelineView.js
Source/WebInspectorUI/UserInterface/Views/StorageSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js