Commit graph

74 commits

Author SHA1 Message Date
Brad Werth
2b6c494f85 Change StyleSet to track stylesheets by unique ID.
MozReview-Commit-ID: Ky3P53o4Euw
2017-05-02 13:38:13 -07:00
Emilio Cobos Álvarez
4651b94ff0
style: Simplify author_style_disabled handling. 2017-04-19 09:41:37 +02:00
Emilio Cobos Álvarez
97235d0bf7
stylo: Centralize stylesheet handling.
This is needed for both bug 1357461 and bug 1273303, where I plan to add smarter
invalidations than what we have now.

Also, it's cleaner.

Ideally I'll move this onto stylist, though that may require extra work to make
it work fine for Servo, so for now let's just do the obvious thing.
2017-04-19 09:41:36 +02:00
Brad Werth
91a9fb06c7 Add an author_style_disabled flag to stylist.update, and associated structs.
MozReview-Commit-ID: FiXyEN4xVnU
2017-04-14 09:24:20 +08:00
Xidorn Quan
01e986f2e6 Record effective @font-face rules when updating stylist. 2017-03-30 11:41:12 +11:00
Simon Sapin
d5074136e3 Rename ReadGuards to StylesheetGuards 2017-03-19 22:30:42 +01:00
Simon Sapin
aeffca2a59 Replace RwLock<StyleRule> with Locked<StyleRule> 2017-03-19 22:30:37 +01:00
Simon Sapin
d18b1280f2 Move shared lock acquires up the call stack. (Or is it down?) 2017-03-19 22:30:32 +01:00
Emilio Cobos Álvarez
eaf27ccfa0
style: Kill SharedStyleContext::default_computed_values.
Now that cascade() gets a Device, we can use the default computed values from
there to avoid propagating that state all over the place.

Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-03-14 00:49:16 +01:00
Nathan Froyd
fafcdda16a geckolib: move NUM_THREADS from style to geckolib
This change eliminates some gecko-only configuration in the style
component and moves NUM_THREADS closer to its only uses.
2017-02-22 11:35:08 -05:00
Nathan Froyd
3e81f8431e geckolib: use a global thread pool for styling
By having a single thread pool, rather than one per document, we use
less memory.  This addresses
https://bugzilla.mozilla.org/show_bug.cgi?id=1324250.
2017-02-22 11:25:07 -05:00
Emilio Cobos Álvarez
d29fade4c2
Bug 1332969: stylo: Synchronously do a style update when the device changes.
Ideally this would be lazy, but eventually we're going to need to restyle in
RebuildAllStyleData anyway, which would require us to have the style up to date,
so no need to complicate our lives.

MozReview-Commit-ID: AlmUGRCNm2z
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-23 18:55:45 +01:00
Emilio Cobos Álvarez
5b5243b8af
Bug 1331213: Bootstrap a Gecko-side Device, and track it's dirtiness manually in the per-doc data. r=heycam
The setup is quite different to Servo-land, so add a comment about the different
setup.

Also, check viewport rules when flushing stylesheets. I believe that the
previous behavior is plain wrong, though I haven't taken the time to come up
with a test case.

In any case, it doesn't hurt any of both back-ends.

MozReview-Commit-ID: 46gtTkesOsr
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 14:05:23 +01:00
Boris Zbarsky
369fdddcd9 Bug 1298588 part 13. Make sure Device has a ComputedValues for stylo. r=bholley 2017-01-04 23:13:52 -05:00
Boris Zbarsky
34bb2f1e6c Bug 1298588 part 3, servo piece. Add a default ComputedValues member to PerDocumentStyleData. r=bholley 2017-01-04 23:13:31 -05:00
Boris Zbarsky
8908743719 Bug 1298588 part 2, servo piece. Pass through an nsPresContext to the PerDocumentStyleData constructor. r=bholley 2017-01-04 14:42:15 -05:00
Emilio Cobos Álvarez
dba73dc618
style: Document Gecko's data module. 2017-01-02 12:58:04 +01:00
Bobby Holley
940cda1d15 Remove generation, remove filter pop, and add size tests. 2016-12-22 11:09:55 -08:00
Emilio Cobos Álvarez
3db6514252
stylo: Track the last restyle generation properly.
I couldn't reproduce locally, but I believe this fixes:

https://bugzilla.mozilla.org/show_bug.cgi?id=1323890
2016-12-17 10:48:45 +01:00
Simon Sapin
08066800cd Rename selector_matching.rs to stylist.rs 2016-11-20 15:29:09 +01:00
Emilio Cobos Álvarez
73917cce83
style: Use rayon instead of our custom work queue. 2016-11-14 21:24:19 +01:00
Xidorn Quan
09cbe3bce0 Make style context use parking_lot::RwLock 2016-11-02 10:10:11 +11:00
Bobby Holley
63ac0d2540 Use AtomicRefCell for RawServoStyleSet.
MozReview-Commit-ID: 27JeRluDAo3
2016-10-11 09:31:52 -07:00
Manish Goregaokar
b2e592b121 Move most of geckolib into style::gecko 2016-09-26 09:07:17 +02:00
Renamed from ports/geckolib/data.rs (Browse further)