Bug 113083. Concentrate view setup code into a few shared functions in nsContainerFrame. Only change style-dependent view properties after style change, not during reflow, in response to nsChangeHint_SyncFrameView. Change 'clip' to only do SyncFrameView, not reflow. r=dbaron,sr=kin

git-svn-id: svn://10.0.0.236/trunk@130792 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
roc+%cs.cmu.edu
2002-09-30 11:56:37 +00:00
parent f2d14853a0
commit e25496d35f
24 changed files with 1482 additions and 1687 deletions

View File

@@ -60,6 +60,7 @@
#include "nsGUIEvent.h"
#include "nsLayoutAtoms.h"
#include "nsIServiceManager.h"
#include "nsContainerFrame.h"
#ifdef ACCESSIBILITY
#include "nsIAccessibilityService.h"
#endif
@@ -283,14 +284,15 @@ nsImageControlFrame::Init(nsIPresContext* aPresContext,
// the view's size is not know yet, but its size will be kept in synch with our frame.
nsRect boundBox(0, 0, 0, 0);
result = view->Init(viewMan, boundBox, parView);
viewMan->SetViewContentTransparency(view, PR_TRUE);
nsContainerFrame::SyncFrameViewProperties(aPresContext, this, aContext, view);
// this gets reset during reflow anyway
// viewMan->SetViewContentTransparency(view, PR_TRUE);
// XXX put the view last in document order until we know how to do better
viewMan->InsertChild(parView, view, nsnull, PR_TRUE);
SetView(aPresContext, view);
const nsStyleVisibility* vis = (const nsStyleVisibility*) mStyleContext->GetStyleData(eStyleStruct_Visibility);
// set the opacity
viewMan->SetViewOpacity(view, vis->mOpacity);
}
return rv;