bug 735790 - Tab thumbnails only scale 3/4 of the window r=mfinkle
authorBrad Lassey <blassey@mozilla.com>
Thu, 15 Mar 2012 00:43:53 -0400
changeset 89452 b752b0c0dc02fc63354a0e84c9b02dbc85adfdf6
parent 89451 ae04da5efc98b2818afde7acd5b20f34ab956746
child 89453 b15f83270ab127d396ab3451a63f5f3c7b75ab2c
push id7165
push userblassey@mozilla.com
push dateThu, 15 Mar 2012 17:06:30 +0000
treeherdermozilla-inbound@b752b0c0dc02 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs735790
milestone14.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 735790 - Tab thumbnails only scale 3/4 of the window r=mfinkle
widget/android/AndroidBridge.cpp
--- a/widget/android/AndroidBridge.cpp
+++ b/widget/android/AndroidBridge.cpp
@@ -2100,20 +2100,20 @@ nsresult AndroidBridge::TakeScreenshot(n
         docshell->GetPresContext(getter_AddRefs(presContext));
     }
     if (!presContext)
         return NS_ERROR_FAILURE;
     nscolor bgColor = NS_RGB(255, 255, 255);
     nsIPresShell* presShell = presContext->PresShell();
     PRUint32 renderDocFlags = (nsIPresShell::RENDER_IGNORE_VIEWPORT_SCROLLING |
                                nsIPresShell::RENDER_DOCUMENT_RELATIVE);
-    nsRect r(nsPresContext::CSSPixelsToAppUnits(srcX),
-             nsPresContext::CSSPixelsToAppUnits(srcY),
-             nsPresContext::CSSPixelsToAppUnits(srcW),
-             nsPresContext::CSSPixelsToAppUnits(srcH));
+    nsRect r(nsPresContext::CSSPixelsToAppUnits(srcX / scale),
+             nsPresContext::CSSPixelsToAppUnits(srcY / scale),
+             nsPresContext::CSSPixelsToAppUnits(srcW / scale),
+             nsPresContext::CSSPixelsToAppUnits(srcH / scale));
 
     JNIEnv* jenv = AndroidBridge::GetJNIEnv();
     if (!jenv)
         return NS_OK;
 
     PRUint32 stride = dstW * 2;
     PRUint32 bufferSize = dstH * stride;