style: Parse sheets on the thread pool.

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 commit is contained in:
Bobby Holley 2018-02-14 16:39:35 -08:00 committed by Emilio Cobos Álvarez
parent c06e3dcd58
commit dfa019c884
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
5 changed files with 152 additions and 21 deletions

View file

@ -312,3 +312,9 @@ impl_threadsafe_refcount!(
Gecko_AddRefSharedFontListArbitraryThread,
Gecko_ReleaseSharedFontListArbitraryThread
);
impl_threadsafe_refcount!(
::gecko_bindings::structs::SheetLoadDataHolder,
Gecko_AddRefSheetLoadDataHolderArbitraryThread,
Gecko_ReleaseSheetLoadDataHolderArbitraryThread
);

View file

@ -171,10 +171,9 @@ pub struct ImportRule {
/// The `<url>` this `@import` rule is loading.
pub url: CssUrl,
/// The stylesheet is always present.
///
/// It contains an empty list of rules and namespace set that is updated
/// when it loads.
/// The stylesheet is always present. However, in the case of gecko async
/// parsing, we don't actually have a Gecko sheet at first, and so the
/// ImportSheet just has stub behavior until it appears.
pub stylesheet: ImportSheet,
/// The line and column of the rule's source code.