Bug 1328319 part 9 - Don't clean up retired counter styles for stylo. r?heycam
MozReview-Commit-ID: JWBhNvtYGIB
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -2317,18 +2317,24 @@ nsPresContext::FlushCounterStyles()
}
if (mCounterStylesDirty) {
bool changed = mCounterStyleManager->NotifyRuleChanged();
if (changed) {
PresShell()->NotifyCounterStylesAreDirty();
PostRebuildAllStyleDataEvent(NS_STYLE_HINT_REFLOW,
eRestyle_ForceDescendants);
- RefreshDriver()->AddPostRefreshObserver(
- new CounterStyleCleaner(RefreshDriver(), mCounterStyleManager));
+ if (mShell->StyleSet()->IsGecko()) {
+ RefreshDriver()->AddPostRefreshObserver(
+ new CounterStyleCleaner(RefreshDriver(), mCounterStyleManager));
+ } else {
+ NS_WARNING("stylo: Pseudo-element ::-moz-list-{number,bullet} are not "
+ "restyled properly, so we cannot clean up retired objects. "
+ "See bug 1364871.");
+ }
}
mCounterStylesDirty = false;
}
}
void
nsPresContext::RebuildCounterStyles()
{