Bug 1328319 part 9 - Don't clean up retired counter styles for stylo. r?heycam draft
authorXidorn Quan <me@upsuper.org>
Mon, 15 May 2017 22:18:49 +1000
changeset 578533 13bc6f650a6dfbd4f4fb9ea3db469f5a8cdeea71
parent 578532 fbc85b7008e16074448166cf7f65781273b6ebb5
child 578534 3c3fe5236d1217dfc7c409fcc4571ed0afb001ff
push id58946
push userxquan@mozilla.com
push dateTue, 16 May 2017 04:45:08 +0000
reviewersheycam
bugs1328319
milestone55.0a1
Bug 1328319 part 9 - Don't clean up retired counter styles for stylo. r?heycam MozReview-Commit-ID: JWBhNvtYGIB
layout/base/nsPresContext.cpp
--- 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()
 {