Bug 330934. Set a nsIFrame's stylecontext in its constructor, to ensure that there's always one available for GetPresContext() to use even if Init hasn't been called. Patch by Marc Liddell, r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@193022 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -69,7 +69,7 @@ class nsImageControlFrame : public nsImageControlFrameSuper,
|
||||
public nsIImageControlFrame
|
||||
{
|
||||
public:
|
||||
nsImageControlFrame();
|
||||
nsImageControlFrame(nsStyleContext* aContext);
|
||||
~nsImageControlFrame();
|
||||
|
||||
NS_IMETHOD Destroy(nsPresContext *aPresContext);
|
||||
@@ -115,7 +115,8 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
nsImageControlFrame::nsImageControlFrame()
|
||||
nsImageControlFrame::nsImageControlFrame(nsStyleContext* aContext):
|
||||
nsImageControlFrameSuper(aContext)
|
||||
{
|
||||
mLastClickPoint = nsPoint(0,0);
|
||||
}
|
||||
@@ -133,9 +134,9 @@ nsImageControlFrame::Destroy(nsPresContext *aPresContext)
|
||||
}
|
||||
|
||||
nsIFrame*
|
||||
NS_NewImageControlFrame(nsIPresShell* aPresShell)
|
||||
NS_NewImageControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
{
|
||||
return new (aPresShell) nsImageControlFrame;
|
||||
return new (aPresShell) nsImageControlFrame(aContext);
|
||||
}
|
||||
|
||||
// Frames are not refcounted, no need to AddRef
|
||||
|
||||
Reference in New Issue
Block a user