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

git-svn-id: svn://10.0.0.236/trunk@226797 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
joshmoz%gmail.com
2007-05-22 19:42:01 +00:00
parent 2f4adadc96
commit c36c8cb71d

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)
{