зеркало из https://github.com/mozilla/pjs.git
Bustage fix for 126346 - checked in the wrong version of this file.
This commit is contained in:
Родитель
4b63b53d6a
Коммит
63e7443995
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче