mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
Added flags to factory method to allow NS_BLOCK_SPACE_MGR to be specified for abs. Positioned fieldsets. Fixes bug 23611. r=rods,pierre
This commit is contained in:
parent
b6ce9d3882
commit
8c62444298
@ -89,7 +89,7 @@ protected:
|
||||
};
|
||||
|
||||
nsresult
|
||||
NS_NewFieldSetFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame)
|
||||
NS_NewFieldSetFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame, PRUint32 aStateFlags )
|
||||
{
|
||||
NS_PRECONDITION(aNewFrame, "null OUT ptr");
|
||||
if (nsnull == aNewFrame) {
|
||||
@ -99,6 +99,10 @@ NS_NewFieldSetFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame)
|
||||
if (!it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
// set the state flags (if any are provided)
|
||||
it->SetFrameState( aStateFlags );
|
||||
|
||||
*aNewFrame = it;
|
||||
return NS_OK;
|
||||
}
|
||||
@ -163,7 +167,12 @@ nsFieldSetFrame::SetInitialChildList(nsIPresContext* aPresContext,
|
||||
const nsStyleDisplay* styleDisplay;
|
||||
GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&) styleDisplay);
|
||||
|
||||
PRUint8 flags = (NS_STYLE_DISPLAY_BLOCK != styleDisplay->mDisplay) ? NS_BLOCK_SHRINK_WRAP : 0;
|
||||
PRUint32 flags = (NS_STYLE_DISPLAY_BLOCK != styleDisplay->mDisplay) ? NS_BLOCK_SHRINK_WRAP : 0;
|
||||
|
||||
// add in the parent state (we need it to be inherited)
|
||||
PRUint32 parentState;
|
||||
GetFrameState( &parentState );
|
||||
flags |= parentState;
|
||||
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
aPresContext->GetShell(getter_AddRefs(shell));
|
||||
|
@ -89,7 +89,7 @@ protected:
|
||||
};
|
||||
|
||||
nsresult
|
||||
NS_NewFieldSetFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame)
|
||||
NS_NewFieldSetFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame, PRUint32 aStateFlags )
|
||||
{
|
||||
NS_PRECONDITION(aNewFrame, "null OUT ptr");
|
||||
if (nsnull == aNewFrame) {
|
||||
@ -99,6 +99,10 @@ NS_NewFieldSetFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame)
|
||||
if (!it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
// set the state flags (if any are provided)
|
||||
it->SetFrameState( aStateFlags );
|
||||
|
||||
*aNewFrame = it;
|
||||
return NS_OK;
|
||||
}
|
||||
@ -163,7 +167,12 @@ nsFieldSetFrame::SetInitialChildList(nsIPresContext* aPresContext,
|
||||
const nsStyleDisplay* styleDisplay;
|
||||
GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&) styleDisplay);
|
||||
|
||||
PRUint8 flags = (NS_STYLE_DISPLAY_BLOCK != styleDisplay->mDisplay) ? NS_BLOCK_SHRINK_WRAP : 0;
|
||||
PRUint32 flags = (NS_STYLE_DISPLAY_BLOCK != styleDisplay->mDisplay) ? NS_BLOCK_SHRINK_WRAP : 0;
|
||||
|
||||
// add in the parent state (we need it to be inherited)
|
||||
PRUint32 parentState;
|
||||
GetFrameState( &parentState );
|
||||
flags |= parentState;
|
||||
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
aPresContext->GetShell(getter_AddRefs(shell));
|
||||
|
Loading…
Reference in New Issue
Block a user