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 257246 410f6c78d22652c5b977acf211faf8faf8879ca4
parent 257245 3945e72b7fbee25f136c65f6018abb0a4482c355
child 257247 66bf3e9e71d4d1730c15bbdd0448b91c8c1a15b8
push id14600
push userkwierso@gmail.com
push dateTue, 11 Aug 2015 21:26:57 +0000
treeherderfx-team@410f6c78d226 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspaul
bugs1189702
milestone43.0a1
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;
     }