Bustage fix for 126346 - checked in the wrong version of this file.

This commit is contained in:
rjesup%wgate.com 2002-09-06 19:16:11 +00:00
Родитель 4b63b53d6a
Коммит 63e7443995
2 изменённых файлов: 14 добавлений и 18 удалений

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

@ -2290,20 +2290,18 @@ SetChildTextZoom(nsIMarkupDocumentViewer* aChild, void* aClosure)
NS_IMETHODIMP DocumentViewerImpl::SetTextZoom(float aTextZoom)
{
if (mDeviceContext) {
float oldTextZoom
// Don't reflow or bubble down if there's no change in the textZoom.
// Not having this check caused the Tp regression from bug 126346
mDeviceContext->GetTextZoom(&oldTextZoom);
float oldTextZoom = 1.0; // just in case mDeviceContext doesn't implement
// Don't reflow if there's no change in the textZoom.
mDeviceContext->GetTextZoom(oldTextZoom);
mDeviceContext->SetTextZoom(aTextZoom);
if (oldTextZoom == aTextZoom)
return NS_OK;
if (mPresContext) {
if (oldTextZoom != aTextZoom && mPresContext) {
mPresContext->ClearStyleDataAndReflow();
}
}
// now set the text zoom on all children of mContainer
// now set the text zoom on all children of mContainer (even if our zoom
// didn't change, our children's zoom may be different, though it would
// be unusual).
struct TextZoomInfo textZoomInfo = { aTextZoom };
return CallChildren(SetChildTextZoom, &textZoomInfo);
}

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

@ -2290,20 +2290,18 @@ SetChildTextZoom(nsIMarkupDocumentViewer* aChild, void* aClosure)
NS_IMETHODIMP DocumentViewerImpl::SetTextZoom(float aTextZoom)
{
if (mDeviceContext) {
float oldTextZoom
// Don't reflow or bubble down if there's no change in the textZoom.
// Not having this check caused the Tp regression from bug 126346
mDeviceContext->GetTextZoom(&oldTextZoom);
float oldTextZoom = 1.0; // just in case mDeviceContext doesn't implement
// Don't reflow if there's no change in the textZoom.
mDeviceContext->GetTextZoom(oldTextZoom);
mDeviceContext->SetTextZoom(aTextZoom);
if (oldTextZoom == aTextZoom)
return NS_OK;
if (mPresContext) {
if (oldTextZoom != aTextZoom && mPresContext) {
mPresContext->ClearStyleDataAndReflow();
}
}
// now set the text zoom on all children of mContainer
// now set the text zoom on all children of mContainer (even if our zoom
// didn't change, our children's zoom may be different, though it would
// be unusual).
struct TextZoomInfo textZoomInfo = { aTextZoom };
return CallChildren(SetChildTextZoom, &textZoomInfo);
}