Bug 1238137 - Telemetry pings for main thread autoscrolling. r=mconley
--- a/toolkit/content/browser-content.js
+++ b/toolkit/content/browser-content.js
@@ -202,16 +202,19 @@ var ClickEventHandler = {
}
if (this._scrolldir != 'NS') {
var x = this.accelerate(this._screenX, this._startX) * timeCompensation;
var desiredScrollX = this._scrollErrorX + x;
actualScrollX = this.roundToZero(desiredScrollX);
this._scrollErrorX = (desiredScrollX - actualScrollX);
}
+ const kAutoscroll = 15; // defined in mozilla/layers/ScrollInputMethods.h
+ Services.telemetry.getHistogramById("SCROLL_INPUT_METHODS").add(kAutoscroll);
+
if (this._scrollable instanceof content.Window) {
this._scrollable.scrollBy(actualScrollX, actualScrollY);
} else { // an element with overflow
this._scrollable.scrollLeft += actualScrollX;
this._scrollable.scrollTop += actualScrollY;
}
content.requestAnimationFrame(this.autoscrollLoop);
},