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

MozReview-Commit-ID: JHzH6oqyu0K
This commit is contained in:
Manish Goregaokar
2017-06-14 19:40:20 -07:00
parent 9c99f5f813
commit 83fd3680d0

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(),