зеркало из https://github.com/mozilla/gecko-dev.git
Bug 301477 image zoom cursor does not change after resizing browser window
r=bz sr=jst
This commit is contained in:
Родитель
e8425e7c24
Коммит
e3ced1732c
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче