mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
Bug 643836 Invalidation does not always trigger a displayport update r=tn
This commit is contained in:
parent
7d9dc8d482
commit
c82c8dab71
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user