Bug 1393424 - Don't try to autoscroll in Print Preview mode. r=kats
It doesn't work properly anyways due to a more general coordinate-system
problem on the Print Preview page (see
bug 1393494).
MozReview-Commit-ID: D4i2H8z5mtW
--- a/toolkit/content/browser-content.js
+++ b/toolkit/content/browser-content.js
@@ -134,16 +134,22 @@ var ClickEventHandler = {
startScroll(event) {
this.findNearestScrollableElement(event.originalTarget);
if (!this._scrollable)
return;
+ // In some configurations like Print Preview, content.performance
+ // (which we use below) is null. Autoscrolling is broken in Print
+ // Preview anyways (see bug 1393494), so just don't start it at all.
+ if (!content.performance)
+ return;
+
let domUtils = content.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils);
let scrollable = this._scrollable;
if (scrollable instanceof Ci.nsIDOMWindow) {
// getViewId() needs an element to operate on.
scrollable = scrollable.document.documentElement;
}
this._scrollId = null;