diff --git a/layout/style/ServoStyleSet.cpp b/layout/style/ServoStyleSet.cpp index 2db96d969c94..3993d06e4026 100644 --- a/layout/style/ServoStyleSet.cpp +++ b/layout/style/ServoStyleSet.cpp @@ -1330,11 +1330,6 @@ ServoStyleSet::UpdateStylist() mBindingManager->UpdateBoundContentBindingsForServo(mPresContext); } - // We need to invalidate cached style in getComputedStyle for undisplayed - // elements, since we don't know if any of the style sheet change that we - // do would affect undisplayed elements. - mPresContext->RestyleManager()->AsServo()->IncrementUndisplayedRestyleGeneration(); - mStylistState = StylistState::NotDirty; } diff --git a/layout/style/test/test_computed_style.html b/layout/style/test/test_computed_style.html index 37f0aa3c733c..b1d37df75ce0 100644 --- a/layout/style/test/test_computed_style.html +++ b/layout/style/test/test_computed_style.html @@ -4,12 +4,12 @@