diff options
author | adeshkp <adeshkp@users.noreply.github.com> | 2019-05-25 11:21:55 -0400 |
---|---|---|
committer | adeshkp <adeshkp@users.noreply.github.com> | 2019-05-25 11:21:55 -0400 |
commit | 73d1087fce186a8932db294866306f10ab01059b (patch) | |
tree | 7c94740bed2f35283429a528b68fd0a9a9a7a9d5 /application/basilisk/base/content/newtab/page.js | |
parent | 1eca3c3a6306e33efe3c18ce60e91d2a71095c56 (diff) | |
download | UXP-73d1087fce186a8932db294866306f10ab01059b.tar UXP-73d1087fce186a8932db294866306f10ab01059b.tar.gz UXP-73d1087fce186a8932db294866306f10ab01059b.tar.lz UXP-73d1087fce186a8932db294866306f10ab01059b.tar.xz UXP-73d1087fce186a8932db294866306f10ab01059b.zip |
Issue #246 - Remove more of compact mode and newtab junk from Basilisk
Diffstat (limited to 'application/basilisk/base/content/newtab/page.js')
-rw-r--r-- | application/basilisk/base/content/newtab/page.js | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/application/basilisk/base/content/newtab/page.js b/application/basilisk/base/content/newtab/page.js index b92d3d5ce..7c19a9827 100644 --- a/application/basilisk/base/content/newtab/page.js +++ b/application/basilisk/base/content/newtab/page.js @@ -162,16 +162,6 @@ var gPage = { */ _handleUnloadEvent: function Page_handleUnloadEvent() { gAllPages.unregister(this); - // compute page life-span and send telemetry probe: using milli-seconds will leave - // many low buckets empty. Instead we use half-second precision to make low end - // of histogram linear and not lose the change in user attention - let delta = Math.round((Date.now() - this._firstVisibleTime) / 500); - if (this._suggestedTilePresent) { - Services.telemetry.getHistogramById("NEWTAB_PAGE_LIFE_SPAN_SUGGESTED").add(delta); - } - else { - Services.telemetry.getHistogramById("NEWTAB_PAGE_LIFE_SPAN").add(delta); - } }, /** @@ -246,32 +236,5 @@ var gPage = { }, onPageVisibleAndLoaded() { - // Send the index of the last visible tile. - this.reportLastVisibleTileIndex(); - }, - - reportLastVisibleTileIndex() { - let cwu = window.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIDOMWindowUtils); - - let rect = cwu.getBoundsWithoutFlushing(gGrid.node); - let nodes = cwu.nodesFromRect(rect.left, rect.top, 0, rect.width, - rect.height, 0, true, false); - - let i = -1; - let lastIndex = -1; - let sites = gGrid.sites; - - for (let node of nodes) { - if (node.classList && node.classList.contains("newtab-cell")) { - if (sites[++i]) { - lastIndex = i; - if (sites[i].link.targetedSite) { - // record that suggested tile is shown to use suggested-tiles-histogram - this._suggestedTilePresent = true; - } - } - } - } } }; |