Commit graph

18 commits

Author SHA1 Message Date
Nicholas Nethercote
0f7b40e90a Measure ImageValue objects (take 2).
We have about 11,500 of these when loading gmail in a Stylo-enabled build, from
SpecifiedUrls; the objects themselves account for about 1.3 MiB of memory, and
the strings within them about 2.9 MiB.

We also have a very small number of them on the Gecko side.
2017-09-18 15:37:31 +10:00
Matt Brubeck
1c23cacdfb Revert "Measure ImageValue objects."
This reverts commit a185393cee (#18515).
2017-09-15 10:53:26 -07:00
bors-servo
70a6b2fa91 Auto merge of #18516 - jdm:stringshare, r=heycam
Share specified URLs with Gecko

This makes use of our Arc offset machinery to allow Gecko to store Arc<String> values and ensure there are used appropriately.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix [bug 1397971](https://bugzilla.mozilla.org/show_bug.cgi?id=1397971).

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18516)
<!-- Reviewable:end -->
2017-09-15 04:05:20 -05:00
Josh Matthews
1a57bad2a1 Add Rust APIs for interacting with Arc<String> (bug 1397971). 2017-09-15 02:39:09 -04:00
Nicholas Nethercote
a185393cee Measure ImageValue objects.
We have about 11,500 of these when loading gmail in a Stylo-enabled build, from
SpecifiedUrls; the objects themselves account for about 1.3 MiB of memory, and
the strings within them about 2.9 MiB.

We also have a very small number of them on the Gecko side.
2017-09-15 09:43:35 +10:00
Nicholas Nethercote
c5aa2cb986 Measure PropertyDeclaration more thoroughly.
This patch replaces the handwritten MallocSizeOf implementation for
PropertyDeclaration with a derived one, which gives much more thorough
measurement.

This requires (a) deriving MallocSizeOf for a *lot* of additional types (most
of which already have `derive(HeapSizeOf)` in Servo builds), and (b)
implementing MallocSizeOf for a few more types in the `malloc_size_of` crate.

These changes would significantly improve the reporting coverage for gmail if
it weren't for the fact that SpecifiedUrl isn't measured due to a lack of
clarity about its fields; that can be fixed as a follow-up once bug 1397971 has
landed.
2017-09-14 13:18:03 +10:00
Anthony Ramine
3fb52a0ef9 Do not use CVAS for gecko::SpecifiedUrl 2017-09-11 18:41:22 +02:00
Michael Partheil
b07ebbae6b Replace all uses of the style::stylearc alias with servo_arc.
The alias is left there temporarilly and will be removed completely in a later commit where
also components/style/gecko/generated/structs_{debug|release}.rs are re-generated (they still
use the old alias).
2017-07-19 09:29:05 +02:00
Daisuke Akatsuka
d8dcc52c9a implements nsStyleImageRequest type properties animatable 2017-07-05 13:11:58 +09:00
Mantaroh Yoshinaga
0ca9a01be4 Add function which convert from URLValueData to SpecifiedUrl.
We will need to convert from URLValueData to SpecifiedUrl when cloning the
stylo's data from gecko's data. Because the filter structure on gecko has url as
URLValue type. We will use this convert function when interpolating as
discrete also(Bug 1368610).
2017-06-19 09:47:26 +09:00
Anthony Ramine
3217d1404e Derive ToCss for font-face sources 2017-06-17 13:46:30 +02:00
Simon Sapin
b83afdedc8 Upgrade cssparser to 0.15 2017-06-16 15:05:46 +02:00
Josh Matthews
27ae1ef2e7 Thread ParseError return values through CSS parsing. 2017-06-09 16:46:25 -04:00
cku
2fe55e82d3 Stylo: Let SpecifiedUrl be able to carry ImageValue. 2017-05-16 01:42:30 +08:00
Bobby Holley
d78ca4c4f9 Use StyleArc in the style system.
MozReview-Commit-ID: flF0fv9E9M
2017-05-02 17:35:44 -07:00
Xidorn Quan
37585309e9 Use a UrlExtraData type alias to unify url handling logic. 2017-04-03 21:57:16 +10:00
Xidorn Quan
0a97a0df0c Create URLExtraData for holding base uri, referrer, and principal. 2017-04-03 14:30:33 +10:00
Bobby Holley
63e8367eee Don't resolve URLs at parse time for Stylo.
It's a bit unfortunate the use separate implementations of SpecifiedUrl for Servo
and Gecko, but they're different enough at this point that I don't think it really
makes sense to try to share everything. Splitting them out has some nice
simplifications as well.

I recognize that there's still some potential correctness issues for Servo using
the resolved URI in various places where the original URI may be the right thing,
but I've got too much on my plate to look into that for now.

MozReview-Commit-ID: BeDu93TQ4Ow
2017-03-22 19:11:30 -07:00