Bug 643836 Invalidation does not always trigger a displayport update r=tn

This commit is contained in:
Benjamin Stover 2011-03-24 10:40:49 -07:00
parent 7d9dc8d482
commit c82c8dab71

View File

@ -337,8 +337,14 @@ nsDOMWindowUtils::SetDisplayPortForElement(float aXPx, float aYPx,
if (presShell) {
nsIFrame* rootFrame = presShell->FrameManager()->GetRootFrame();
if (rootFrame) {
rootFrame->InvalidateWithFlags(rootFrame->GetVisualOverflowRectRelativeToSelf(),
nsIFrame::INVALIDATE_NO_THEBES_LAYERS);
nsIContent* rootContent =
rootScrollFrame ? rootScrollFrame->GetContent() : nsnull;
nsRect rootDisplayport;
bool usingDisplayport = rootContent &&
nsLayoutUtils::GetDisplayPort(rootContent, &rootDisplayport);
rootFrame->InvalidateWithFlags(
usingDisplayport ? rootDisplayport : rootFrame->GetVisualOverflowRect(),
nsIFrame::INVALIDATE_NO_THEBES_LAYERS);
}
}