Bug 1594449 - followup: fix some CSS loader comments. r=mayhemer

Relatedly: We only use this to determine priority. It seems we prioritize
<link rel=preload> over <link rel=stylesheet>, is that intended?

That seems a bit weird, as the preloads from the parser are likely to be used
very soon.

Differential Revision: https://phabricator.services.mozilla.com/D55225

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Emilio Cobos Álvarez 2019-11-29 12:55:51 +00:00
Родитель 1bd91d2d68
Коммит 231400e386
1 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -205,12 +205,15 @@ class Loader final {
nsIURI*, SheetParsingMode = eAuthorSheetFeatures,
UseSystemPrincipal = UseSystemPrincipal::No);
/**
* Yes: this is a speculative load initiated by a <script> tag
* Link: this is a speculative load as well, but initiated by <link
* rel="preload" as="style"> tag
*/
enum class IsPreload { No, FromParser, FromLink };
enum class IsPreload {
No,
// This is a speculative load initiated by a <link rel=stylesheet> tag
// scanned by the parser, or @import rules found in a <style> tag.
FromParser,
// This is a speculative load as well, but initiated by
// <link rel="preload" as="style">
FromLink,
};
/**
* Asynchronously load the stylesheet at aURL. If a successful result is