Commit graph

9 commits

Author SHA1 Message Date
Boris Chiou
c3a3bd48d7 style: Support css use counters for unimplemented properties.
For developing properties, we will handle them in an other bug.

Besides, I use an iframe for the test because we create a use counter in
the constructor of Document, which use the prefs to decide what kind of
properties we want to record. So, in the test, we have to reload iframe
to make sure we re-create the document, so does the use counter, to make
sure the prefs work properly.

The two prefs affect the css use counters:
1. layout.css.use-counters.enabled: Allocate use counters, and record
   non-custom properties.
2. layout.css.use-counters-unimplemented.enabled: Record all unimplmented
   properties into the use counters.

If we disable layout.css.use-counters.enblaed, we don't create use counters
object, so layout.css.use-counters-unimplemented.enabled doesn't work,
either.

Differential Revision: https://phabricator.services.mozilla.com/D43860
2019-09-12 22:34:16 +02:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
Simon Sapin
b1822a39fa cargo fix --edition --features gecko 2018-11-10 17:47:28 +01:00
Simon Sapin
a15d33a10e cargo fix --edition 2018-11-10 17:47:28 +01:00
chansuke
8dab4d659a
Format style component. 2018-09-09 16:24:45 +02:00
Emilio Cobos Álvarez
86b4b70369
style: Make the counters non-atomic counters and merge afterwards.
This was consistently faster in the benchmark (even when counters were disabled,
which was slightly suspicious, but...).

Anyway, it's not really much code, most of it is FFI copy-pasta.

Differential Revision: https://phabricator.services.mozilla.com/D3874
2018-09-03 12:31:48 +02:00
Emilio Cobos Álvarez
4f04988c13
style: Add a test for the use counters.
Mostly testing that they work, and that they record what we expect them to
record, that is, the actual property that was parsed, and not the properties
that it'd resolve or expand to.

That may be another tricky part for CSSOM, I think style setters would fail an
alias test if implemented with the current setup (we do the property lookup in
C++).

Differential Revision: https://phabricator.services.mozilla.com/D3829
2018-09-03 12:31:41 +02:00
Emilio Cobos Álvarez
89b8f30737
style: Hook the use counters into StyleSheet parsing.
Still not hooked into telemetry, I talked with :janerik and :gfritzsche about
that, but test incoming!

This intentionally doesn't handle CSSOM and such for now, will file followups
for those, though should be trivial.

I want to unify / clean up how we do the use counters and the error reporting
stuff for CSSOM, since the current function call still shows up in profiles,
but that should be a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D3828
2018-09-03 12:31:33 +02:00
Emilio Cobos Álvarez
c8e5b7f1b0
style: Add a very simple use counter implementation.
As simple as I could make it, for now. We can improve on this.

Differential Revision: https://phabricator.services.mozilla.com/D3827
2018-09-03 12:31:23 +02:00