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:
@@ -50,7 +50,7 @@
|
||||
|
||||
class nsColumnSetFrame : public nsHTMLContainerFrame {
|
||||
public:
|
||||
nsColumnSetFrame();
|
||||
nsColumnSetFrame(nsStyleContext* aContext);
|
||||
|
||||
NS_IMETHOD SetInitialChildList(nsPresContext* aPresContext,
|
||||
nsIAtom* aListName,
|
||||
@@ -143,9 +143,9 @@ protected:
|
||||
* XXX should we support CSS columns applied to table elements?
|
||||
*/
|
||||
nsIFrame*
|
||||
NS_NewColumnSetFrame(nsIPresShell* aPresShell, PRUint32 aStateFlags)
|
||||
NS_NewColumnSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, PRUint32 aStateFlags)
|
||||
{
|
||||
nsColumnSetFrame* it = new (aPresShell) nsColumnSetFrame;
|
||||
nsColumnSetFrame* it = new (aPresShell) nsColumnSetFrame(aContext);
|
||||
if (it) {
|
||||
// set the state flags (if any are provided)
|
||||
it->AddStateBits(aStateFlags);
|
||||
@@ -154,8 +154,8 @@ NS_NewColumnSetFrame(nsIPresShell* aPresShell, PRUint32 aStateFlags)
|
||||
return it;
|
||||
}
|
||||
|
||||
nsColumnSetFrame::nsColumnSetFrame()
|
||||
: nsHTMLContainerFrame(), mLastBalanceHeight(NS_INTRINSICSIZE),
|
||||
nsColumnSetFrame::nsColumnSetFrame(nsStyleContext* aContext)
|
||||
: nsHTMLContainerFrame(aContext), mLastBalanceHeight(NS_INTRINSICSIZE),
|
||||
mLastFrameStatus(NS_FRAME_COMPLETE)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user