Resize the subdocument off a post-reflow callback so that we don't run script
during reflow, and a few related checks to make sure we can deal with script in reflow callbacks better. Bug 396587, r+sr+a=roc. git-svn-id: svn://10.0.0.236/trunk@236344 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -3624,9 +3624,11 @@ nsDocShell::SetPositionAndSize(PRInt32 x, PRInt32 y, PRInt32 cx,
|
||||
mBounds.width = cx;
|
||||
mBounds.height = cy;
|
||||
|
||||
if (mContentViewer) {
|
||||
// Hold strong ref, since SetBounds can make us null out mContentViewer
|
||||
nsCOMPtr<nsIContentViewer> viewer = mContentViewer;
|
||||
if (viewer) {
|
||||
//XXX Border figured in here or is that handled elsewhere?
|
||||
NS_ENSURE_SUCCESS(mContentViewer->SetBounds(mBounds), NS_ERROR_FAILURE);
|
||||
NS_ENSURE_SUCCESS(viewer->SetBounds(mBounds), NS_ERROR_FAILURE);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
||||
Reference in New Issue
Block a user