зеркало из https://github.com/mozilla/gecko-dev.git
The document viewer was only clamping on values above 100%, the Front-end UI
was doing the clamping on 50-100%, I have changed the back-end to do no clamping and the front will now allow values between 10 and 500%, these seem reasonable. Bug 127508 r=sgehani sr=alecf a=asa
This commit is contained in:
Родитель
f72bec36c3
Коммит
b04e03e883
|
@ -5685,9 +5685,7 @@ DocumentViewerImpl::PrintPreview(nsIPrintSettings* aPrintSettings)
|
|||
if (!mPrt->mShrinkToFit) {
|
||||
double scaling;
|
||||
mPrt->mPrintSettings->GetScaling(&scaling);
|
||||
if (scaling <= 1.0) {
|
||||
mDeviceContext->SetCanonicalPixelScale(float(scaling));
|
||||
}
|
||||
mDeviceContext->SetCanonicalPixelScale(float(scaling)*mPrt->mOrigDCScale);
|
||||
}
|
||||
}
|
||||
ppDC->GetDeviceSurfaceDimensions(width, height);
|
||||
|
@ -6041,9 +6039,7 @@ DocumentViewerImpl::Print(nsIPrintSettings* aPrintSettings,
|
|||
if (!mPrt->mShrinkToFit) {
|
||||
double scaling;
|
||||
mPrt->mPrintSettings->GetScaling(&scaling);
|
||||
if (scaling <= 1.0) {
|
||||
mPrt->mPrintDC->SetCanonicalPixelScale(float(scaling)*mPrt->mOrigDCScale);
|
||||
}
|
||||
mPrt->mPrintDC->SetCanonicalPixelScale(float(scaling)*mPrt->mOrigDCScale);
|
||||
}
|
||||
|
||||
if(webContainer) {
|
||||
|
|
|
@ -5685,9 +5685,7 @@ DocumentViewerImpl::PrintPreview(nsIPrintSettings* aPrintSettings)
|
|||
if (!mPrt->mShrinkToFit) {
|
||||
double scaling;
|
||||
mPrt->mPrintSettings->GetScaling(&scaling);
|
||||
if (scaling <= 1.0) {
|
||||
mDeviceContext->SetCanonicalPixelScale(float(scaling));
|
||||
}
|
||||
mDeviceContext->SetCanonicalPixelScale(float(scaling)*mPrt->mOrigDCScale);
|
||||
}
|
||||
}
|
||||
ppDC->GetDeviceSurfaceDimensions(width, height);
|
||||
|
@ -6041,9 +6039,7 @@ DocumentViewerImpl::Print(nsIPrintSettings* aPrintSettings,
|
|||
if (!mPrt->mShrinkToFit) {
|
||||
double scaling;
|
||||
mPrt->mPrintSettings->GetScaling(&scaling);
|
||||
if (scaling <= 1.0) {
|
||||
mPrt->mPrintDC->SetCanonicalPixelScale(float(scaling)*mPrt->mOrigDCScale);
|
||||
}
|
||||
mPrt->mPrintDC->SetCanonicalPixelScale(float(scaling)*mPrt->mOrigDCScale);
|
||||
}
|
||||
|
||||
if(webContainer) {
|
||||
|
|
|
@ -386,11 +386,11 @@ function onAccept()
|
|||
gPrintSettings.shrinkToFit = gDialog.shrinkToFit.checked;
|
||||
|
||||
var scaling = document.getElementById("scalingInput").value;
|
||||
if (scaling < 50.0) {
|
||||
scaling = 50.0;
|
||||
if (scaling < 10.0) {
|
||||
scaling = 10.0;
|
||||
}
|
||||
if (scaling > 100.0) {
|
||||
scaling = 100.0;
|
||||
if (scaling > 500.0) {
|
||||
scaling = 500.0;
|
||||
}
|
||||
scaling /= 100.0;
|
||||
gPrintSettings.scaling = scaling;
|
||||
|
|
|
@ -254,7 +254,7 @@
|
|||
newValue = parseInt(aValue);
|
||||
|
||||
// bounds check the new value
|
||||
if (newValue >= 50 && newValue <= 100)
|
||||
if (newValue >= 10 && newValue <= 500)
|
||||
{
|
||||
this.mScaleTextBox.value = newValue;
|
||||
|
||||
|
|
|
@ -386,11 +386,11 @@ function onAccept()
|
|||
gPrintSettings.shrinkToFit = gDialog.shrinkToFit.checked;
|
||||
|
||||
var scaling = document.getElementById("scalingInput").value;
|
||||
if (scaling < 50.0) {
|
||||
scaling = 50.0;
|
||||
if (scaling < 10.0) {
|
||||
scaling = 10.0;
|
||||
}
|
||||
if (scaling > 100.0) {
|
||||
scaling = 100.0;
|
||||
if (scaling > 500.0) {
|
||||
scaling = 500.0;
|
||||
}
|
||||
scaling /= 100.0;
|
||||
gPrintSettings.scaling = scaling;
|
||||
|
|
Загрузка…
Ссылка в новой задаче