Bug 1372812 - stylo: Make nsListControlFrame::AboutToDropDown work in servo mode; r=emilio

MozReview-Commit-ID: JHzH6oqyu0K

--HG--
extra : rebase_source : b40cd4493f4094a85897212ba5e5c897f7e86790
This commit is contained in:
Manish Goregaokar 2017-06-14 19:40:20 -07:00
parent 582afb3462
commit 8491f45cf8

View File

@ -1465,13 +1465,14 @@ nsListControlFrame::AboutToDropDown()
// which is always opaque, in case we don't end up with an opaque color.
// This gives us a very poor approximation of translucency.
nsIFrame* comboboxFrame = do_QueryFrame(mComboboxFrame);
nsStyleContext* context = comboboxFrame->StyleContext()->GetParent();
nsIFrame* ancestor = comboboxFrame->GetParent();
mLastDropdownBackstopColor = NS_RGBA(0,0,0,0);
while (NS_GET_A(mLastDropdownBackstopColor) < 255 && context) {
while (NS_GET_A(mLastDropdownBackstopColor) < 255 && ancestor) {
nsStyleContext* context = ancestor->StyleContext();
mLastDropdownBackstopColor =
NS_ComposeColors(context->StyleBackground()->BackgroundColor(context),
mLastDropdownBackstopColor);
context = context->GetParent();
ancestor = ancestor->GetParent();
}
mLastDropdownBackstopColor =
NS_ComposeColors(PresContext()->DefaultBackgroundColor(),