diff --git a/application/basilisk/components/search/content/search.xml b/application/basilisk/components/search/content/search.xml
index d7ec8e2fa7..0b9fd03bb6 100644
--- a/application/basilisk/components/search/content/search.xml
+++ b/application/basilisk/components/search/content/search.xml
@@ -372,34 +372,28 @@
var textBox = this._textbox;
var textValue = textBox.value;
- let selection = this.telemetrySearchDetails;
+ let selection = this.searchDetails;
let oneOffRecorded = false;
if (!selection || (selection.index == -1)) {
- oneOffRecorded = this.textbox.popup.oneOffButtons
- .maybeRecordTelemetry(aEvent, aWhere, aParams);
- if (!oneOffRecorded) {
- let source = "unknown";
- let type = "unknown";
- let target = aEvent.originalTarget;
- if (aEvent instanceof KeyboardEvent) {
- type = "key";
- } else if (aEvent instanceof MouseEvent) {
- type = "mouse";
- if (target.classList.contains("search-panel-header") ||
- target.parentNode.classList.contains("search-panel-header")) {
- source = "header";
- }
- } else if (aEvent instanceof XULCommandEvent) {
- if (target.getAttribute("anonid") == "paste-and-search") {
- source = "paste";
- }
+ let source = "unknown";
+ let type = "unknown";
+ let target = aEvent.originalTarget;
+ if (aEvent instanceof KeyboardEvent) {
+ type = "key";
+ } else if (aEvent instanceof MouseEvent) {
+ type = "mouse";
+ if (target.classList.contains("search-panel-header") ||
+ target.parentNode.classList.contains("search-panel-header")) {
+ source = "header";
}
- if (!aEngine) {
- aEngine = this.currentEngine;
+ } else if (aEvent instanceof XULCommandEvent) {
+ if (target.getAttribute("anonid") == "paste-and-search") {
+ source = "paste";
}
- BrowserSearch.recordOneoffSearchInTelemetry(aEngine, source, type,
- aWhere);
+ }
+ if (!aEngine) {
+ aEngine = this.currentEngine;
}
}
@@ -433,16 +427,16 @@
let engine = aEngine || this.currentEngine;
var submission = engine.getSubmission(aData, null, "searchbar");
- let telemetrySearchDetails = this.telemetrySearchDetails;
- this.telemetrySearchDetails = null;
- if (telemetrySearchDetails && telemetrySearchDetails.index == -1) {
- telemetrySearchDetails = null;
+ let searchDetails = this.searchDetails;
+ this.searchDetails = null;
+ if (searchDetails && searchDetails.index == -1) {
+ searchDetails = null;
}
// If we hit here, we come either from a one-off, a plain search or a suggestion.
const details = {
isOneOff: aOneOff,
- isSuggestion: (!aOneOff && telemetrySearchDetails),
- selection: telemetrySearchDetails
+ isSuggestion: (!aOneOff && searchDetails),
+ selection: searchDetails
};
BrowserSearch.recordSearchInTelemetry(engine, "searchbar", details);
// null parameter below specifies HTML response for search
@@ -767,7 +761,7 @@
}
if (this._selectionDetails &&
this._selectionDetails.currentIndex != -1) {
- BrowserSearch.searchBar.telemetrySearchDetails = this._selectionDetails;
+ BrowserSearch.searchBar.searchDetails = this._selectionDetails;
this._selectionDetails = null;
}
document.getBindingParent(this).handleSearchCommand(aEvent, engine);
@@ -986,7 +980,7 @@
// Set the origin before assigning the popup, as the assignment does
// a rebuild and would miss the origin.
- this.oneOffButtons.telemetryOrigin = "searchbar";
+ this.oneOffButtons.oneoffOrigin = "searchbar";
// Set popup after setting the minWidth since it builds the buttons.
this.oneOffButtons.popup = this;
this.oneOffButtons.textbox = this.input;
@@ -1181,9 +1175,8 @@
]]>
-
- ""
+
+ ""
""
@@ -1402,7 +1395,7 @@
let button = document.createElementNS(kXULNS, "button");
let label = this.bundle.formatStringFromName("cmd_addFoundEngine",
[engine.title], 1);
- button.id = this.telemetryOrigin + "-add-engine-" +
+ button.id = this.oneoffOrigin + "-add-engine-" +
engine.title.replace(/ /g, '-');
button.setAttribute("class", "addengine-item");
button.setAttribute("label", label);
@@ -1470,9 +1463,9 @@
// Ensure we can refer to the settings buttons by ID:
let settingsEl = document.getAnonymousElementByAttribute(this, "anonid", "search-settings");
- settingsEl.id = this.telemetryOrigin + "-anon-search-settings";
+ settingsEl.id = this.oneoffOrigin + "-anon-search-settings";
let compactSettingsEl = document.getAnonymousElementByAttribute(this, "anonid", "search-settings-compact");
- compactSettingsEl.id = this.telemetryOrigin +
+ compactSettingsEl.id = this.oneoffOrigin +
"-anon-search-settings-compact";
let dummyItems = enginesPerRow - (oneOffCount % enginesPerRow || enginesPerRow);
@@ -1546,7 +1539,7 @@
@@ -1881,69 +1874,6 @@
return false;
]]>