Bug 1834002 - Avoid InvalidateFrameSubtree in HTMLInputElement::SetCheckedInternal, r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D187103
This commit is contained in:
Olli Pettay
2023-08-30 23:16:51 +00:00
parent c5ef84674c
commit e4e84c6564

View File

@@ -2986,11 +2986,7 @@ void HTMLInputElement::SetCheckedInternal(bool aChecked, bool aNotify) {
// Set the value
mChecked = aChecked;
// Notify the frame
if (IsRadioOrCheckbox()) {
if (nsIFrame* frame = GetPrimaryFrame()) {
frame->InvalidateFrameSubtree();
}
SetStates(ElementState::CHECKED, aChecked, aNotify);
}