Bug 1372812 - stylo: Make nsListControlFrame::AboutToDropDown work in servo mode; r=emilio
MozReview-Commit-ID: JHzH6oqyu0K
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user