~alinuxninja/nginx-edge/trunk

« back to all changes in this revision

Viewing changes to debian/modules/ngx_pagespeed/psol/include/third_party/css_parser/src/webutil/html/htmltagenum.h

  • Committer: Vivian
  • Date: 2015-12-04 18:20:11 UTC
  • Revision ID: git-v1:a36f2bc32e884f7473b3a47040e5411306144d7d
* Do not extract psol.tar.gz

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 * Copyright 2010 Google Inc.
3
 
 *
4
 
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 
 * you may not use this file except in compliance with the License.
6
 
 * You may obtain a copy of the License at
7
 
 *
8
 
 *      http://www.apache.org/licenses/LICENSE-2.0
9
 
 *
10
 
 * Unless required by applicable law or agreed to in writing, software
11
 
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 
 * See the License for the specific language governing permissions and
14
 
 * limitations under the License.
15
 
 */
16
 
 
17
 
// Copyright 2006 Google Inc. All Rights Reserved.
18
 
// Author: mec@google.com  (Michael Chastain)
19
 
// Author: dpeng@google.com (Daniel Peng)
20
 
 
21
 
#ifndef WEBUTIL_HTML_HTMLTAGENUM_H__
22
 
#define WEBUTIL_HTML_HTMLTAGENUM_H__
23
 
 
24
 
#include <string>
25
 
#include "string_using.h"
26
 
 
27
 
// This is public at the top level because I think a lot of people
28
 
// will want to use it.
29
 
//
30
 
// NOTE: These values may be stored in proto buffers.  Do not change or remove
31
 
// any existing values.  If you want to add support for a new tag, use the
32
 
// next available value (as specified by kHtmlTagBuiltinMax), and increment
33
 
// kHtmlTagBuiltinMax.  Also make sure to add the new tag to HtmlTagEnumNames
34
 
// in htmltagenum.cc.
35
 
//
36
 
// This tag list came from:
37
 
//   http://www.w3.org/TR/REC-html40/index/elements.html
38
 
// With additional tags used in:
39
 
//   repository/lexer/html_lexer.cc
40
 
//   repository/parsers/base/handler-parser.cc
41
 
// And some additional legacy backwards-compatible tags from HTML5:
42
 
//   http://whatwg.org/specs/web-apps/current-work/#stack
43
 
//   [accessed 2006-10-10]
44
 
// Plus some Netscape Navigator 4.0 tags from:
45
 
//   http://devedge-temp.mozilla.org/library/manuals/1998/htmlguide/
46
 
//   [accessed 2006-11-21]
47
 
// The !doctype tag defines a reference to DTD (doctype type definition).
48
 
// It is a SGML tag and is somehow mentioned in the HTML 4.01 spec.
49
 
//   http://www.w3.org/TR/html401/intro/sgmltut.html
50
 
// The noindex tag is a non-standard tag used mostly by Russian sites:
51
 
//   http://ru.wikipedia.org/wiki/Noindex
52
 
//   http://translate.google.com/translate?u=http://ru.wikipedia.org/wiki/Noindex&sl=ru&tl=en
53
 
// Added HTML5 tags, per 2011-01-13 working draft:
54
 
//   http://www.w3.org/TR/html5/
55
 
 
56
 
enum HtmlTagEnum {
57
 
  // Unknown tag: must be 0
58
 
     kHtmlTagUnknown = 0,
59
 
  // From html 4.01 spec
60
 
     kHtmlTagA = 1,
61
 
     kHtmlTagAbbr = 2,
62
 
     kHtmlTagAcronym = 3,
63
 
     kHtmlTagAddress = 4,
64
 
     kHtmlTagApplet = 5,
65
 
     kHtmlTagArea = 6,
66
 
     kHtmlTagB = 7,
67
 
     kHtmlTagBase = 8,
68
 
     kHtmlTagBasefont = 9,
69
 
     kHtmlTagBdo = 10,
70
 
     kHtmlTagBig = 11,
71
 
     kHtmlTagBlockquote = 12,
72
 
     kHtmlTagBody = 13,
73
 
     kHtmlTagBr = 14,
74
 
     kHtmlTagButton = 15,
75
 
     kHtmlTagCaption = 16,
76
 
     kHtmlTagCenter = 17,
77
 
     kHtmlTagCite = 18,
78
 
     kHtmlTagCode = 19,
79
 
     kHtmlTagCol = 20,
80
 
     kHtmlTagColgroup = 21,
81
 
     kHtmlTagDd = 22,
82
 
     kHtmlTagDel = 23,
83
 
     kHtmlTagDfn = 24,
84
 
     kHtmlTagDir = 25,
85
 
     kHtmlTagDiv = 26,
86
 
     kHtmlTagDl = 27,
87
 
     kHtmlTagDt = 28,
88
 
     kHtmlTagEm = 29,
89
 
     kHtmlTagFieldset = 30,
90
 
     kHtmlTagFont = 31,
91
 
     kHtmlTagForm = 32,
92
 
     kHtmlTagFrame = 33,
93
 
     kHtmlTagFrameset = 34,
94
 
     kHtmlTagH1 = 35,
95
 
     kHtmlTagH2 = 36,
96
 
     kHtmlTagH3 = 37,
97
 
     kHtmlTagH4 = 38,
98
 
     kHtmlTagH5 = 39,
99
 
     kHtmlTagH6 = 40,
100
 
     kHtmlTagHead = 41,
101
 
     kHtmlTagHr = 42,
102
 
     kHtmlTagHtml = 43,
103
 
     kHtmlTagI = 44,
104
 
     kHtmlTagIframe = 45,
105
 
     kHtmlTagImg = 46,
106
 
     kHtmlTagInput = 47,
107
 
     kHtmlTagIns = 48,
108
 
     kHtmlTagIsindex = 49,
109
 
     kHtmlTagKbd = 50,
110
 
     kHtmlTagLabel = 51,
111
 
     kHtmlTagLegend = 52,
112
 
     kHtmlTagLi = 53,
113
 
     kHtmlTagLink = 54,
114
 
     kHtmlTagMap = 55,
115
 
     kHtmlTagMenu = 56,
116
 
     kHtmlTagMeta = 57,
117
 
     kHtmlTagNoframes = 58,
118
 
     kHtmlTagNoscript = 59,
119
 
     kHtmlTagObject = 60,
120
 
     kHtmlTagOl = 61,
121
 
     kHtmlTagOptgroup = 62,
122
 
     kHtmlTagOption = 63,
123
 
     kHtmlTagP = 64,
124
 
     kHtmlTagParam = 65,
125
 
     kHtmlTagPre = 66,
126
 
     kHtmlTagQ = 67,
127
 
     kHtmlTagS = 68,
128
 
     kHtmlTagSamp = 69,
129
 
     kHtmlTagScript = 70,
130
 
     kHtmlTagSelect = 71,
131
 
     kHtmlTagSmall = 72,
132
 
     kHtmlTagSpan = 73,
133
 
     kHtmlTagStrike = 74,
134
 
     kHtmlTagStrong = 75,
135
 
     kHtmlTagStyle = 76,
136
 
     kHtmlTagSub = 77,
137
 
     kHtmlTagSup = 78,
138
 
     kHtmlTagTable = 79,
139
 
     kHtmlTagTbody = 80,
140
 
     kHtmlTagTd = 81,
141
 
     kHtmlTagTextarea = 82,
142
 
     kHtmlTagTfoot = 83,
143
 
     kHtmlTagTh = 84,
144
 
     kHtmlTagThead = 85,
145
 
     kHtmlTagTitle = 86,
146
 
     kHtmlTagTr = 87,
147
 
     kHtmlTagTt = 88,
148
 
     kHtmlTagU = 89,
149
 
     kHtmlTagUl = 90,
150
 
     kHtmlTagVar = 91,
151
 
  // Empty tag
152
 
     kHtmlTagZeroLength = 92,
153
 
  // Used in repository/lexer/html_lexer.cc
154
 
     kHtmlTagBangDashDash = 93,
155
 
     kHtmlTagBlink = 94,
156
 
  // Used in repository/parsers/base/handler-parser.cc
157
 
     kHtmlTagEmbed = 95,
158
 
     kHtmlTagMarquee = 96,
159
 
  // Legacy backwards-compatible tags mentioned in HTML5.
160
 
     kHtmlTagNobr = 97,
161
 
     kHtmlTagWbr = 98,
162
 
     kHtmlTagBgsound = 99,
163
 
     kHtmlTagImage = 100,
164
 
     kHtmlTagListing = 101,
165
 
     kHtmlTagNoembed = 102,
166
 
     kHtmlTagPlaintext = 103,
167
 
     kHtmlTagSpacer = 104,
168
 
     kHtmlTagXmp = 105,
169
 
  // From Netscape Navigator 4.0
170
 
     kHtmlTagIlayer = 106,
171
 
     kHtmlTagKeygen = 107,
172
 
     kHtmlTagLayer = 108,
173
 
     kHtmlTagMulticol = 109,
174
 
     kHtmlTagNolayer = 110,
175
 
     kHtmlTagServer = 111,
176
 
  // !doctype from SGML and also from HTML 4.01 spec.
177
 
     kHtmlTagBangDoctype = 112,
178
 
  // Legacy tag used mostly by Russian sites.
179
 
     kHtmlTagNoindex = 113,
180
 
  // Anything starts with ! (except those marked above) or ?
181
 
     kHtmlTagBogusComment = 114,
182
 
  // New tags in HTML5.
183
 
     kHtmlTagArticle = 115,
184
 
     kHtmlTagAside = 116,
185
 
     kHtmlTagAudio = 117,
186
 
     kHtmlTagBdi = 118,
187
 
     kHtmlTagCanvas = 119,
188
 
     kHtmlTagCommand = 120,
189
 
     kHtmlTagDatalist = 121,
190
 
     kHtmlTagDetails = 122,
191
 
     kHtmlTagFigcaption = 123,
192
 
     kHtmlTagFigure = 124,
193
 
     kHtmlTagFooter = 125,
194
 
     kHtmlTagHeader = 126,
195
 
     kHtmlTagHgroup = 127,
196
 
     kHtmlTagMark = 128,
197
 
     kHtmlTagMeter = 129,
198
 
     kHtmlTagNav = 130,
199
 
     kHtmlTagOutput = 131,
200
 
     kHtmlTagProgress = 132,
201
 
     kHtmlTagRp = 133,
202
 
     kHtmlTagRt = 134,
203
 
     kHtmlTagRuby = 135,
204
 
     kHtmlTagSection = 136,
205
 
     kHtmlTagSource = 137,
206
 
     kHtmlTagSummary = 138,
207
 
     kHtmlTagTime = 139,
208
 
     kHtmlTagTrack = 140,
209
 
     kHtmlTagVideo = 141,
210
 
 
211
 
  // Add new tag values here.  Make sure you also add new tags to
212
 
  // HtmlTagEnumNames in htmltagenum.cc and update kHtmlTagBuiltinMax.
213
 
 
214
 
  // Sentinel.
215
 
     kHtmlTagBuiltinMax = 142
216
 
};
217
 
 
218
 
// NULL if tag >= kHtmlTagBuiltinMax.
219
 
extern const char* HtmlTagName(HtmlTagEnum tag);
220
 
 
221
 
// StringPrintf("UNKNOWN%d", tag) if tag >= kHtmlTag
222
 
extern string HtmlTagNameOrUnknown(int i);
223
 
 
224
 
#endif  // WEBUTIL_HTML_HTMLTAGENUM_H__