зеркало из https://github.com/mozilla/pjs.git
bug 1809, 0 width tables (not trees) become auto, r=dcone, (hyatt)
This commit is contained in:
Родитель
683969b2f1
Коммит
c3d9e36783
|
@ -137,18 +137,10 @@ nsresult nsTableOuterFrame::QueryInterface(const nsIID& aIID, void** aInstancePt
|
|||
}
|
||||
}
|
||||
|
||||
// tables change 0 width into auto, trees override this and do nothing
|
||||
NS_IMETHODIMP
|
||||
nsTableOuterFrame::Init(nsIPresContext* aPresContext,
|
||||
nsIContent* aContent,
|
||||
nsIFrame* aParent,
|
||||
nsIStyleContext* aContext,
|
||||
nsIFrame* aPrevInFlow)
|
||||
nsTableOuterFrame::AdjustZeroWidth()
|
||||
{
|
||||
nsresult rv = nsHTMLContainerFrame::Init(aPresContext, aContent, aParent,
|
||||
aContext, aPrevInFlow);
|
||||
if (NS_FAILED(rv) || !mStyleContext) return rv;
|
||||
|
||||
#if 0
|
||||
// a 0 width table becomes auto
|
||||
PRBool makeAuto = PR_FALSE;
|
||||
nsStylePosition* position = (nsStylePosition*)mStyleContext->GetMutableStyleData(eStyleStruct_Position);
|
||||
|
@ -166,7 +158,21 @@ nsTableOuterFrame::Init(nsIPresContext* aPresContext,
|
|||
if (makeAuto) {
|
||||
position->mWidth = nsStyleCoord(eStyleUnit_Auto);
|
||||
}
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTableOuterFrame::Init(nsIPresContext* aPresContext,
|
||||
nsIContent* aContent,
|
||||
nsIFrame* aParent,
|
||||
nsIStyleContext* aContext,
|
||||
nsIFrame* aPrevInFlow)
|
||||
{
|
||||
nsresult rv = nsHTMLContainerFrame::Init(aPresContext, aContent, aParent,
|
||||
aContext, aPrevInFlow);
|
||||
if (NS_FAILED(rv) || !mStyleContext) return rv;
|
||||
AdjustZeroWidth();
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
|
@ -69,6 +69,8 @@ public:
|
|||
nsIStyleContext* aContext,
|
||||
nsIFrame* aPrevInFlow);
|
||||
|
||||
NS_IMETHOD AdjustZeroWidth();
|
||||
|
||||
/** @see nsIFrame::SetInitialChildList */
|
||||
NS_IMETHOD SetInitialChildList(nsIPresContext* aPresContext,
|
||||
nsIAtom* aListName,
|
||||
|
|
|
@ -137,18 +137,10 @@ nsresult nsTableOuterFrame::QueryInterface(const nsIID& aIID, void** aInstancePt
|
|||
}
|
||||
}
|
||||
|
||||
// tables change 0 width into auto, trees override this and do nothing
|
||||
NS_IMETHODIMP
|
||||
nsTableOuterFrame::Init(nsIPresContext* aPresContext,
|
||||
nsIContent* aContent,
|
||||
nsIFrame* aParent,
|
||||
nsIStyleContext* aContext,
|
||||
nsIFrame* aPrevInFlow)
|
||||
nsTableOuterFrame::AdjustZeroWidth()
|
||||
{
|
||||
nsresult rv = nsHTMLContainerFrame::Init(aPresContext, aContent, aParent,
|
||||
aContext, aPrevInFlow);
|
||||
if (NS_FAILED(rv) || !mStyleContext) return rv;
|
||||
|
||||
#if 0
|
||||
// a 0 width table becomes auto
|
||||
PRBool makeAuto = PR_FALSE;
|
||||
nsStylePosition* position = (nsStylePosition*)mStyleContext->GetMutableStyleData(eStyleStruct_Position);
|
||||
|
@ -166,7 +158,21 @@ nsTableOuterFrame::Init(nsIPresContext* aPresContext,
|
|||
if (makeAuto) {
|
||||
position->mWidth = nsStyleCoord(eStyleUnit_Auto);
|
||||
}
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTableOuterFrame::Init(nsIPresContext* aPresContext,
|
||||
nsIContent* aContent,
|
||||
nsIFrame* aParent,
|
||||
nsIStyleContext* aContext,
|
||||
nsIFrame* aPrevInFlow)
|
||||
{
|
||||
nsresult rv = nsHTMLContainerFrame::Init(aPresContext, aContent, aParent,
|
||||
aContext, aPrevInFlow);
|
||||
if (NS_FAILED(rv) || !mStyleContext) return rv;
|
||||
AdjustZeroWidth();
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
|
@ -69,6 +69,8 @@ public:
|
|||
nsIStyleContext* aContext,
|
||||
nsIFrame* aPrevInFlow);
|
||||
|
||||
NS_IMETHOD AdjustZeroWidth();
|
||||
|
||||
/** @see nsIFrame::SetInitialChildList */
|
||||
NS_IMETHOD SetInitialChildList(nsIPresContext* aPresContext,
|
||||
nsIAtom* aListName,
|
||||
|
|
|
@ -80,6 +80,13 @@ nsTreeOuterFrame::Init(nsIPresContext* aPresContext,
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTreeOuterFrame::AdjustZeroWidth()
|
||||
{
|
||||
// don't do anything, tables change 0 width into auto
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTreeOuterFrame::HandleEvent(nsIPresContext* aPresContext,
|
||||
nsGUIEvent* aEvent,
|
||||
|
|
|
@ -45,6 +45,8 @@ public:
|
|||
nsIStyleContext* aContext,
|
||||
nsIFrame* aPrevInFlow);
|
||||
|
||||
NS_IMETHOD AdjustZeroWidth();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD GetBoxInfo(nsIPresContext* aPresContext, const nsHTMLReflowState& aReflowState, nsBoxInfo& aSize);
|
||||
|
|
Загрузка…
Ссылка в новой задаче