Back out 87e2bfbb427d (bug 874295) for mochitest-1 failures

CLOSED TREE
This commit is contained in:
Phil Ringnalda 2013-05-29 23:55:29 -07:00
parent 4964434f67
commit 1eecaa780b
3 changed files with 0 additions and 11 deletions

View File

@ -1560,14 +1560,10 @@ public:
uint32_t aDisplayWidth,
uint32_t aDisplayHeight);
#ifdef MOZ_WIDGET_ANDROID
/**
* The device-pixel-to-CSS-px ratio used to adjust meta viewport values.
* XXX Not to be used --- use nsIWidget::GetDefaultScale instead. Will be
* removed when bug 803207 is fixed.
*/
static double GetDevicePixelsPerMetaViewportPixel(nsIWidget* aWidget);
#endif
// Call EnterMicroTask when you're entering JS execution.
// Usually the best way to do this is to use nsAutoMicroTask.

View File

@ -4905,7 +4905,6 @@ nsContentUtils::GetViewportInfo(nsIDocument *aDocument,
return aDocument->GetViewportInfo(aDisplayWidth, aDisplayHeight);
}
#ifdef MOZ_WIDGET_ANDROID
/* static */
double
nsContentUtils::GetDevicePixelsPerMetaViewportPixel(nsIWidget* aWidget)
@ -4927,7 +4926,6 @@ nsContentUtils::GetDevicePixelsPerMetaViewportPixel(nsIWidget* aWidget)
// For very high-density displays like the iPhone 4, use an integer ratio.
return floor(dpi / 150.0);
}
#endif
/* static */
nsresult

View File

@ -6892,12 +6892,7 @@ nsDocument::GetViewportInfo(uint32_t aDisplayWidth,
}
// Now convert the scale into device pixels per CSS pixel.
nsIWidget *widget = nsContentUtils::WidgetForDocument(this);
#ifdef MOZ_WIDGET_ANDROID
// Temporarily use special Android code until bug 803207 is fixed
double pixelRatio = widget ? nsContentUtils::GetDevicePixelsPerMetaViewportPixel(widget) : 1.0;
#else
double pixelRatio = widget ? widget->GetDefaultScale() : 1.0;
#endif
float scaleFloat = mScaleFloat * pixelRatio;
float scaleMinFloat= mScaleMinFloat * pixelRatio;
float scaleMaxFloat = mScaleMaxFloat * pixelRatio;