[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
pfeldman at chromium.org
pfeldman at chromium.org
Thu Dec 3 13:25:59 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 03fcb5de16457cdcf2103b1a4bc443c31dc78f9d
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 3 21:34:47 2009 +0000
2009-11-03 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
Web Inspector: Migrate from top bar filters to check boxes in Timeline.
https://bugs.webkit.org/show_bug.cgi?id=31081
* inspector/front-end/AbstractTimelinePanel.js:
(WebInspector.AbstractTimelinePanel.prototype.showCategory):
(WebInspector.AbstractTimelinePanel.prototype.hideCategory):
(WebInspector.AbstractTimelinePanel.prototype.filter):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel):
(WebInspector.TimelineCategoryTreeElement.prototype.onattach):
(WebInspector.TimelineCategoryTreeElement.prototype._onCheckboxClick):
(WebInspector.TimelineCategoryGraph.prototype.clearChunks):
(WebInspector.TimelineCategoryGraph.prototype.set dimmed):
* inspector/front-end/inspector.css:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3d3fa3b..c40f9c6 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,26 @@
Reviewed by Timothy Hatcher.
+ Web Inspector: Migrate from top bar filters to check boxes in Timeline.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31081
+
+ * inspector/front-end/AbstractTimelinePanel.js:
+ (WebInspector.AbstractTimelinePanel.prototype.showCategory):
+ (WebInspector.AbstractTimelinePanel.prototype.hideCategory):
+ (WebInspector.AbstractTimelinePanel.prototype.filter):
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel):
+ (WebInspector.TimelineCategoryTreeElement.prototype.onattach):
+ (WebInspector.TimelineCategoryTreeElement.prototype._onCheckboxClick):
+ (WebInspector.TimelineCategoryGraph.prototype.clearChunks):
+ (WebInspector.TimelineCategoryGraph.prototype.set dimmed):
+ * inspector/front-end/inspector.css:
+
+2009-11-03 Pavel Feldman <pfeldman at chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
Web Inspector: clear overview on Clear action and panel reset.
https://bugs.webkit.org/show_bug.cgi?id=31078
diff --git a/WebCore/inspector/front-end/AbstractTimelinePanel.js b/WebCore/inspector/front-end/AbstractTimelinePanel.js
index 622e4fc..d285f36 100644
--- a/WebCore/inspector/front-end/AbstractTimelinePanel.js
+++ b/WebCore/inspector/front-end/AbstractTimelinePanel.js
@@ -120,14 +120,14 @@ WebInspector.AbstractTimelinePanel.prototype = {
createFilterElement.call(this, category);
},
- _showCategory: function(category)
+ showCategory: function(category)
{
var filterClass = "filter-" + category.toLowerCase();
this.itemsGraphsElement.addStyleClass(filterClass);
this.itemsTreeElement.childrenListElement.addStyleClass(filterClass);
},
- _hideCategory: function(category)
+ hideCategory: function(category)
{
var filterClass = "filter-" + category.toLowerCase();
this.itemsGraphsElement.removeStyleClass(filterClass);
@@ -144,7 +144,7 @@ WebInspector.AbstractTimelinePanel.prototype = {
continue;
child.removeStyleClass("selected");
- this._hideCategory(child.category);
+ this.hideCategory(child.category);
}
}
@@ -160,7 +160,7 @@ WebInspector.AbstractTimelinePanel.prototype = {
// Something other than All is being selected, so we want to unselect All.
if (this.filterAllElement.hasStyleClass("selected")) {
this.filterAllElement.removeStyleClass("selected");
- this._hideCategory("all");
+ this.hideCategory("all");
}
}
@@ -170,7 +170,7 @@ WebInspector.AbstractTimelinePanel.prototype = {
unselectAll.call(this);
target.addStyleClass("selected");
- this._showCategory(target.category);
+ this.showCategory(target.category);
return;
}
@@ -178,12 +178,12 @@ WebInspector.AbstractTimelinePanel.prototype = {
// If selectMultiple is turned on, and we were selected, we just
// want to unselect ourselves.
target.removeStyleClass("selected");
- this._hideCategory(target.category);
+ this.hideCategory(target.category);
} else {
// If selectMultiple is turned on, and we weren't selected, we just
// want to select ourselves.
target.addStyleClass("selected");
- this._showCategory(target.category);
+ this.showCategory(target.category);
}
},
diff --git a/WebCore/inspector/front-end/TimelinePanel.js b/WebCore/inspector/front-end/TimelinePanel.js
index 95eadac..79fa0e9 100644
--- a/WebCore/inspector/front-end/TimelinePanel.js
+++ b/WebCore/inspector/front-end/TimelinePanel.js
@@ -34,7 +34,6 @@ WebInspector.TimelinePanel = function()
this.element.addStyleClass("timeline");
- this.createFilterPanel();
this._createOverview();
this.createInterface();
this.containerElement.id = "timeline-container";
@@ -44,8 +43,8 @@ WebInspector.TimelinePanel = function()
this._createStatusbarButtons();
this.calculator = new WebInspector.TimelineCalculator();
-
- this.filter(this.filterAllElement, false);
+ for (category in this.categories)
+ this.showCategory(category);
}
WebInspector.TimelinePanel.prototype = {
@@ -440,10 +439,25 @@ WebInspector.TimelineCategoryTreeElement.prototype = {
this.listItemElement.removeChildren();
this.listItemElement.addStyleClass("timeline-category-tree-item");
+ var checkElement = document.createElement("input");
+ checkElement.type = "checkbox";
+ checkElement.className = "timeline-category-checkbox";
+ checkElement.checked = true;
+ checkElement.addEventListener("click", this._onCheckboxClicked.bind(this));
+ this.listItemElement.appendChild(checkElement);
+
this.typeElement = document.createElement("span");
this.typeElement.className = "type";
this.typeElement.textContent = this._category.title;
this.listItemElement.appendChild(this.typeElement);
+ },
+
+ _onCheckboxClicked: function (event) {
+ if (event.target.checked)
+ WebInspector.panels.timeline.showCategory(this._category.name);
+ else
+ WebInspector.panels.timeline.hideCategory(this._category.name);
+ WebInspector.panels.timeline._categoryGraphs[this._category.name].dimmed = !event.target.checked;
}
}
@@ -602,6 +616,14 @@ WebInspector.TimelineCategoryGraph.prototype = {
clearChunks: function()
{
this._barAreaElement.removeChildren();
+ },
+
+ set dimmed(dimmed)
+ {
+ if (dimmed)
+ this._barAreaElement.removeStyleClass("timeline-category-" + this._category.name);
+ else
+ this._barAreaElement.addStyleClass("timeline-category-" + this._category.name);
}
}
diff --git a/WebCore/inspector/front-end/inspector.css b/WebCore/inspector/front-end/inspector.css
index 32d0237..d1470ea 100644
--- a/WebCore/inspector/front-end/inspector.css
+++ b/WebCore/inspector/front-end/inspector.css
@@ -3277,7 +3277,7 @@ body.inactive .sidebar-tree-item.selected .bubble.search-matches {
#timeline-overview-panel {
position: absolute;
- top: 23px;
+ top: 0;
left: 0;
right: 0;
height: 80px;
@@ -3285,7 +3285,7 @@ body.inactive .sidebar-tree-item.selected .bubble.search-matches {
#timeline-overview-separator {
position: absolute;
- top: 103px;
+ top: 80px;
left: 0;
right: 0;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(236, 236, 236)), to(rgb(217, 217, 217)));
@@ -3338,7 +3338,7 @@ body.inactive .sidebar-tree-item.selected .bubble.search-matches {
}
.timeline .sidebar-resizer-vertical {
- top: 113px;
+ top: 90px;
}
#timeline-overview-grid #resources-graphs {
@@ -3351,7 +3351,7 @@ body.inactive .sidebar-tree-item.selected .bubble.search-matches {
#timeline-container {
position: absolute;
- top: 113px;
+ top: 90px;
left: 0;
bottom: 0;
right: 0;
@@ -3366,7 +3366,7 @@ body.inactive .sidebar-tree-item.selected .bubble.search-matches {
.timeline-category-tree-item {
height: 20px;
- padding-left: 24px;
+ padding-left: 6px;
padding-top: 2px;
white-space: nowrap;
text-overflow: ellipsis;
@@ -3374,6 +3374,13 @@ body.inactive .sidebar-tree-item.selected .bubble.search-matches {
font-weight: bold;
}
+.timeline-tree-item .timeline-category-checkbox {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+}
+
.timeline-category-tree-item:nth-of-type(2n) {
background-color: rgba(0, 0, 0, 0.05);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list