mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-13 18:27:35 +00:00
When an image is resized, make it invalidate its mRect, since it needs to
repaint that area. Bug 284166, r+sr=roc
This commit is contained in:
parent
e31568eecd
commit
32c0620c6e
@ -1041,6 +1041,15 @@ nsImageFrame::Reflow(nsPresContext* aPresContext,
|
||||
aMetrics.mOverflowArea.SetRect(0, 0, aMetrics.width, aMetrics.height);
|
||||
FinishAndStoreOverflow(&aMetrics);
|
||||
|
||||
// Now that that's all done, check whether we're resizing... if we are,
|
||||
// invalidate our rect.
|
||||
// XXXbz we really only want to do this when reflow is completely done, but
|
||||
// we have no way to detect when mRect changes (since SetRect is non-virtual,
|
||||
// so this is the best we can do).
|
||||
if (mRect.width != aMetrics.width || mRect.height != aMetrics.height) {
|
||||
Invalidate(nsRect(0, 0, mRect.width, mRect.height), PR_FALSE);
|
||||
}
|
||||
|
||||
NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
|
||||
("exit nsImageFrame::Reflow: size=%d,%d",
|
||||
aMetrics.width, aMetrics.height));
|
||||
|
Loading…
Reference in New Issue
Block a user