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 281922 1587bada854fa94d9f603317bfe7d9f09d1ff27f
parent 281921 ff50c9cfaf0b010913b68d5fdb19e89759d87261
child 281923 d60f375bf2eb1b7ec519174df45ec56bf725a56f
push id4955
push userryanvm@gmail.com
push dateThu, 13 Aug 2015 20:06:06 +0000
treeherdermozilla-beta@1587bada854f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspaul, ritu
bugs1189702
milestone41.0
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;
     }