mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 593892. Draw the previous page if the new page is suppressed. r=roc a=roc
This commit is contained in:
parent
62acd08cbd
commit
1c39c6df06
@ -213,6 +213,10 @@ public:
|
||||
* so that methods like GetFrameForPoint work when painting is suppressed.
|
||||
*/
|
||||
void IgnorePaintSuppression() { mIgnoreSuppression = PR_TRUE; }
|
||||
/**
|
||||
* @return Returns if this builder will ignore paint suppression.
|
||||
*/
|
||||
PRBool IsIgnoringPaintSuppression() { return mIgnoreSuppression; }
|
||||
/**
|
||||
* @return Returns if this builder had to ignore painting suppression on some
|
||||
* document when building the display list.
|
||||
|
@ -263,25 +263,35 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
if (!subdocView)
|
||||
return NS_OK;
|
||||
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
nsCOMPtr<nsIPresShell> presShell = nsnull;
|
||||
|
||||
nsIFrame* subdocRootFrame =
|
||||
static_cast<nsIFrame*>(subdocView->GetClientData());
|
||||
|
||||
if (subdocRootFrame) {
|
||||
presShell = subdocRootFrame->PresContext()->PresShell();
|
||||
} else {
|
||||
}
|
||||
// If painting is suppressed in the presshell, we try to look for a better
|
||||
// presshell to use.
|
||||
if (!presShell || (presShell->IsPaintingSuppressed() &&
|
||||
!aBuilder->IsIgnoringPaintSuppression())) {
|
||||
// During page transition mInnerView will sometimes have two children, the
|
||||
// first being the new page that may not have any frame, and the second
|
||||
// being the old page that will probably have a frame.
|
||||
nsIView* nextView = subdocView->GetNextSibling();
|
||||
nsIFrame* frame = nsnull;
|
||||
if (nextView) {
|
||||
subdocRootFrame = static_cast<nsIFrame*>(nextView->GetClientData());
|
||||
frame = static_cast<nsIFrame*>(nextView->GetClientData());
|
||||
}
|
||||
if (subdocRootFrame) {
|
||||
subdocView = nextView;
|
||||
presShell = subdocRootFrame->PresContext()->PresShell();
|
||||
} else {
|
||||
if (frame) {
|
||||
nsIPresShell* ps = frame->PresContext()->PresShell();
|
||||
if (!presShell || (ps && !ps->IsPaintingSuppressed())) {
|
||||
subdocView = nextView;
|
||||
subdocRootFrame = frame;
|
||||
presShell = ps;
|
||||
}
|
||||
}
|
||||
if (!presShell) {
|
||||
// If we don't have a frame we use this roundabout way to get the pres shell.
|
||||
if (!mFrameLoader)
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user