Bug 1189702 - Only insert floating scrollbars when document changes. r=paul, a=ritu
authorJ. Ryan Stinnett <jryans@gmail.com>
Tue, 11 Aug 2015 14:26:35 -0700
changeset 288725 ecb0ccdde0978a5823aa54df23c3a077ae8ed967
parent 288724 bb0809cb80817a7f25161f4e1de443a372eba05d
child 288726 129a17d4e2a40252bb86af441f0cc720c14bee0f
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspaul, ritu
bugs1189702
milestone42.0a2
Bug 1189702 - Only insert floating scrollbars when document changes. r=paul, a=ritu
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;
     }