Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
1 /* -*- Mode: Java; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 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 = {
14 "font-family": {
15 domProp: "fontFamily",
16 values: [ "\"serif\"", "\"cursive\"", "seriff", "Times New Roman", "TimesRoman", "\"Times New Roman\"" ],
17 /* not clear that the generics are really invalid */
18 invalid_values: [ "sans-serif", "Times New Roman, serif", "'Times New Roman', serif", "cursive", "fantasy" ]
19 },
20 "font-stretch": {
21 domProp: "fontStretch",
22 values: [ "normal", "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded" ],
23 invalid_values: [ "wider", "narrower" ]
24 },
25 "font-style": {
26 domProp: "fontStyle",
27 values: [ "normal", "italic", "oblique" ],
28 invalid_values: []
29 },
30 "font-weight": {
31 domProp: "fontWeight",
32 values: [ "normal", "400", "bold", "100", "200", "300", "500", "600", "700", "800", "900" ],
33 invalid_values: [ "107", "399", "401", "699", "710", "bolder", "lighter" ]
34 },
35 "src": {
36 domProp: null,
37 values: [
38 "url(404.ttf)",
39 "url(\"404.eot\")",
40 "url(\'404.otf\')",
41 "url(404.ttf) format(\"truetype\")",
42 "url(404.ttf) format(\"truetype\", \"opentype\")",
43 "url(404.ttf) format(\"truetype\", \"opentype\"), url(\'404.eot\')",
44 "local(Times New Roman)",
45 "local(\'Times New Roman\')",
46 "local(\"Times New Roman\")",
47 "local(serif)", /* is this valid? */
48 "local(\"serif\")",
49 "url(404.ttf) format(\"truetype\", \"unknown\"), local(Times New Roman), url(\'404.eot\')",
50 ],
51 invalid_values: [
52 "url(404.ttf) format(truetype)",
53 "url(404.ttf) format(\"truetype\" \"opentype\")",
54 "url(404.ttf) format(\"truetype\",)",
55 "local(\"Times New\" Roman)",
56 ]
57 },
58 "unicode-range": {
59 domProp: null,
60 values: [ "U+0-10FFFF", "U+3-7B3", "U+3??", "U+6A", "U+3????", "U+???", "U+302-302", "U+0-7,U+A-C", "U+100-17F,U+200-17F", "U+3??, U+500-513 ,U+612 , U+4????", "U+1FFF,U+200-27F" ],
61 invalid_values: [ "U+1????-2????", "U+0-7,A-C", "U+100-17F,200-17F" ]
62 }
63 }