зеркало из https://github.com/mozilla/pjs.git
Bug 564991. Part 42: When the root frame changes size, invalidate the changed area. r=tnikkel
This commit is contained in:
Родитель
849c6b1b7a
Коммит
159f2c3ab6
|
@ -7440,10 +7440,16 @@ PresShell::DoReflow(nsIFrame* target, PRBool aInterruptible)
|
|||
// use all the available space. If it's simply a `reflow root',
|
||||
// then use the target frame's size as the available space.
|
||||
nsSize size;
|
||||
if (target == rootFrame)
|
||||
if (target == rootFrame) {
|
||||
size = mPresContext->GetVisibleArea().Size();
|
||||
else
|
||||
|
||||
// target->GetRect() has the old size of the frame,
|
||||
// mPresContext->GetVisibleArea() has the new size.
|
||||
target->InvalidateRectDifference(mPresContext->GetVisibleArea(),
|
||||
target->GetRect());
|
||||
} else {
|
||||
size = target->GetSize();
|
||||
}
|
||||
|
||||
NS_ASSERTION(!target->GetNextInFlow() && !target->GetPrevInFlow(),
|
||||
"reflow roots should never split");
|
||||
|
|
|
@ -3960,17 +3960,15 @@ nsIFrame::InvalidateRoot(const nsRect& aDamageRect, PRUint32 aFlags)
|
|||
NS_ASSERTION(nsLayoutUtils::GetDisplayRootFrame(this) == this,
|
||||
"Can only call this on display roots");
|
||||
|
||||
nsRect rect;
|
||||
rect.IntersectRect(aDamageRect, nsRect(nsPoint(0,0), GetSize()));
|
||||
|
||||
if ((mState & NS_FRAME_HAS_CONTAINER_LAYER) &&
|
||||
!(aFlags & INVALIDATE_NO_THEBES_LAYERS)) {
|
||||
FrameLayerBuilder::InvalidateThebesLayerContents(this, rect);
|
||||
FrameLayerBuilder::InvalidateThebesLayerContents(this, aDamageRect);
|
||||
}
|
||||
|
||||
PRUint32 flags =
|
||||
(aFlags & INVALIDATE_IMMEDIATE) ? NS_VMREFRESH_IMMEDIATE : NS_VMREFRESH_NO_SYNC;
|
||||
|
||||
nsRect rect = aDamageRect;
|
||||
nsRegion* excludeRegion = static_cast<nsRegion*>
|
||||
(Properties().Get(DeferInvalidatesProperty()));
|
||||
if (excludeRegion) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче