Bug 382458, additional patch to fix repainting problems with theming and pixel rounding. r=vlad, a=blocking1.9+

This commit is contained in:
sharparrow1@yahoo.com 2007-08-17 13:30:23 -07:00
Родитель 6335ca5f70
Коммит b7507c850a
1 изменённых файлов: 9 добавлений и 4 удалений

Просмотреть файл

@ -123,8 +123,12 @@ gfxWindowsNativeDrawing::BeginNativeDrawing()
if (mTransformType == TRANSLATION_ONLY || !(mNativeDrawFlags & CAN_AXIS_ALIGNED_SCALE)) { if (mTransformType == TRANSLATION_ONLY || !(mNativeDrawFlags & CAN_AXIS_ALIGNED_SCALE)) {
mScale = gfxSize(1.0, 1.0); mScale = gfxSize(1.0, 1.0);
mTempSurfaceSize.width = (PRInt32) NS_ceil(mNativeRect.size.width); // Add 1 to the surface size; it's guaranteed to not be incorrect,
mTempSurfaceSize.height = (PRInt32) NS_ceil(mNativeRect.size.height); // and it fixes bug 382458
// There's probably a better fix, but I haven't figured out
// the root cause of the problem.
mTempSurfaceSize.width = (PRInt32) NS_ceil(mNativeRect.size.width + 1);
mTempSurfaceSize.height = (PRInt32) NS_ceil(mNativeRect.size.height + 1);
} else { } else {
// figure out the scale factors // figure out the scale factors
mScale = m.ScaleFactors(PR_TRUE); mScale = m.ScaleFactors(PR_TRUE);
@ -136,8 +140,9 @@ gfxWindowsNativeDrawing::BeginNativeDrawing()
mWorldTransform.eDx = 0.0f; mWorldTransform.eDx = 0.0f;
mWorldTransform.eDy = 0.0f; mWorldTransform.eDy = 0.0f;
mTempSurfaceSize.width = (PRInt32) NS_ceil(mNativeRect.size.width * mScale.width); // See comment above about "+1"
mTempSurfaceSize.height = (PRInt32) NS_ceil(mNativeRect.size.height * mScale.height); mTempSurfaceSize.width = (PRInt32) NS_ceil(mNativeRect.size.width * mScale.width + 1);
mTempSurfaceSize.height = (PRInt32) NS_ceil(mNativeRect.size.height * mScale.height + 1);
} }
} }
} }