It's worth to serialize the timing function from web animation api with
servo, too. However, we need an FFI to do that, so this patch also add a
new FFI.
Depends on D10443
Differential Revision: https://phabricator.services.mozilla.com/D10444
--HG--
extra : moz-landing-system : lando
This fixes the issue that we should no longer be looking for control characters.
MozReview-Commit-ID: 8k89Aheq3NY
Differential Revision: https://phabricator.services.mozilla.com/D8876
--HG--
extra : moz-landing-system : lando
I had to fix the conversion for BackgroundSize too, hopefully we can
simplify all this using cbindgen in the future instead of CalcValue.
Differential Revision: https://phabricator.services.mozilla.com/D7580
--HG--
extra : moz-landing-system : lando
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
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
Define OffsetPath & SVGPathData on the servo-side, and StyleMotion &
StyleSVGPath on the gecko-side. We parse the SVG Path string into a
vector of PathCommand. To build the gfx::Path, we will convert it into
gfx::Path later in a different patch.
The basic flow is:
* Parse SVG Path String into SVGPathData (in Rust).
* Use cbindgen to make sure the layout of PathCommand and StylePathCommand,
and then set the Box[PathCommand] into nsTArray<StylePathCommand>.
* Try to convert nsTArray<StylePathCommand> into gfx::Path. (This part
will be implemented in a different patch.)
Finally, we use the gfx::Path to create a motion path transform.
The layout implementation is in the later patch.
Differential Revision: https://phabricator.services.mozilla.com/D2963
This moves most of the code to be Rust, except potentially some evaluator
functions, and allows to unblock the use case from any-hover / any-pointer and
remove nsMediaFeatures.
Differential Revision: https://phabricator.services.mozilla.com/D2976
We force a repaint from ContentStateChangedInternal if visited links are
disabled, and that's observable. Let's cut it off as early as we can to avoid
timing attacks even when :visited is disabled.
Differential Revision: https://phabricator.services.mozilla.com/D3304
This introduces the machinery needed to generate crash annotations from a YAML
file. The relevant C++ functions are updated to take a typed enum. JavaScript
calls are unaffected but they will throw if the string argument does not
correspond to one of the known entries in the C++ enum. The existing whitelists
and blacklists of annotations are also generated from the YAML file and all
duplicate code related to them has been consolidated. Once written out to the
.extra file the annotations are converted in string form and are no different
than the existing ones.
All existing annotations have been included in the list (and some obsolete ones
have been removed) and all call sites have been updated including tests where
appropriate.
--HG--
extra : source : 4f6c43f2830701ec5552e08e3f1b06fe6d045860
And general Element logging. We now print all the attributes for comparison.
If this turns out to be too verbose we can change it to diff them or something.
Differential Revision: https://phabricator.services.mozilla.com/D2471
MozReview-Commit-ID: 1Gl9AumdnvZ
Most of it is automated by:
%s/eStyleContentType_/StyleContentType::/g
%s/nsStyleContentType/StyleContentType/g
But I removed some parentheses by hand.
Differential Revision: https://phabricator.services.mozilla.com/D1900
MozReview-Commit-ID: 3IcirjIYX5p
The EffectSet count does not exactly represent the count what we really need
for AnimationValueMap, but in most cases it matches. For example;
1) The element has two different keyframes animations
@keyframes anim1 {
to { opacity: 0; }
}
@keyframes anim2 {
to { transform: rotate(360deg); }
}
In this case the number matches.
2) The element has two animations but both keyframes have the same CSS property
@keyframes anim1 {
to { opacity: 0; }
}
@keyframes anim2 {
to { opacity: 0.1; }
}
In this case the number doesn't match, moreover it results more memory than we
ever needed, but this case is presumably less common.
3) The element has an animation having keyframes for two different CSS
properties.
@keyframes anim {
from { opacity: 0; transform: rotate(360deg); }
}
In this kind of cases, the number doesn't match. But even so, this patch
reduces the opportunities that the AnimationValueMap tries to allocate a new
memory (i.e. less opportunities on expanding the map).
Note that when the hash map is expanded, we do allocate a new RawTable with the
new size then replace the old one with the new one [1], so I believe this
change will reduce the crash rate to some extent.
[1] https://hg.mozilla.org/mozilla-central/file/15c95df467be/servo/components/hashglobe/src/hash_map.rs#l734
MozReview-Commit-ID: 6tcF9aqXh7a
--HG--
extra : rebase_source : 366989d3a2756f5a5711503a57f42f3b746d93a5
And use the C++ ErrorReporter only to actually output errors.
ErrorReporter was so complicated because well, it was always enabled and had to
do a bunch of caching to not be (more) slow.
But since bug 1452143 it's disabled by default, so we can simplify this setup a
lot.
Also while at it make the error reporting pref a static pref so that we don't
mutate globals from CSS parsing unless we're actually reporting errors.
MozReview-Commit-ID: AuIyvJwt7AU
Pretty much the same setup we have for document.
We have the awkwardness of having to check containing shadow manually for
ShadowRoot because it's not available in TNode (and making it available added a
bit more complexity that wasn't worth it IMO).
MozReview-Commit-ID: CqOh0sLHf6o
Pretty much the same setup we have for document.
We have the awkwardness of having to check containing shadow manually for
ShadowRoot because it's not available in TNode (and making it available added a
bit more complexity that wasn't worth it IMO).
MozReview-Commit-ID: CqOh0sLHf6o
For doing this, ServoComputedData is split into separate files, so that
files don't need to include ServoBindings.h just for accessing style
structs from ComputedStyles.
MozReview-Commit-ID: DPAd7PUUCl9
--HG--
extra : rebase_source : 7d6f739b7fb58a46e1624ba62e717412057ea9c1