зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1847933 - Fix indeterminate radio button rendering on macOS' native theme. r=mac-reviewers,bradwerth
This fixes a regression introduced in: https://hg.mozilla.org/mozilla-central/rev/5cc085b16d94f258f011bbacbb52862ba1559465#l1.138 <input type=checkbox> can match :indeterminate but that was getting rendered as checked incorrectly by the native theme. Reintroduce the relevant check. Differential Revision: https://phabricator.services.mozilla.com/D186011
This commit is contained in:
Родитель
4967566700
Коммит
9ec8ad454f
|
@ -2221,11 +2221,11 @@ Maybe<nsNativeThemeCocoa::WidgetInfo> nsNativeThemeCocoa::ComputeWidgetInfo(
|
|||
|
||||
case StyleAppearance::Checkbox:
|
||||
case StyleAppearance::Radio: {
|
||||
bool isCheckbox = (aAppearance == StyleAppearance::Checkbox);
|
||||
bool isCheckbox = aAppearance == StyleAppearance::Checkbox;
|
||||
|
||||
CheckboxOrRadioParams params;
|
||||
params.state = CheckboxOrRadioState::eOff;
|
||||
if (elementState.HasState(ElementState::INDETERMINATE)) {
|
||||
if (isCheckbox && elementState.HasState(ElementState::INDETERMINATE)) {
|
||||
params.state = CheckboxOrRadioState::eIndeterminate;
|
||||
} else if (elementState.HasState(ElementState::CHECKED)) {
|
||||
params.state = CheckboxOrRadioState::eOn;
|
||||
|
|
Загрузка…
Ссылка в новой задаче