зеркало из https://github.com/mozilla/gecko-dev.git
Back out 87e2bfbb427d (bug 874295) for mochitest-1 failures
CLOSED TREE
This commit is contained in:
Родитель
10219ba71a
Коммит
d45cb1d6e2
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче