[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
bweinstein at apple.com
bweinstein at apple.com
Thu Oct 29 20:51:14 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 81a3456e8ee8f60d40bca73e51bae44ba7800d3a
Author: bweinstein at apple.com <bweinstein at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Oct 24 03:05:19 2009 +0000
Fixes <https://bugs.webkit.org/show_bug.cgi?id=30617>.
Web Inspector: Resources Scope Bar Should Allow Combinations.
Reviewed by Timothy Hatcher.
Refactor the filtering in ResourcePanel to make it match ConsoleView,
and add a divider between All, and the other choices of Resource types.
* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel):
(WebInspector.ResourcesPanel.prototype.filter):
(WebInspector.ResourcesPanel.prototype._updateFilter):
* inspector/front-end/inspector.css:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 16b2af3..026df97 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2009-10-23 Brian Weinstein <bweinstein at apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Fixes <https://bugs.webkit.org/show_bug.cgi?id=30617>.
+ Web Inspector: Resources Scope Bar Should Allow Combinations.
+
+ Refactor the filtering in ResourcePanel to make it match ConsoleView,
+ and add a divider between All, and the other choices of Resource types.
+
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel):
+ (WebInspector.ResourcesPanel.prototype.filter):
+ (WebInspector.ResourcesPanel.prototype._updateFilter):
+ * inspector/front-end/inspector.css:
+
2009-10-23 Chris Evans <cevans at chromium.org>
Reviewed by Adam Barth.
diff --git a/WebCore/inspector/front-end/ResourcesPanel.js b/WebCore/inspector/front-end/ResourcesPanel.js
index 05f2b51..36d657d 100644
--- a/WebCore/inspector/front-end/ResourcesPanel.js
+++ b/WebCore/inspector/front-end/ResourcesPanel.js
@@ -161,8 +161,14 @@ WebInspector.ResourcesPanel = function()
return categoryElement;
};
- var allElement = createFilterElement.call(this, "all");
- this.filter(allElement.category);
+ this.allElement = createFilterElement.call(this, "all");
+
+ // Add a divider
+ var dividerElement = document.createElement("div");
+ dividerElement.addStyleClass("divider");
+ this.filterBarElement.appendChild(dividerElement);
+
+ this.filter(this.allElement);
for (var category in this.categories)
createFilterElement.call(this, category);
@@ -185,27 +191,51 @@ WebInspector.ResourcesPanel.prototype = {
return this._categories;
},
- filter: function (category) {
- if (this._filterCategory && this._filterCategory === category)
- return;
-
- if (this._filterCategory) {
- var filterElement = this.filterBarElement.getElementsByClassName(this._filterCategory)[0];
- filterElement.removeStyleClass("selected");
- var oldClass = "filter-" + this._filterCategory;
- this.resourcesTreeElement.childrenListElement.removeStyleClass(oldClass);
- this.resourcesGraphsElement.removeStyleClass(oldClass);
+ filter: function (target)
+ {
+ if (target.category === "All") {
+ if (target.hasStyleClass("selected")) {
+ // We can't unselect all, so we break early here
+ return;
+ }
+
+ // If all wasn't selected, and now is, unselect everything else.
+ for (var child in this.filterBarElement.childNodes) {
+ if (target.category !== "All") {
+ child.removeStyleClass("selected");
+ }
+
+ var filterClass = "filter-" + target.category;
+ this.resourcesGraphsElement.removeStyleClass(filterClass);
+ this.resourcesTreeElement.childrenListElement.removeStyleClass(filterClass);
+ }
+ } else {
+ // Something other than all is being selected, so we want to unselect all
+ if (this.allElement.hasStyleClass("selected")) {
+ this.allElement.removeStyleClass("selected");
+ this.resourcesGraphsElement.removeStyleClass("filter-all");
+ this.resourcesTreeElement.childrenListElement.removeStyleClass("filter-all");
+ }
}
- this._filterCategory = category;
- var filterElement = this.filterBarElement.getElementsByClassName(this._filterCategory)[0];
- filterElement.addStyleClass("selected");
- var newClass = "filter-" + this._filterCategory;
- this.resourcesTreeElement.childrenListElement.addStyleClass(newClass);
- this.resourcesGraphsElement.addStyleClass(newClass);
+
+ if (target.hasStyleClass("selected")) {
+ target.removeStyleClass("selected");
+ var filterClass = "filter-" + target.category.toLowerCase();
+
+ this.resourcesGraphsElement.removeStyleClass(filterClass);
+ this.resourcesTreeElement.childrenListElement.removeStyleClass(filterClass);
+ } else {
+ target.addStyleClass("selected");
+ var filterClass = "filter-" + target.category.toLowerCase();
+
+ this.resourcesGraphsElement.addStyleClass(filterClass);
+ this.resourcesTreeElement.childrenListElement.addStyleClass(filterClass);
+ }
},
- _updateFilter: function (e) {
- this.filter(e.target.category);
+ _updateFilter: function (e)
+ {
+ this.filter(e.target);
},
get toolbarItemLabel()
diff --git a/WebCore/inspector/front-end/inspector.css b/WebCore/inspector/front-end/inspector.css
index a34f807..1308759 100644
--- a/WebCore/inspector/front-end/inspector.css
+++ b/WebCore/inspector/front-end/inspector.css
@@ -2441,7 +2441,7 @@ button.enable-toggle-status-bar-item.toggled-on .glyph {
text-shadow: rgba(255, 255, 255, 0.5) 1px 1px 0;
}
-#console-filter div.divider {
+#console-filter div.divider, #resources-filter div.divider {
margin-left: 5px;
margin-right: 5px;
/* Only want a border-left here because border on both sides
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list