Title: [111430] trunk/Source/WebCore
- Revision
- 111430
- Author
- [email protected]
- Date
- 2012-03-20 12:58:19 -0700 (Tue, 20 Mar 2012)
Log Message
Web Inspector: Tabbed pane drop down should be sorted.
https://bugs.webkit.org/show_bug.cgi?id=81680
Reviewed by Pavel Feldman.
* inspector/front-end/TabbedPane.js:
(WebInspector.TabbedPane.prototype._populateDropDownFromIndex.compareFunction):
(WebInspector.TabbedPane.prototype._populateDropDownFromIndex):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (111429 => 111430)
--- trunk/Source/WebCore/ChangeLog 2012-03-20 19:58:02 UTC (rev 111429)
+++ trunk/Source/WebCore/ChangeLog 2012-03-20 19:58:19 UTC (rev 111430)
@@ -1,5 +1,16 @@
2012-03-20 Vsevolod Vlasov <[email protected]>
+ Web Inspector: Tabbed pane drop down should be sorted.
+ https://bugs.webkit.org/show_bug.cgi?id=81680
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/TabbedPane.js:
+ (WebInspector.TabbedPane.prototype._populateDropDownFromIndex.compareFunction):
+ (WebInspector.TabbedPane.prototype._populateDropDownFromIndex):
+
+2012-03-20 Vsevolod Vlasov <[email protected]>
+
Web Inspector: Open resource dialog scripts list should be sorted.
https://bugs.webkit.org/show_bug.cgi?id=81682
Modified: trunk/Source/WebCore/inspector/front-end/TabbedPane.js (111429 => 111430)
--- trunk/Source/WebCore/inspector/front-end/TabbedPane.js 2012-03-20 19:58:02 UTC (rev 111429)
+++ trunk/Source/WebCore/inspector/front-end/TabbedPane.js 2012-03-20 19:58:19 UTC (rev 111430)
@@ -307,12 +307,22 @@
this._headerContentsElement.removeChild(this._dropDownButton);
this._tabsSelect.removeChildren();
+ var tabsToShow = [];
for (var i = 0; i < this._tabs.length; ++i) {
- if (this._tabs[i].shown)
+ if (!this._tabs[i].shown)
+ tabsToShow.push(this._tabs[i]);
continue;
-
- var option = new Option(this._tabs[i].title);
- option.tab = this._tabs[i];
+ }
+
+ function compareFunction(tab1, tab2)
+ {
+ return tab1.title.localeCompare(tab2.title);
+ }
+ tabsToShow.sort(compareFunction);
+
+ for (var i = 0; i < tabsToShow.length; ++i) {
+ var option = new Option(tabsToShow[i].title);
+ option.tab = tabsToShow[i];
this._tabsSelect.appendChild(option);
}
if (this._tabsSelect.options.length) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes