Bug 1153011 - Remove zoom button from call tree. r=vporof

--HG--
extra : rebase_source : 3d3e94ee1e7e6f65009537f7f93d03b255b566c4
This commit is contained in:
Jordan Santell 2015-04-09 17:41:00 -04:00
parent 8278107996
commit 51e2712cec
3 changed files with 3 additions and 32 deletions

View File

@ -24,8 +24,6 @@ function test() {
"The root node's 'category' attribute is correct.");
is(treeRoot.target.getAttribute("tooltiptext"), "",
"The root node's 'tooltiptext' attribute is correct.");
ok(treeRoot.target.querySelector(".call-tree-zoom").hidden,
"The root node's zoom button cell should be hidden.");
ok(treeRoot.target.querySelector(".call-tree-category").hidden,
"The root node's category label cell should be hidden.");
@ -39,8 +37,6 @@ function test() {
"The .A.B.D node's 'category' attribute is correct.");
is(D.target.getAttribute("tooltiptext"), "D (http://foo/bar/baz:78)",
"The .A.B.D node's 'tooltiptext' attribute is correct.");
ok(!A.target.querySelector(".call-tree-zoom").hidden,
"The .A.B.D node's zoom button cell should not be hidden.");
ok(!A.target.querySelector(".call-tree-category").hidden,
"The .A.B.D node's category label cell should not be hidden.");
@ -61,7 +57,7 @@ function test() {
let functionCell = D.target.childNodes[5];
is(functionCell.childNodes.length, 9,
is(functionCell.childNodes.length, 8,
"The number of columns displayed for function cells is correct.");
is(functionCell.childNodes[0].className, "arrow theme-twisty",
"The first node displayed for function cells is correct.");
@ -75,11 +71,9 @@ function test() {
"The fifth node displayed for function cells is correct.");
is(functionCell.childNodes[5].className, "plain call-tree-host",
"The fifth node displayed for function cells is correct.");
is(functionCell.childNodes[6].className, "plain call-tree-zoom",
"The sixth node displayed for function cells is correct.");
is(functionCell.childNodes[7].tagName, "spacer",
is(functionCell.childNodes[6].tagName, "spacer",
"The seventh node displayed for function cells is correct.");
is(functionCell.childNodes[8].className, "plain call-tree-category",
is(functionCell.childNodes[7].className, "plain call-tree-category",
"The eight node displayed for function cells is correct.");
finish();

View File

@ -26,11 +26,6 @@ function spawnTest () {
let eventItem = yield receivedLinkEvent;
is(eventItem, D, "The 'link' event target is correct.");
let receivedZoomEvent = treeRoot.once("zoom");
EventUtils.sendMouseEvent({ type: "mousedown" }, D.target.querySelector(".call-tree-zoom"));
eventItem = yield receivedZoomEvent;
is(eventItem, D, "The 'zoom' event target is correct.");
finish();
}

View File

@ -16,7 +16,6 @@ loader.lazyImporter(this, "AbstractTreeItem",
const MILLISECOND_UNITS = L10N.getStr("table.ms");
const PERCENTAGE_UNITS = L10N.getStr("table.percentage");
const URL_LABEL_TOOLTIP = L10N.getStr("table.url.tooltiptext");
const ZOOM_BUTTON_TOOLTIP = L10N.getStr("table.zoom.tooltiptext");
const CALL_TREE_INDENTATION = 16; // px
const DEFAULT_SORTING_PREDICATE = (a, b) => a.frame.samples < b.frame.samples ? 1 : -1;
@ -107,7 +106,6 @@ function CallView({
this.inverted = inverted;
this._onUrlClick = this._onUrlClick.bind(this);
this._onZoomClick = this._onZoomClick.bind(this);
};
CallView.prototype = Heritage.extend(AbstractTreeItem.prototype, {
@ -195,7 +193,6 @@ CallView.prototype = Heritage.extend(AbstractTreeItem.prototype, {
let isRoot = frameInfo.nodeType == "Thread";
if (isRoot) {
functionCell.querySelector(".call-tree-zoom").hidden = true;
functionCell.querySelector(".call-tree-category").hidden = true;
}
@ -341,12 +338,6 @@ CallView.prototype = Heritage.extend(AbstractTreeItem.prototype, {
hostNode.setAttribute("value", frameInfo.hostName || "");
cell.appendChild(hostNode);
let zoomNode = this.document.createElement("button");
zoomNode.className = "plain call-tree-zoom";
zoomNode.setAttribute("tooltiptext", ZOOM_BUTTON_TOOLTIP);
zoomNode.addEventListener("mousedown", this._onZoomClick);
cell.appendChild(zoomNode);
let spacerNode = this.document.createElement("spacer");
spacerNode.setAttribute("flex", "10000");
cell.appendChild(spacerNode);
@ -385,14 +376,5 @@ CallView.prototype = Heritage.extend(AbstractTreeItem.prototype, {
e.preventDefault();
e.stopPropagation();
this.root.emit("link", this);
},
/**
* Handler for the "click" event on the zoom node of this call view.
*/
_onZoomClick: function(e) {
e.preventDefault();
e.stopPropagation();
this.root.emit("zoom", this);
}
});