Bug 1879449 [wpt PR 44489] - [wptrunner] Add `infrastructure/expected-fail/` test...
[gecko.git] / layout / style / StylePreloadKind.h
blob154e9cda6301aca978ef5f79e79003a6d7469108
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
10 #include <stdint.h>
12 namespace mozilla::css {
14 enum class StylePreloadKind : uint8_t {
15 // Not a preload.
16 None,
17 // An speculative load from the parser for a <link rel="stylesheet"> or
18 // @import stylesheet.
19 FromParser,
20 // A preload (speculative or not) for a <link rel="preload" as="style">
21 // element.
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