Bug 301477 image zoom cursor does not change after resizing browser window

r=bz sr=jst
This commit is contained in:
cst%yecc.com 2006-12-14 02:06:49 +00:00
Родитель e8425e7c24
Коммит e3ced1732c
1 изменённых файлов: 5 добавлений и 2 удалений

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

@ -631,14 +631,17 @@ nsImageDocument::CheckOverflowing(PRBool changeState)
mVisibleWidth = NSTwipsToIntPixels(visibleArea.width, t2p);
mVisibleHeight = NSTwipsToIntPixels(visibleArea.height, t2p);
PRBool imageWasOverflowing = mImageIsOverflowing;
mImageIsOverflowing =
mImageWidth > mVisibleWidth || mImageHeight > mVisibleHeight;
PRBool windowBecameBigEnough = imageWasOverflowing && !mImageIsOverflowing;
if (changeState || mShouldResize || mFirstResize) {
if (changeState || mShouldResize || mFirstResize ||
windowBecameBigEnough) {
if (mImageIsOverflowing && (changeState || mShouldResize)) {
ShrinkToFit();
}
else if (mImageIsResized || mFirstResize) {
else if (mImageIsResized || mFirstResize || windowBecameBigEnough) {
RestoreImage();
}
}