mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
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:
parent
582afb3462
commit
8491f45cf8
@ -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(),
|
||||
|
Loading…
Reference in New Issue
Block a user