(Path is actually r=froydnj.)
Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.
MozReview-Commit-ID: 91U22X2NydP
--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
The change in CounterStyleManager::BuildCounterStyle converts a case-
insensitive comparison to a case-sensitive comparison by comparing atom
pointer directly. But this is fine because all names of builtin counter
styles should have been lowercased by the parser. For Gecko, it is done
in CSSParserImpl::ParseCounterStyleName, and for Servo, it is done in
counter_style::parse_counter_style_name.
MozReview-Commit-ID: JHHmzEaNIpn
--HG--
extra : rebase_source : aa43d45042c3cbd85e925596586a9a2ea51c6e4a
Doing this at compile time would save a bit of our startup time, which
I've promised to do since @counter-style was initially implemented, see
bug 966166 comment 103 (the paragraph with "constexpr").
Also, having this implemented here makes using atom instead of string
on name of builtin counter styles easier, for later patches.
MozReview-Commit-ID: C9HYcuShBQv
--HG--
extra : rebase_source : 273eb3d23ee770722d27b26aafaa291d7375b8ee
All the instances are converted as follows.
- nsSubstring --> nsAString
- nsCSubstring --> nsACString
--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
Although this is not strictly necessary at the moment, static analysis
reports this as a new heap write hazard. Since we would eventually do
this change for symbols() support in Stylo, it is easier to just change
it here than convincing hazard analysis to believe it is harmless.
MozReview-Commit-ID: 7lfyZN6tDnJ
--HG--
extra : rebase_source : e39c6570fc625b319c3568a0b6b1bf5a35cb622f
This change does the following:
* Introduce a new smart pointer called CounterStylePtr which either
holds an AnonymousCounterStyle strongly, or a named CounterStyle
managed by CounterStyleManager weakly, and use it to replace all
RefPtr<CounterStyle> around the codebase.
* Rename CounterStyleManager::mCacheTable to mStyles to reflect the
fact that it is used to manage all styles, not just for caching.
* Add a retired styles list which collect all named CounterStyle
evicted from mStyles, and post a PostRefreshObserver to destroy
objects in that list after next flush.
* Remove helper functions for counter style in nsStyleList and expose
mCounterStyle directly, to make code simpler with the new pointer.
Reason for adding a new smart pointer type rather than making their
AddRef/Release behave like BuiltinCounterStyle is that, it is possible
that after a flush, some stale style structs may still be alive. They
can contain pointer to destroyed CounterStyle objects. Although the
actual content may never be accessed anymore, RefPtr may still access
the object for refcounting during destruction.
MozReview-Commit-ID: xxegwSDhNb
--HG--
extra : rebase_source : bb5443f0eb56eee51cbdfd08e0400335648610e8