Bug 1119873 - Add the search-go-button as a SPECIAL_CASE in UITelemetry and check anonids because search-go-button uses that instead of id. r=florian.

---
 browser/modules/BrowserUITelemetry.jsm | 8 ++++++++
 1 file changed, 8 insertions(+)
This commit is contained in:
Adrian Carolli 2015-01-26 17:13:44 +01:00
parent bd728e482e
commit f7f54b1dfc

View File

@ -138,6 +138,7 @@ XPCOMUtils.defineLazyGetter(this, "ALL_BUILTIN_ITEMS", function() {
"BMB_bookmarksPopup",
"BMB_unsortedBookmarksPopup",
"BMB_bookmarksToolbarPopup",
"search-go-button",
]
return DEFAULT_ITEMS.concat(PALETTE_ITEMS)
.concat(SPECIAL_CASES);
@ -458,6 +459,13 @@ this.BrowserUITelemetry = {
return;
}
// If not, we need to check if the item's anonid is in our list
// of built-in items to check.
if (ALL_BUILTIN_ITEMS.indexOf(item.getAttribute("anonid")) != -1) {
this._countMouseUpEvent("click-builtin-item", item.getAttribute("anonid"), aEvent.button);
return;
}
// If not, we need to check if one of the ancestors of the clicked
// item is in our list of built-in items to check.
let candidate = getIDBasedOnFirstIDedAncestor(item);