Bug 1096550 - Update content scale when swapping remote tabs between windows. r=roc. draft
authorDavid Parks <davidp99@gmail.com>
Tue, 16 Jun 2015 13:40:55 -0400
changeset 272499 10690c249204e3d7e717594ac55d18f844f4fc8b
parent 272438 cd0d976e5f5c6389512cad8f2cae03526b0fb0f3
child 506965 a76713de781bf2216f47fc4d645dd98ebd1bf513
push id2898
push usermconley@mozilla.com
push dateTue, 16 Jun 2015 17:41:19 +0000
reviewersroc
bugs1096550
milestone41.0a1
Bug 1096550 - Update content scale when swapping remote tabs between windows. r=roc. We need to do this in case the windows we are swapping between have different content scales (ie. HiDPI vs LowDPI).
dom/base/nsFrameLoader.cpp
--- a/dom/base/nsFrameLoader.cpp
+++ b/dom/base/nsFrameLoader.cpp
@@ -928,16 +928,19 @@ nsFrameLoader::SwapWithOtherRemoteLoader
     aOther->mMessageManager->SetCallback(this);
   }
   mMessageManager.swap(aOther->mMessageManager);
 
   aFirstToSwap.swap(aSecondToSwap);
 
   ourFrameFrame->EndSwapDocShells(otherFrame);
 
+  ourShell->BackingScaleFactorChanged();
+  otherShell->BackingScaleFactorChanged();
+
   ourDoc->FlushPendingNotifications(Flush_Layout);
   otherDoc->FlushPendingNotifications(Flush_Layout);
 
   mInSwap = aOther->mInSwap = false;
 
   unused << mRemoteBrowser->SendSwappedWithOtherRemoteLoader();
   unused << aOther->mRemoteBrowser->SendSwappedWithOtherRemoteLoader();
   return NS_OK;