1 /* -*- tab-width: 4; indent-tabs-mode: nil; js-indent-level: 4 -*- */
2 /* vim: set shiftwidth=4 tabstop=4 autoindent cindent noexpandtab: */
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 // Each property has the following fields:
8 // domProp: The name of the relevant member of nsIDOM[NS]CSS2Properties
9 // values: Strings that are values for the descriptor and should be accepted.
10 // invalid_values: Things that are not values for the descriptor and
11 // should be rejected.
13 var gCSSFontFaceDescriptors = {
15 domProp: "fontFamily",
24 /* not clear that the generics are really invalid */
27 "Times New Roman, serif",
28 "'Times New Roman', serif",
38 domProp: "fontStretch",
50 invalid_values: ["wider", "narrower", "normal ! important", "normal )"],
54 values: ["normal", "italic", "oblique"],
58 domProp: "fontWeight",
83 "calc(200.4) calc(400.4)",
85 invalid_values: ["bolder", "lighter", "1001", "0", "0 100", "100 1001"],
93 'url(404.ttf) format("truetype")',
94 "local(Times New Roman)",
95 "local('Times New Roman')",
96 'local("Times New Roman")',
98 "url(404.ttf) format(truetype)",
99 'url(404.ttf) format("truetype", "opentype"), url(\'404.eot\')',
100 'url(404.ttf) format("truetype", "unknown"), local(Times New Roman), url(\'404.eot\')',
103 'url(404.ttf) format("truetype" "opentype")',
104 'url(404.ttf) format("truetype",)',
105 'local("Times New" Roman)',
106 "local(serif)" /* is this valid? */,
108 "url(404.ttf) ) foo",
109 "url(404.ttf) ! important",
110 "url(404.ttf) ! hello",
111 'url(404.ttf) format("truetype", "opentype")',
125 "U+3??, U+500-513 ,U+612 , U+4????",
131 "U+100-17F,U+200-17F",
139 values: ["auto", "block", "swap", "fallback", "optional"],
140 invalid_values: ["normal", "initial"],