The basic idea here is as follows:
* Rule nodes are reference-counted, but releasing them adds them to a linked
list rather than freeing them. This allows for the reuse that motivated the
original GC scheme.
* We get rid of the marking, and instead rely on the reference count.
* Sweeping no longer requires a complicated traversal. We just pop items
off the free list until it's empty. When a child is destroyed, its parent
may go onto the free list.
* We remove special handling for the root node, and use a regular reference-counted
edge from the style set.
* The free list automatically asserts that it's empty (meaning all nodes have been
freed) in its destructor, which runs when the style set is destroyed.
* We get rid of the list of style context roots on the style set. We still need
a count though, because of the HasCachedStyleData check.
This commit only replace windows-style line endings w/ unix-style ones.
"git diff -w" would see no difference in this commit.
--HG--
extra : commitid : 3L1KflCYhR3
This makes "display: -webkit-box" & "display: -webkit-inline-box" into bona
fide "display" values (instead of just aliases), when webkit prefix support is
enabled, and allows us to actually exercise the code added in the earlier
patches on this bug. (Note that when webkit prefix support is *disabled*, our
CSS Unprefixing Service strategy will instead have an opportunity to take
effect, for whitelisted sites, and it'll continue to convert "-webkit-box" to
"flex".)
MozReview-Commit-ID: BV93xs4ddbK
These new enum values are added with same behavior as their modern flexbox
equivalents -- they're hooked up to NS_NewFlexContainerFrame, and they're
listed alongside the modern flexbox enums in 'switch' & 'if' statements.
There's one exception, which I call out with a comment at the end of the patch:
we don't treat -webkit-box the same as flexbox in IsFlexOrGridDisplayType(),
because that method is used to determine whether we should blockify
inline-level children of a flex/grid container, and we don't want to blockify
any children of a -webkit-box. (Instead, we want to wrap them in an anonymous
flex item. That happens in the next patch.)
MozReview-Commit-ID: 9BB4Ib2KpvE
StyleAnimationValue::ComputeValue(s) will automatically look up the style
context of the supplied element. This is mostly fine, but when we start using
this method in scenarios where we are building the initial style context
(as happens later in this patch series) it can easily land us in a situation
where we iterate indefinitely.
It would be better, instead, to just explicitly pass in the style context we
want to use, as we already do for StyleAnimationValue::ExtractComputedValue.
MozReview-Commit-ID: ZoVBlBRRBI
--HG--
extra : rebase_source : 9012cc2e405fc887f070fbfaa2f9853289882862
(We already map "display:-webkit-box" to "display:flex" in this way. This is just extending that existing support to cover the inline version.)
MozReview-Commit-ID: F7gH3QMSmn0
--HG--
extra : rebase_source : f97703f074ccdb5d97ad16c282be4d24c1fb0eff
The css_properties.js rule can be converted into gen-css-properties.py,
which we can install with TEST_HARNESS_FILES instead of the
mochitest.ini manifest.
MozReview-Commit-ID: F7nf71ORWsS
I believe this is useful for cases like having logical properties in the
UA style sheet that are commonly overridden (e.g., margins on lists).
MozReview-Commit-ID: KxojbfMYq0f