1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_css_StylePreloadKind_h
8 #define mozilla_css_StylePreloadKind_h
12 namespace mozilla::css
{
14 enum class StylePreloadKind
: uint8_t {
17 // An speculative load from the parser for a <link rel="stylesheet"> or
18 // @import stylesheet.
20 // A preload (speculative or not) for a <link rel="preload" as="style">
22 FromLinkRelPreloadElement
,
23 // A preload for a "Link" rel=preload response header.
24 FromLinkRelPreloadHeader
,
27 inline bool IsLinkRelPreload(StylePreloadKind aKind
) {
28 return aKind
== StylePreloadKind::FromLinkRelPreloadElement
||
29 aKind
== StylePreloadKind::FromLinkRelPreloadHeader
;
32 } // namespace mozilla::css
34 #endif // mozilla_css_StylePreloadKind_h