Bug 1526591 - Remove devtools.inspector.shapesHighlighter.enabled pref. r=rcaliman
[gecko.git] / dom / webidl / FontFace.webidl
blob5705f5d8debd9a1e128f5ab5b1e63186d1936dc2
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/.
5  *
6  * The origin of this IDL file is
7  * http://dev.w3.org/csswg/css-font-loading/#fontface-interface
8  *
9  * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
10  * liability, trademark and document use rules apply.
11  */
13 typedef (ArrayBuffer or ArrayBufferView) BinaryData;
15 dictionary FontFaceDescriptors {
16   DOMString style = "normal";
17   DOMString weight = "normal";
18   DOMString stretch = "normal";
19   DOMString unicodeRange = "U+0-10FFFF";
20   DOMString variant = "normal";
21   DOMString featureSettings = "normal";
22   DOMString variationSettings = "normal";
23   DOMString display = "auto";
26 enum FontFaceLoadStatus { "unloaded", "loading", "loaded", "error" };
28 // Bug 1072107 is for exposing this in workers.
29 // [Exposed=(Window,Worker)]
30 [Constructor(DOMString family,
31              (DOMString or BinaryData) source,
32              optional FontFaceDescriptors descriptors),
33  Pref="layout.css.font-loading-api.enabled"]
34 interface FontFace {
35   [SetterThrows] attribute DOMString family;
36   [SetterThrows] attribute DOMString style;
37   [SetterThrows] attribute DOMString weight;
38   [SetterThrows] attribute DOMString stretch;
39   [SetterThrows] attribute DOMString unicodeRange;
40   [SetterThrows] attribute DOMString variant;
41   [SetterThrows] attribute DOMString featureSettings;
42   [SetterThrows, Pref="layout.css.font-variations.enabled"] attribute DOMString variationSettings;
43   [SetterThrows, Pref="layout.css.font-display.enabled"] attribute DOMString display;
45   readonly attribute FontFaceLoadStatus status;
47   [Throws]
48   Promise<FontFace> load();
50   [Throws]
51   readonly attribute Promise<FontFace> loaded;