зеркало из https://github.com/mozilla/pjs.git
Fix for bug #12449. Changed UpdateImageFrame() so that if the content object
has a NULL document object (the case for generated content) we mark the image frame dirty and generate a reflow command targeted at the parent frame
This commit is contained in:
Родитель
19ccc6552b
Коммит
4ba0f18641
|
@ -186,6 +186,25 @@ nsImageFrame::UpdateImage(nsIPresContext* aPresContext, PRUint32 aStatus)
|
|||
if (nsnull != document) {
|
||||
document->ContentChanged(mContent, nsnull);
|
||||
NS_RELEASE(document);
|
||||
} else {
|
||||
// The content object isn't associated with a document. That probably
|
||||
// means it's generated content. Mark ourselves dirty and generate a
|
||||
// reflow command targeted at our parent frame
|
||||
nsIReflowCommand* reflowCmd;
|
||||
nsresult rv;
|
||||
|
||||
mState |= NS_FRAME_IS_DIRTY;
|
||||
rv = NS_NewHTMLReflowCommand(&reflowCmd, mParent,
|
||||
nsIReflowCommand::ReflowDirty);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsIPresShell* presShell;
|
||||
|
||||
// Add the reflow command
|
||||
aPresContext->GetShell(&presShell);
|
||||
presShell->AppendReflowCommand(reflowCmd);
|
||||
NS_RELEASE(reflowCmd);
|
||||
NS_RELEASE(presShell);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -186,6 +186,25 @@ nsImageFrame::UpdateImage(nsIPresContext* aPresContext, PRUint32 aStatus)
|
|||
if (nsnull != document) {
|
||||
document->ContentChanged(mContent, nsnull);
|
||||
NS_RELEASE(document);
|
||||
} else {
|
||||
// The content object isn't associated with a document. That probably
|
||||
// means it's generated content. Mark ourselves dirty and generate a
|
||||
// reflow command targeted at our parent frame
|
||||
nsIReflowCommand* reflowCmd;
|
||||
nsresult rv;
|
||||
|
||||
mState |= NS_FRAME_IS_DIRTY;
|
||||
rv = NS_NewHTMLReflowCommand(&reflowCmd, mParent,
|
||||
nsIReflowCommand::ReflowDirty);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsIPresShell* presShell;
|
||||
|
||||
// Add the reflow command
|
||||
aPresContext->GetShell(&presShell);
|
||||
presShell->AppendReflowCommand(reflowCmd);
|
||||
NS_RELEASE(reflowCmd);
|
||||
NS_RELEASE(presShell);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче