Don't paint the background for the text frame in comboboxes if the combobox is themed. b=381268 r/sr=roc

This commit is contained in:
joshmoz@gmail.com 2007-05-22 12:42:01 -07:00
parent 0a6d3668cd
commit 609f3449c8

View File

@ -1078,6 +1078,10 @@ public:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
protected:
nsComboboxControlFrame* mComboBox;
};
@ -1111,6 +1115,26 @@ nsComboboxDisplayFrame::Reflow(nsPresContext* aPresContext,
return nsBlockFrame::Reflow(aPresContext, aDesiredSize, state, aStatus);
}
NS_IMETHODIMP
nsComboboxDisplayFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
nsDisplayListCollection set;
nsresult rv = nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, set);
if (NS_FAILED(rv))
return rv;
// remove background items if parent frame is themed
if (mComboBox->IsThemed()) {
set.BorderBackground()->DeleteAll();
}
set.MoveTo(aLists);
return NS_OK;
}
nsIFrame*
nsComboboxControlFrame::CreateFrameFor(nsIContent* aContent)
{