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:
@@ -155,10 +155,10 @@ private:
|
||||
|
||||
//---------------------------------------------------------
|
||||
nsIFrame*
|
||||
NS_NewListControlFrame(nsIPresShell* aPresShell)
|
||||
NS_NewListControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
{
|
||||
nsListControlFrame* it =
|
||||
new (aPresShell) nsListControlFrame(aPresShell, aPresShell->GetDocument());
|
||||
new (aPresShell) nsListControlFrame(aPresShell, aPresShell->GetDocument(), aContext);
|
||||
|
||||
if (it) {
|
||||
it->AddStateBits(NS_FRAME_INDEPENDENT_SELECTION);
|
||||
@@ -275,9 +275,9 @@ if (aReflowState.mComputedWidth != NS_UNCONSTRAINEDSIZE) { \
|
||||
//------------------------------------------------------
|
||||
|
||||
//---------------------------------------------------------
|
||||
nsListControlFrame::nsListControlFrame(nsIPresShell* aShell,
|
||||
nsIDocument* aDocument)
|
||||
: nsHTMLScrollFrame(aShell, PR_FALSE)
|
||||
nsListControlFrame::nsListControlFrame(
|
||||
nsIPresShell* aShell, nsIDocument* aDocument, nsStyleContext* aContext)
|
||||
: nsHTMLScrollFrame(aShell, aContext, PR_FALSE)
|
||||
{
|
||||
mComboboxFrame = nsnull;
|
||||
mChangesSinceDragStart = PR_FALSE;
|
||||
@@ -1435,10 +1435,9 @@ nsListControlFrame::GetSizeAttribute(PRInt32 *aSize) {
|
||||
NS_IMETHODIMP
|
||||
nsListControlFrame::Init(nsIContent* aContent,
|
||||
nsIFrame* aParent,
|
||||
nsStyleContext* aContext,
|
||||
nsIFrame* aPrevInFlow)
|
||||
{
|
||||
nsresult result = nsHTMLScrollFrame::Init(aContent, aParent, aContext, aPrevInFlow);
|
||||
nsresult result = nsHTMLScrollFrame::Init(aContent, aParent, aPrevInFlow);
|
||||
|
||||
// get the receiver interface from the browser button's content node
|
||||
nsCOMPtr<nsIDOMEventReceiver> receiver(do_QueryInterface(mContent));
|
||||
|
||||
Reference in New Issue
Block a user