Backed out changeset fcecc33ac7a3 (bug 1854744) for causing multiple assertion failures in ServoStyleSet.cpp CLOSED TREE

This commit is contained in:
Cristian Tuns 2023-09-22 22:37:45 -04:00
parent 5b6a9d9745
commit 84f0fa9033
2 changed files with 8 additions and 15 deletions

View File

@ -7343,18 +7343,17 @@ void Document::AddStyleSheetToStyleSets(StyleSheet& aSheet) {
void Document::RecordShadowStyleChange(ShadowRoot& aShadowRoot) {
mStyleSet->RecordShadowStyleChange(aShadowRoot);
ApplicableStylesChanged(/* aKnownInShadowTree= */ true);
ApplicableStylesChanged();
}
void Document::ApplicableStylesChanged(bool aKnownInShadowTree) {
void Document::ApplicableStylesChanged() {
// TODO(emilio): if we decide to resolve style in display: none iframes, then
// we need to always track style changes and remove the mStyleSetFilled.
if (!mStyleSetFilled) {
return;
}
if (!aKnownInShadowTree) {
MarkUserFontSetDirty();
}
MarkUserFontSetDirty();
PresShell* ps = GetPresShell();
if (!ps) {
return;
@ -7366,11 +7365,9 @@ void Document::ApplicableStylesChanged(bool aKnownInShadowTree) {
return;
}
if (!aKnownInShadowTree) {
pc->MarkCounterStylesDirty();
pc->MarkFontFeatureValuesDirty();
pc->MarkFontPaletteValuesDirty();
}
pc->MarkCounterStylesDirty();
pc->MarkFontFeatureValuesDirty();
pc->MarkFontPaletteValuesDirty();
pc->RestyleManager()->NextRestyleIsForCSSRuleChanges();
}

View File

@ -1646,11 +1646,7 @@ class Document : public nsINode,
// Needs to be called any time the applicable style can has changed, in order
// to schedule a style flush and setup all the relevant state.
//
// If we know the stylesheet change applies only to a shadow tree we can avoid
// some work (like updating the font-face-set / counter-styles / etc, as those
// are global).
void ApplicableStylesChanged(bool aKnownInShadowTree = false);
void ApplicableStylesChanged();
// Whether we filled the style set with any style sheet. Only meant to be used
// from DocumentOrShadowRoot::Traverse.