This also changes their ToCss impl to use SequenceWriter instead of
checking has_value manually.
SpecifiedValueInfo for those types are also implemented in this patch.
Bug: 1434130
Reviewed-by: emilio
MozReview-Commit-ID: 23h2VWS417H
This is the basic structure of the stuff. Following patches will fill
the gap between Gecko and Servo on value generating, and finally hook
it into InspectorUtils.
Bug: 1434130
Reviewed-by: emilio
MozReview-Commit-ID: KNLAfFBiY6e
System font keywords are not a valid value for those properties.
The newly-added #[css(skip)] would be reused by deriving algorithm of
SpecifiedValueInfo to skip them as well.
Bug: 1434130
Reviewed-by: emilio
MozReview-Commit-ID: EmnhkaA9RR5
Shipped since Firefox 48, other browsers have similar impls, and the related
spec has been in CR since a while ago.
The syntax of this property as implemented should be considered to be pretty
stable, so we can remove this pref.
Bug: 1417761
Reviewed-by: xidorn
MozReview-Commit-ID: H7lDsdbUamD
The only difference in the final result is "all" shorthand, for which
the original result is wrong because "all" shorthand doesn't accept any
value other than the CSS-wide keywords.
Bug: 1455576
Reviewed-by: emilio
MozReview-Commit-ID: BmT7kGwC0ZQ
Most of types just derive it using proc_macro directly. Some of value
types need manual impl.
In my current plan, this new trait will be used in bug 1434130 to expose
values as well.
Bug: 1455576
Reviewed-by: emilio
MozReview-Commit-ID: LI7fy45VkRw
I didn't bother not shifting there. We need to load the whole thing and shift
for at least one of cascade level / shadow cascade order.
Callers of level() other than for_rule_tree are non-existent in release builds,
so we'd be doing the shift anyway. I can implement the same thing for
shadow_cascade_order too, but I don't think that optimization is measurable in
any way, either, the compiler should make the decision.
And just in case, the simpler version actually generated less instructions in:
https://play.rust-lang.org/?gist=ceadb0d3cbce4eeca76e4d9ab9a1c744&version=nightly
with the simple thing.
Bug: 1455032
Reviewed-by: heycam
MozReview-Commit-ID: 8xPBJmlcyKh
If I had to write that again I would've killed myself :).
This is still not perfect, and the system font code is still quite a mess, but
well, little steps.
Bug: 1455358
Reviewed-by: xidorn
MozReview-Commit-ID: BmrZlCSejo7
These won't "just work", pending changes from bug 1436048 to use a floating
point representation for those.
Bug: 1454883
Reviewed-by: xidorn
MozReview-Commit-ID: Bi5iTdFreMA
No cleaner ideas right now that carrying that counter around... Maybe a custom
type may be cleaner?
This makes ApplicableDeclarationBlock a bit bigger. I could probably try to make
the counter a 4 / 5-bit number or something and pack the counter there in the
SourceOrderAndCascadeLevel somehow...
But doesn't seem really worth the churn, and can be done as a followup in any
case. Let me know if you want to block on that.
Bug: 1454162
Reviewed-by: heycam
MozReview-Commit-ID: 1LdW9S4xA6f
Note that we also drop the dead optional aReusableSheets argument from
the async parsing path, since it was always null.
Bug: 1346988
Reviewed-by: bz,emilio
MozReview-Commit-ID: KddpGFdaqEe
This will allow the Rust code hold a copy-free strong reference to the string
past callstack unwind.
Bug: 1454460
Reviewed-by: bz
MozReview-Commit-ID: HCop9h2abZU