Bug 1389029 - Undo code changes in
Bug 1388234 which is unnecessary now that we post restyle events for rowspan/colspan changes.
MozReview-Commit-ID: 5eTW5dCcxzP
This patch reverts the code changes, but not the test changes from changeset bf9cf6f393eb. There is a crashtest here which is valuable to keep.
--- a/layout/style/ServoStyleSet.cpp
+++ b/layout/style/ServoStyleSet.cpp
@@ -529,30 +529,27 @@ ServoStyleSet::ResolveStyleLazily(Elemen
}
already_AddRefed<ServoStyleContext>
ServoStyleSet::ResolveInheritingAnonymousBoxStyle(nsIAtom* aPseudoTag,
ServoStyleContext* aParentContext)
{
MOZ_ASSERT(nsCSSAnonBoxes::IsAnonBox(aPseudoTag) &&
!nsCSSAnonBoxes::IsNonInheritingAnonBox(aPseudoTag));
+ MOZ_ASSERT_IF(aParentContext, !StylistNeedsUpdate());
+
+ UpdateStylistIfNeeded();
+
RefPtr<ServoStyleContext> style = nullptr;
if (aParentContext) {
style = aParentContext->GetCachedInheritingAnonBoxStyle(aPseudoTag);
}
if (!style) {
- // People like to call into here from random attribute notifications (see
- // bug 1388234, and bug 1389029).
- //
- // We may get a wrong cached style if the stylist needs an update, but we'll
- // have a whole restyle scheduled anyway.
- UpdateStylistIfNeeded();
-
style =
Servo_ComputedValues_GetForAnonymousBox(aParentContext,
aPseudoTag,
mRawSet.get()).Consume();
MOZ_ASSERT(style);
if (aParentContext) {
aParentContext->SetCachedInheritedAnonBoxStyle(aPseudoTag, style);
}