tizen beta release
[profile/ivi/webkit-efl.git] / debian / libwebkit-engine / usr / share / ewebkit-0 / webinspector / CSSKeywordCompletions.js
1 /*
2  * Copyright (C) 2011 Google Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are
6  * met:
7  *
8  *     * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *     * Redistributions in binary form must reproduce the above
11  * copyright notice, this list of conditions and the following disclaimer
12  * in the documentation and/or other materials provided with the
13  * distribution.
14  *     * Neither the name of Google Inc. nor the names of its
15  * contributors may be used to endorse or promote products derived from
16  * this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30
31 WebInspector.CSSKeywordCompletions = {}
32
33 WebInspector.CSSKeywordCompletions.forProperty = function(propertyName)
34 {
35     var acceptedKeywords = ["initial"];
36     if (propertyName in WebInspector.CSSKeywordCompletions._propertyKeywordMap)
37         acceptedKeywords = acceptedKeywords.concat(WebInspector.CSSKeywordCompletions._propertyKeywordMap[propertyName]);
38     if (propertyName in WebInspector.CSSKeywordCompletions._colorAwareProperties)
39         acceptedKeywords = acceptedKeywords.concat(WebInspector.CSSKeywordCompletions._colors);
40     if (propertyName in WebInspector.CSSKeywordCompletions.InheritedProperties)
41         acceptedKeywords.push("inherit");
42     return new WebInspector.CSSCompletions(acceptedKeywords, true);
43 }
44
45 WebInspector.CSSKeywordCompletions.isColorAwareProperty = function(propertyName)
46 {
47     return WebInspector.CSSKeywordCompletions._colorAwareProperties[propertyName] === true;
48 }
49
50 // Taken from http://www.w3.org/TR/CSS21/propidx.html.
51 WebInspector.CSSKeywordCompletions.InheritedProperties = [
52     "azimuth", "border-collapse", "border-spacing", "caption-side", "color", "cursor", "direction", "elevation",
53     "empty-cells", "font-family", "font-size", "font-style", "font-variant", "font-weight", "font", "letter-spacing",
54     "line-height", "list-style-image", "list-style-position", "list-style-type", "list-style", "orphans", "pitch-range",
55     "pitch", "quotes", "richness", "speak-header", "speak-numeral", "speak-punctuation", "speak", "speech-rate", "stress",
56     "text-align", "text-indent", "text-transform", "text-shadow", "visibility", "voice-family", "volume", "white-space", "widows", "word-spacing"
57 ].keySet();
58
59 WebInspector.CSSKeywordCompletions._colors = [
60     "aqua", "black", "blue", "fuchsia", "gray", "green", "lime", "maroon", "navy", "olive", "orange", "purple", "red",
61     "silver", "teal", "white", "yellow", "transparent", "currentcolor", "grey", "aliceblue", "antiquewhite",
62     "aquamarine", "azure", "beige", "bisque", "blanchedalmond", "blueviolet", "brown", "burlywood", "cadetblue",
63     "chartreuse", "chocolate", "coral", "cornflowerblue", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan",
64     "darkgoldenrod", "darkgray", "darkgreen", "darkgrey", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange",
65     "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkslategrey",
66     "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick",
67     "floralwhite", "forestgreen", "gainsboro", "ghostwhite", "gold", "goldenrod", "greenyellow", "honeydew", "hotpink",
68     "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue",
69     "lightcoral", "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightgrey", "lightpink",
70     "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey", "lightsteelblue", "lightyellow",
71     "limegreen", "linen", "magenta", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen",
72     "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream",
73     "mistyrose", "moccasin", "navajowhite", "oldlace", "olivedrab", "orangered", "orchid", "palegoldenrod", "palegreen",
74     "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "rosybrown",
75     "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "skyblue", "slateblue",
76     "slategray", "slategrey", "snow", "springgreen", "steelblue", "tan", "thistle", "tomato", "turquoise", "violet",
77     "wheat", "whitesmoke", "yellowgreen"
78 ];
79
80 WebInspector.CSSKeywordCompletions._colorAwareProperties = [
81     "background", "background-color", "background-image", "border", "border-color", "border-top", "border-right", "border-bottom",
82     "border-left", "border-top-color", "border-right-color", "border-bottom-color", "border-left-color", "color",
83     "outline", "outline-color", "text-line-through", "text-line-through-color", "text-overline", "text-overline-color",
84     "text-shadow", "text-underline", "text-underline-color", "-webkit-text-emphasis", "-webkit-text-emphasis-color"
85 ].keySet();
86
87 WebInspector.CSSKeywordCompletions._propertyKeywordMap = {
88     "table-layout": [
89         "auto", "fixed"
90     ],
91     "visibility": [
92         "hidden", "visible", "collapse"
93     ],
94     "background-repeat": [
95         "repeat", "repeat-x", "repeat-y", "no-repeat", "space", "round"
96     ],
97     "text-underline": [
98         "none", "dotted", "dashed", "solid", "double", "dot-dash", "dot-dot-dash", "wave"
99     ],
100     "content": [
101         "list-item", "close-quote", "no-close-quote", "no-open-quote", "open-quote"
102     ],
103     "list-style-image": [
104         "none"
105     ],
106     "clear": [
107         "none", "left", "right", "both"
108     ],
109     "text-underline-mode": [
110         "continuous", "skip-white-space"
111     ],
112     "overflow-x": [
113         "hidden", "auto", "visible", "overlay", "scroll"
114     ],
115     "stroke-linejoin": [
116         "round", "miter", "bevel"
117     ],
118     "baseline-shift": [
119         "baseline", "sub", "super"
120     ],
121     "border-bottom-width": [
122         "medium", "thick", "thin"
123     ],
124     "marquee-speed": [
125         "normal", "slow", "fast"
126     ],
127     "margin-top-collapse": [
128         "collapse", "separate", "discard"
129     ],
130     "max-height": [
131         "none"
132     ],
133     "box-orient": [
134         "horizontal", "vertical", "inline-axis", "block-axis"
135     ],
136     "font-stretch": [
137         "normal", "wider", "narrower", "ultra-condensed", "extra-condensed", "condensed", "semi-condensed",
138         "semi-expanded", "expanded", "extra-expanded", "ultra-expanded"
139     ],
140     "-webkit-color-correction": [
141         "default", "srgb"
142     ],
143     "text-underline-style": [
144         "none", "dotted", "dashed", "solid", "double", "dot-dash", "dot-dot-dash", "wave"
145     ],
146     "text-overline-mode": [
147         "continuous", "skip-white-space"
148     ],
149     "-webkit-background-composite": [
150         "highlight", "clear", "copy", "source-over", "source-in", "source-out", "source-atop", "destination-over",
151         "destination-in", "destination-out", "destination-atop", "xor", "plus-darker", "plus-lighter"
152     ],
153     "border-left-width": [
154         "medium", "thick", "thin"
155     ],
156     "-webkit-writing-mode": [
157         "lr", "rl", "tb", "lr-tb", "rl-tb", "tb-rl", "horizontal-tb", "vertical-rl", "vertical-lr", "horizontal-bt"
158     ],
159     "text-line-through-mode": [
160         "continuous", "skip-white-space"
161     ],
162     "border-collapse": [
163         "collapse", "separate"
164     ],
165     "page-break-inside": [
166         "auto", "avoid"
167     ],
168     "border-top-width": [
169         "medium", "thick", "thin"
170     ],
171     "outline-color": [
172         "invert"
173     ],
174     "text-line-through-style": [
175         "none", "dotted", "dashed", "solid", "double", "dot-dash", "dot-dot-dash", "wave"
176     ],
177     "outline-style": [
178         "none", "hidden", "inset", "groove", "ridge", "outset", "dotted", "dashed", "solid", "double"
179     ],
180     "cursor": [
181         "none", "copy", "auto", "crosshair", "default", "pointer", "move", "vertical-text", "cell", "context-menu",
182         "alias", "progress", "no-drop", "not-allowed", "-webkit-zoom-in", "-webkit-zoom-out", "e-resize", "ne-resize",
183         "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "ew-resize", "ns-resize",
184         "nesw-resize", "nwse-resize", "col-resize", "row-resize", "text", "wait", "help", "all-scroll", "-webkit-grab",
185         "-webkit-grabbing"
186     ],
187     "border-width": [
188         "medium", "thick", "thin"
189     ],
190     "size": [
191         "a3", "a4", "a5", "b4", "b5", "landscape", "ledger", "legal", "letter", "portrait"
192     ],
193     "background-size": [
194         "contain", "cover"
195     ],
196     "direction": [
197         "ltr", "rtl"
198     ],
199     "marquee-direction": [
200         "left", "right", "auto", "reverse", "forwards", "backwards", "ahead", "up", "down"
201     ],
202     "enable-background": [
203         "accumulate", "new"
204     ],
205     "float": [
206         "none", "left", "right"
207     ],
208     "overflow-y": [
209         "hidden", "auto", "visible", "overlay", "scroll"
210     ],
211     "margin-bottom-collapse": [
212         "collapse",  "separate", "discard"
213     ],
214     "box-reflect": [
215         "left", "right", "above", "below"
216     ],
217     "overflow": [
218         "hidden", "auto", "visible", "overlay", "scroll"
219     ],
220     "text-rendering": [
221         "auto", "optimizespeed", "optimizelegibility", "geometricprecision"
222     ],
223     "text-align": [
224         "-webkit-auto", "left", "right", "center", "justify", "-webkit-left", "-webkit-right", "-webkit-center"
225     ],
226     "list-style-position": [
227         "outside", "inside"
228     ],
229     "margin-bottom": [
230         "auto"
231     ],
232     "color-interpolation": [
233         "linearrgb"
234     ],
235     "background-origin": [
236         "border-box", "content-box", "padding-box"
237     ],
238     "word-wrap": [
239         "normal", "break-word"
240     ],
241     "font-weight": [
242         "normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900"
243     ],
244     "margin-before-collapse": [
245         "collapse", "separate", "discard"
246     ],
247     "text-overline-width": [
248         "normal", "medium", "auto", "thick", "thin"
249     ],
250     "text-transform": [
251         "none", "capitalize", "uppercase", "lowercase"
252     ],
253     "border-right-style": [
254         "none", "hidden", "inset", "groove", "ridge", "outset", "dotted", "dashed", "solid", "double"
255     ],
256     "border-left-style": [
257         "none", "hidden", "inset", "groove", "ridge", "outset", "dotted", "dashed", "solid", "double"
258     ],
259     "-webkit-text-emphasis": [
260         "circle", "filled", "open", "dot", "double-circle", "triangle", "sesame"
261     ],
262     "font-style": [
263         "italic", "oblique", "normal"
264     ],
265     "speak": [
266         "none", "normal", "spell-out", "digits", "literal-punctuation", "no-punctuation"
267     ],
268     "text-line-through": [
269         "none", "dotted", "dashed", "solid", "double", "dot-dash", "dot-dot-dash", "wave", "continuous",
270         "skip-white-space"
271     ],
272     "color-rendering": [
273         "auto", "optimizespeed", "optimizequality"
274     ],
275     "list-style-type": [
276         "none", "disc", "circle", "square", "decimal", "decimal-leading-zero", "arabic-indic", "binary", "bengali",
277         "cambodian", "khmer", "devanagari", "gujarati", "gurmukhi", "kannada", "lower-hexadecimal", "lao", "malayalam",
278         "mongolian", "myanmar", "octal", "oriya", "persian", "urdu", "telugu", "tibetan", "thai", "upper-hexadecimal",
279         "lower-roman", "upper-roman", "lower-greek", "lower-alpha", "lower-latin", "upper-alpha", "upper-latin", "afar",
280         "ethiopic-halehame-aa-et", "ethiopic-halehame-aa-er", "amharic", "ethiopic-halehame-am-et", "amharic-abegede",
281         "ethiopic-abegede-am-et", "cjk-earthly-branch", "cjk-heavenly-stem", "ethiopic", "ethiopic-halehame-gez",
282         "ethiopic-abegede", "ethiopic-abegede-gez", "hangul-consonant", "hangul", "lower-norwegian", "oromo",
283         "ethiopic-halehame-om-et", "sidama", "ethiopic-halehame-sid-et", "somali", "ethiopic-halehame-so-et", "tigre",
284         "ethiopic-halehame-tig", "tigrinya-er", "ethiopic-halehame-ti-er", "tigrinya-er-abegede",
285         "ethiopic-abegede-ti-er", "tigrinya-et", "ethiopic-halehame-ti-et", "tigrinya-et-abegede",
286         "ethiopic-abegede-ti-et", "upper-greek", "upper-norwegian", "asterisks", "footnotes", "hebrew", "armenian",
287         "lower-armenian", "upper-armenian", "georgian", "cjk-ideographic", "hiragana", "katakana", "hiragana-iroha",
288         "katakana-iroha"
289     ],
290     "-webkit-text-combine": [
291         "none", "horizontal"
292     ],
293     "outline": [
294         "none", "hidden", "inset", "groove", "ridge", "outset", "dotted", "dashed", "solid", "double"
295     ],
296     "font": [
297         "caption", "icon", "menu", "message-box", "small-caption", "-webkit-mini-control", "-webkit-small-control",
298         "-webkit-control", "status-bar", "italic", "oblique", "small-caps", "normal", "bold", "bolder", "lighter",
299         "100", "200", "300", "400", "500", "600", "700", "800", "900", "xx-small", "x-small", "small", "medium",
300         "large", "x-large", "xx-large", "-webkit-xxx-large", "smaller", "larger", "serif", "sans-serif", "cursive",
301         "fantasy", "monospace", "-webkit-body", "-webkit-pictograph"
302     ],
303     "dominant-baseline": [
304         "middle", "auto", "central", "text-before-edge", "text-after-edge", "ideographic", "alphabetic", "hanging",
305         "mathematical", "use-script", "no-change", "reset-size"
306     ],
307     "display": [
308         "none", "inline", "block", "list-item", "run-in", "compact", "inline-block", "table", "inline-table",
309         "table-row-group", "table-header-group", "table-footer-group", "table-row", "table-column-group",
310         "table-column", "table-cell", "table-caption", "-webkit-box", "-webkit-inline-box", "-wap-marquee"
311     ],
312     "-webkit-text-emphasis-position": [
313         "over", "under"
314     ],
315     "image-rendering": [
316         "auto", "optimizespeed", "optimizequality"
317     ],
318     "alignment-baseline": [
319         "baseline", "middle", "auto", "before-edge", "after-edge", "central", "text-before-edge", "text-after-edge",
320         "ideographic", "alphabetic", "hanging", "mathematical"
321     ],
322     "outline-width": [
323         "medium", "thick", "thin"
324     ],
325     "text-line-through-width": [
326         "normal", "medium", "auto", "thick", "thin"
327     ],
328     "box-align": [
329         "baseline", "center", "stretch", "start", "end"
330     ],
331     "border-right-width": [
332         "medium", "thick", "thin"
333     ],
334     "border-top-style": [
335         "none", "hidden", "inset", "groove", "ridge", "outset", "dotted", "dashed", "solid", "double"
336     ],
337     "line-height": [
338         "normal"
339     ],
340     "text-overflow": [
341         "clip", "ellipsis"
342     ],
343     "box-direction": [
344         "normal", "reverse"
345     ],
346     "margin-after-collapse": [
347         "collapse", "separate", "discard"
348     ],
349     "page-break-before": [
350         "left", "right", "auto", "always", "avoid"
351     ],
352     "-webkit-hyphens": [
353         "none", "auto", "manual"
354     ],
355     "border-image": [
356         "repeat", "stretch"
357     ],
358     "text-decoration": [
359         "blink", "line-through", "overline", "underline"
360     ],
361     "position": [
362         "absolute", "fixed", "relative", "static"
363     ],
364     "font-family": [
365         "serif", "sans-serif", "cursive", "fantasy", "monospace", "-webkit-body", "-webkit-pictograph"
366     ],
367     "text-overflow-mode": [
368         "clip", "ellipsis"
369     ],
370     "border-bottom-style": [
371         "none", "hidden", "inset", "groove", "ridge", "outset", "dotted", "dashed", "solid", "double"
372     ],
373     "unicode-bidi": [
374         "normal", "bidi-override", "embed"
375     ],
376     "clip-rule": [
377         "nonzero", "evenodd"
378     ],
379     "margin-left": [
380         "auto"
381     ],
382     "margin-top": [
383         "auto"
384     ],
385     "zoom": [
386         "document", "reset"
387     ],
388     "text-overline-style": [
389         "none", "dotted", "dashed", "solid", "double", "dot-dash", "dot-dot-dash", "wave"
390     ],
391     "max-width": [
392         "none"
393     ],
394     "empty-cells": [
395         "hide", "show"
396     ],
397     "pointer-events": [
398         "none", "all", "auto", "visible", "visiblepainted", "visiblefill", "visiblestroke", "painted", "fill", "stroke"
399     ],
400     "letter-spacing": [
401         "normal"
402     ],
403     "background-clip": [
404         "border-box", "content-box", "padding-box"
405     ],
406     "-webkit-font-smoothing": [
407         "none", "auto", "antialiased", "subpixel-antialiased"
408     ],
409     "border": [
410         "none", "hidden", "inset", "groove", "ridge", "outset", "dotted", "dashed", "solid", "double"
411     ],
412     "font-size": [
413         "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "-webkit-xxx-large", "smaller",
414         "larger"
415     ],
416     "font-variant": [
417         "small-caps", "normal"
418     ],
419     "vertical-align": [
420         "baseline", "middle", "sub", "super", "text-top", "text-bottom", "top", "bottom", "-webkit-baseline-middle"
421     ],
422     "marquee-style": [
423         "none", "scroll", "slide", "alternate"
424     ],
425     "white-space": [
426         "normal", "nowrap", "pre", "pre-line", "pre-wrap"
427     ],
428     "text-underline-width": [
429         "normal", "medium", "auto", "thick", "thin"
430     ],
431     "box-lines": [
432         "single", "multiple"
433     ],
434     "page-break-after": [
435         "left", "right", "auto", "always", "avoid"
436     ],
437     "clip-path": [
438         "none"
439     ],
440     "margin": [
441         "auto"
442     ],
443     "marquee-repetition": [
444         "infinite"
445     ],
446     "margin-right": [
447         "auto"
448     ],
449     "-webkit-text-emphasis-style": [
450         "circle", "filled", "open", "dot", "double-circle", "triangle", "sesame"
451     ]
452 }