Bug 1328319 part 9 - Don't clean up retired counter styles for stylo. r=heycam
authorXidorn Quan <me@upsuper.org>
Mon, 15 May 2017 22:18:49 +1000
changeset 358587 d62b198312ecd96b3ea4fc1d5cb7f697e88e7e4e
parent 358586 d314bdf838bc0bdf10c3326edadae78194bf85d0
child 358588 9fa32a431bc836d8133ba9be51ce83c8d5c937c2
push id90353
push userryanvm@gmail.com
push dateWed, 17 May 2017 00:10:47 +0000
treeherdermozilla-inbound@41958333867b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1328319
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
@@ -2306,18 +2306,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()
 {