Bug 1189702 - Only insert floating scrollbars when document changes. r=paul
authorJ. Ryan Stinnett <jryans@gmail.com>
Tue, 11 Aug 2015 14:26:35 -0700
changeset 257344 410f6c78d22652c5b977acf211faf8faf8879ca4
parent 257343 3945e72b7fbee25f136c65f6018abb0a4482c355
child 257345 66bf3e9e71d4d1730c15bbdd0448b91c8c1a15b8
push id29214
push userryanvm@gmail.com
push dateWed, 12 Aug 2015 13:12:39 +0000
treeherdermozilla-central@8584e1ea8f6a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspaul
bugs1189702
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1189702 - Only insert floating scrollbars when document changes. r=paul
browser/devtools/responsivedesign/responsivedesign-child.js
--- a/browser/devtools/responsivedesign/responsivedesign-child.js
+++ b/browser/devtools/responsivedesign/responsivedesign-child.js
@@ -108,17 +108,20 @@ function screenshot() {
   canvas.width = width;
   canvas.height = height;
   let ctx = canvas.getContext("2d");
   ctx.drawWindow(content, content.scrollX, content.scrollY, width, height, "#fff");
   sendAsyncMessage("ResponsiveMode:RequestScreenshot:Done", canvas.toDataURL());
 }
 
 let WebProgressListener = {
-  onLocationChange: function onLocationChange(aWebProgress) {
+  onLocationChange(webProgress, request, URI, flags) {
+    if (flags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT) {
+      return;
+    }
     makeScrollbarsFloating();
   },
   QueryInterface: function QueryInterface(aIID) {
     if (aIID.equals(Ci.nsIWebProgressListener) ||
         aIID.equals(Ci.nsISupportsWeakReference) ||
         aIID.equals(Ci.nsISupports)) {
         return this;
     }