зеркало из https://github.com/mozilla/pjs.git
Bug 389224: Clipped objects are sometimes not fully redrawn after clipping. r+sr=roc, a=dbaron
This commit is contained in:
Родитель
d4ad88c728
Коммит
b4892925e2
|
@ -423,12 +423,12 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat
|
|||
|
||||
if (oldRect.TopLeft() != rect.TopLeft() ||
|
||||
(aDelegatingFrame->GetStateBits() & NS_FRAME_FIRST_REFLOW) ||
|
||||
((aKidFrame->GetStyleDisplay()->mClipFlags & NS_STYLE_CLIP_RECT) &&
|
||||
(kidDesiredSize.mOverflowArea != oldOverflowRect))) {
|
||||
(kidDesiredSize.mOverflowArea + rect.TopLeft() != oldOverflowRect &&
|
||||
(kidDesiredSize.mOverflowArea + rect.TopLeft() != rect || oldRect != oldOverflowRect))) {
|
||||
// The frame moved; we have to invalidate the whole frame
|
||||
// because the children may have moved after they were reflowed
|
||||
// We also have to invalidate when we're clipping and the overflow
|
||||
// changes; the style code doesn't know how to deal with this case
|
||||
// We also have to invalidate when we have overflow and the overflow
|
||||
// changes because the change might be caused by clipping
|
||||
// XXX This could be optimized in some cases, especially clipping changes
|
||||
aKidFrame->GetParent()->Invalidate(oldOverflowRect);
|
||||
aKidFrame->GetParent()->Invalidate(kidDesiredSize.mOverflowArea +
|
||||
|
|
|
@ -1169,11 +1169,6 @@ nsChangeHint nsStyleDisplay::CalcDifference(const nsStyleDisplay& aOther) const
|
|||
|
||||
if (mClipFlags != aOther.mClipFlags || mClip != aOther.mClip) {
|
||||
NS_UpdateHint(hint, nsChangeHint_ReflowFrame);
|
||||
// The reflow code in naAbsoluteContainingBlock can deal with invalidation
|
||||
// in all cases except changing from non-auto clip to auto clip; when
|
||||
// changing to auto clip, the frame can't tell what happened
|
||||
if (mClipFlags == NS_STYLE_CLIP_AUTO)
|
||||
NS_UpdateHint(hint, nsChangeHint_RepaintFrame);
|
||||
}
|
||||
// XXX the following is conservative, for now: changing float breaking shouldn't
|
||||
// necessarily require a repaint, reflow should suffice.
|
||||
|
|
Загрузка…
Ссылка в новой задаче