PageRenderTime 42ms CodeModel.GetById 13ms app.highlight 17ms RepoModel.GetById 4ms app.codeStats 0ms

/platform/external/webkit/WebCore/bindings/v8/V8Index.cpp

https://github.com/aharish/totoro-gb-opensource-update2
C++ | 488 lines | 430 code | 27 blank | 31 comment | 2 complexity | d7ce0d3c77ab273810571cfee9521b50 MD5 | raw file
  1/*
  2 * Copyright (C) 2008, 2009 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#include "config.h"
 32#include "V8Index.h"
 33
 34#include "V8Attr.h"
 35#include "V8BarInfo.h"
 36#include "V8BeforeLoadEvent.h"
 37#include "V8Blob.h"
 38#include "V8WebGLActiveInfo.h"
 39#include "V8CanvasRenderingContext.h"
 40#include "V8CanvasRenderingContext2D.h"
 41#include "V8CanvasGradient.h"
 42#include "V8CanvasPattern.h"
 43#include "V8CanvasPixelArray.h"
 44#include "V8CDATASection.h"
 45#include "V8CharacterData.h"
 46#include "V8ClientRect.h"
 47#include "V8ClientRectList.h"
 48#include "V8Clipboard.h"
 49#include "V8Comment.h"
 50#include "V8CompositionEvent.h"
 51#include "V8Console.h"
 52#include "V8Counter.h"
 53#include "V8CSSStyleDeclaration.h"
 54#include "V8CSSRule.h"
 55#include "V8CSSStyleRule.h"
 56#include "V8CSSCharsetRule.h"
 57#include "V8CSSImportRule.h"
 58#include "V8CSSMediaRule.h"
 59#include "V8CSSFontFaceRule.h"
 60#include "V8CSSPageRule.h"
 61#include "V8CSSRuleList.h"
 62#include "V8CSSPrimitiveValue.h"
 63#include "V8CSSValue.h"
 64#include "V8CSSValueList.h"
 65#include "V8CSSStyleSheet.h"
 66#include "V8CSSVariablesDeclaration.h"
 67#include "V8CSSVariablesRule.h"
 68#include "V8DataGridColumn.h"
 69#include "V8DataGridColumnList.h"
 70#include "V8Document.h"
 71#include "V8DocumentFragment.h"
 72#include "V8DocumentType.h"
 73#include "V8Element.h"
 74#include "V8Entity.h"
 75#include "V8EntityReference.h"
 76#include "V8File.h"
 77#include "V8FileList.h"
 78#include "V8History.h"
 79#include "V8HTMLAllCollection.h"
 80#include "V8HTMLCanvasElement.h"
 81#include "V8HTMLCollection.h"
 82#include "V8HTMLDocument.h"
 83#include "V8HTMLElement.h"
 84#include "V8HTMLOptionsCollection.h"
 85#include "V8HTMLAnchorElement.h"
 86#include "V8HTMLAppletElement.h"
 87#include "V8HTMLAreaElement.h"
 88#include "V8HTMLBaseElement.h"
 89#include "V8HTMLBaseFontElement.h"
 90#include "V8HTMLBlockquoteElement.h"
 91#include "V8HTMLBodyElement.h"
 92#include "V8HTMLBRElement.h"
 93#include "V8HTMLButtonElement.h"
 94#include "V8HTMLCanvasElement.h"
 95#include "V8HTMLModElement.h"
 96#include "V8HTMLDataGridCellElement.h"
 97#include "V8HTMLDataGridColElement.h"
 98#include "V8HTMLDataGridElement.h"
 99#include "V8HTMLDataGridRowElement.h"
100#include "V8HTMLDirectoryElement.h"
101#include "V8HTMLDivElement.h"
102#include "V8HTMLDListElement.h"
103#include "V8HTMLEmbedElement.h"
104#include "V8HTMLFieldSetElement.h"
105#include "V8HTMLFormElement.h"
106#include "V8HTMLFontElement.h"
107#include "V8HTMLFrameElement.h"
108#include "V8HTMLFrameSetElement.h"
109#include "V8HTMLHeadingElement.h"
110#include "V8HTMLHeadElement.h"
111#include "V8HTMLHRElement.h"
112#include "V8HTMLHtmlElement.h"
113#include "V8HTMLIFrameElement.h"
114#include "V8HTMLImageElement.h"
115#include "V8HTMLImageElementConstructor.h"
116#include "V8HTMLInputElement.h"
117#include "V8HTMLIsIndexElement.h"
118#include "V8HTMLLabelElement.h"
119#include "V8HTMLLegendElement.h"
120#include "V8HTMLLIElement.h"
121#include "V8HTMLLinkElement.h"
122#include "V8HTMLMapElement.h"
123#include "V8HTMLMarqueeElement.h"
124#include "V8HTMLMenuElement.h"
125#include "V8HTMLMetaElement.h"
126#include "V8HTMLObjectElement.h"
127#include "V8HTMLOListElement.h"
128#include "V8HTMLOptGroupElement.h"
129#include "V8HTMLOptionElement.h"
130#include "V8HTMLOptionElementConstructor.h"
131#include "V8HTMLParagraphElement.h"
132#include "V8HTMLParamElement.h"
133#include "V8HTMLPreElement.h"
134#include "V8HTMLQuoteElement.h"
135#include "V8HTMLScriptElement.h"
136#include "V8HTMLSelectElement.h"
137#include "V8HTMLStyleElement.h"
138#include "V8HTMLTableCaptionElement.h"
139#include "V8HTMLTableColElement.h"
140#include "V8HTMLTableElement.h"
141#include "V8HTMLTableSectionElement.h"
142#include "V8HTMLTableCellElement.h"
143#include "V8HTMLTableRowElement.h"
144#include "V8HTMLTextAreaElement.h"
145#include "V8HTMLTitleElement.h"
146#include "V8HTMLUListElement.h"
147#include "V8ImageData.h"
148#include "V8Media.h"
149#include "V8MediaList.h"
150#include "V8MessageChannel.h"
151#include "V8MessageEvent.h"
152#include "V8MessagePort.h"
153#include "V8NamedNodeMap.h"
154#include "V8Node.h"
155#include "V8NodeList.h"
156#include "V8NodeFilter.h"
157#include "V8Notation.h"
158#include "V8PopStateEvent.h"
159#include "V8ProcessingInstruction.h"
160#include "V8ProgressEvent.h"
161#include "V8StyleSheet.h"
162#include "V8Text.h"
163#include "V8TextEvent.h"
164#include "V8Touch.h"
165#include "V8TouchEvent.h"
166#include "V8TouchList.h"
167#include "V8DOMCoreException.h"
168#include "V8DOMParser.h"
169#include "V8DOMWindow.h"
170#include "V8ErrorEvent.h"
171#include "V8Event.h"
172#include "V8EventException.h"
173#include "V8KeyboardEvent.h"
174#include "V8MouseEvent.h"
175#include "V8ValidityState.h"
176#include "V8WebKitAnimationEvent.h"
177#include "V8WebKitCSSKeyframeRule.h"
178#include "V8WebKitCSSKeyframesRule.h"
179#include "V8WebKitCSSMatrix.h"
180#include "V8WebKitCSSTransformValue.h"
181#include "V8WebKitPoint.h"
182#include "V8WebKitTransitionEvent.h"
183#include "V8WheelEvent.h"
184#include "V8UIEvent.h"
185#include "V8MutationEvent.h"
186#include "V8OverflowEvent.h"
187#include "V8Location.h"
188#include "V8Screen.h"
189#include "V8DOMSelection.h"
190#include "V8Navigator.h"
191#include "V8MimeType.h"
192#include "V8MimeTypeArray.h"
193#include "V8PageTransitionEvent.h"
194#include "V8Plugin.h"
195#include "V8PluginArray.h"
196#include "V8Range.h"
197#include "V8RangeException.h"
198#include "V8Rect.h"
199#include "V8NodeIterator.h"
200#include "V8TextMetrics.h"
201#include "V8TreeWalker.h"
202#include "V8StyleSheetList.h"
203#include "V8DOMImplementation.h"
204#include "V8XMLHttpRequest.h"
205#include "V8XMLHttpRequestException.h"
206#include "V8XMLHttpRequestProgressEvent.h"
207#include "V8XMLHttpRequestUpload.h"
208#include "V8XMLSerializer.h"
209#include "V8RGBColor.h"
210
211#if ENABLE(OFFLINE_WEB_APPLICATIONS)
212#include "V8DOMApplicationCache.h"
213#endif
214
215#if ENABLE(DOM_STORAGE)
216#include "V8Storage.h"
217#include "V8StorageEvent.h"
218#endif
219
220#if ENABLE(SVG_ANIMATION)
221#include "V8SVGAnimateColorElement.h"
222#include "V8SVGAnimateElement.h"
223#include "V8SVGAnimateTransformElement.h"
224#include "V8SVGAnimationElement.h"
225#include "V8SVGSetElement.h"
226#endif
227
228#if ENABLE(SVG) && ENABLE(FILTERS)
229#include "V8SVGComponentTransferFunctionElement.h"
230#include "V8SVGFEBlendElement.h"
231#include "V8SVGFEColorMatrixElement.h"
232#include "V8SVGFEComponentTransferElement.h"
233#include "V8SVGFECompositeElement.h"
234#include "V8SVGFEDiffuseLightingElement.h"
235#include "V8SVGFEDisplacementMapElement.h"
236#include "V8SVGFEDistantLightElement.h"
237#include "V8SVGFEFloodElement.h"
238#include "V8SVGFEFuncAElement.h"
239#include "V8SVGFEFuncBElement.h"
240#include "V8SVGFEFuncGElement.h"
241#include "V8SVGFEFuncRElement.h"
242#include "V8SVGFEGaussianBlurElement.h"
243#include "V8SVGFEImageElement.h"
244#include "V8SVGFEMergeElement.h"
245#include "V8SVGFEMergeNodeElement.h"
246#include "V8SVGFEMorphologyElement.h"
247#include "V8SVGFEOffsetElement.h"
248#include "V8SVGFEPointLightElement.h"
249#include "V8SVGFESpecularLightingElement.h"
250#include "V8SVGFESpotLightElement.h"
251#include "V8SVGFETileElement.h"
252#include "V8SVGFETurbulenceElement.h"
253#include "V8SVGFilterElement.h"
254#endif
255
256#if ENABLE(SVG_FONTS)
257#include "V8SVGFontElement.h"
258#include "V8SVGFontFaceElement.h"
259#include "V8SVGFontFaceFormatElement.h"
260#include "V8SVGFontFaceNameElement.h"
261#include "V8SVGFontFaceSrcElement.h"
262#include "V8SVGFontFaceUriElement.h"
263#include "V8SVGMissingGlyphElement.h"
264#endif
265
266#if ENABLE(SVG_FOREIGN_OBJECT)
267#include "V8SVGForeignObjectElement.h"
268#endif
269
270#if ENABLE(SVG_USE)
271#include "V8SVGUseElement.h"
272#endif
273
274#if ENABLE(SVG)
275#include "V8SVGAElement.h"
276#include "V8SVGAltGlyphElement.h"
277#include "V8SVGCircleElement.h"
278#include "V8SVGClipPathElement.h"
279#include "V8SVGCursorElement.h"
280#include "V8SVGDefsElement.h"
281#include "V8SVGDescElement.h"
282#include "V8SVGElement.h"
283#include "V8SVGEllipseElement.h"
284#include "V8SVGException.h"
285#include "V8SVGGElement.h"
286#include "V8SVGGlyphElement.h"
287#include "V8SVGGradientElement.h"
288#include "V8SVGImageElement.h"
289#include "V8SVGLinearGradientElement.h"
290#include "V8SVGLineElement.h"
291#include "V8SVGMarkerElement.h"
292#include "V8SVGMaskElement.h"
293#include "V8SVGMetadataElement.h"
294#include "V8SVGPathElement.h"
295#include "V8SVGPatternElement.h"
296#include "V8SVGPolygonElement.h"
297#include "V8SVGPolylineElement.h"
298#include "V8SVGRadialGradientElement.h"
299#include "V8SVGRectElement.h"
300#include "V8SVGScriptElement.h"
301#include "V8SVGStopElement.h"
302#include "V8SVGStyleElement.h"
303#include "V8SVGSVGElement.h"
304#include "V8SVGSwitchElement.h"
305#include "V8SVGSymbolElement.h"
306#include "V8SVGTextContentElement.h"
307#include "V8SVGTextElement.h"
308#include "V8SVGTextPathElement.h"
309#include "V8SVGTextPositioningElement.h"
310#include "V8SVGTitleElement.h"
311#include "V8SVGTRefElement.h"
312#include "V8SVGTSpanElement.h"
313#include "V8SVGViewElement.h"
314#include "V8SVGAngle.h"
315#include "V8SVGAnimatedAngle.h"
316#include "V8SVGAnimatedBoolean.h"
317#include "V8SVGAnimatedEnumeration.h"
318#include "V8SVGAnimatedInteger.h"
319#include "V8SVGAnimatedLength.h"
320#include "V8SVGAnimatedLengthList.h"
321#include "V8SVGAnimatedNumber.h"
322#include "V8SVGAnimatedNumberList.h"
323#include "V8SVGAnimatedPoints.h"
324#include "V8SVGAnimatedPreserveAspectRatio.h"
325#include "V8SVGAnimatedRect.h"
326#include "V8SVGAnimatedString.h"
327#include "V8SVGAnimatedTransformList.h"
328#include "V8SVGColor.h"
329#include "V8SVGDocument.h"
330#include "V8SVGElementInstance.h"
331#include "V8SVGElementInstanceList.h"
332#include "V8SVGLength.h"
333#include "V8SVGLengthList.h"
334#include "V8SVGMatrix.h"
335#include "V8SVGNumber.h"
336#include "V8SVGNumberList.h"
337#include "V8SVGPaint.h"
338#include "V8SVGPathSeg.h"
339#include "V8SVGPathSegArcAbs.h"
340#include "V8SVGPathSegArcRel.h"
341#include "V8SVGPathSegClosePath.h"
342#include "V8SVGPathSegCurvetoCubicAbs.h"
343#include "V8SVGPathSegCurvetoCubicRel.h"
344#include "V8SVGPathSegCurvetoCubicSmoothAbs.h"
345#include "V8SVGPathSegCurvetoCubicSmoothRel.h"
346#include "V8SVGPathSegCurvetoQuadraticAbs.h"
347#include "V8SVGPathSegCurvetoQuadraticRel.h"
348#include "V8SVGPathSegCurvetoQuadraticSmoothAbs.h"
349#include "V8SVGPathSegCurvetoQuadraticSmoothRel.h"
350#include "V8SVGPathSegLinetoAbs.h"
351#include "V8SVGPathSegLinetoHorizontalAbs.h"
352#include "V8SVGPathSegLinetoHorizontalRel.h"
353#include "V8SVGPathSegLinetoRel.h"
354#include "V8SVGPathSegLinetoVerticalAbs.h"
355#include "V8SVGPathSegLinetoVerticalRel.h"
356#include "V8SVGPathSegList.h"
357#include "V8SVGPathSegMovetoAbs.h"
358#include "V8SVGPathSegMovetoRel.h"
359#include "V8SVGPoint.h"
360#include "V8SVGPointList.h"
361#include "V8SVGPreserveAspectRatio.h"
362#include "V8SVGRect.h"
363#include "V8SVGRenderingIntent.h"
364#include "V8SVGStringList.h"
365#include "V8SVGTransform.h"
366#include "V8SVGTransformList.h"
367#include "V8SVGUnitTypes.h"
368#include "V8SVGZoomEvent.h"
369#endif
370
371#if ENABLE(VIDEO)
372#include "V8HTMLAudioElement.h"
373#include "V8HTMLAudioElementConstructor.h"
374#include "V8HTMLMediaElement.h"
375#include "V8HTMLSourceElement.h"
376#include "V8HTMLVideoElement.h"
377#include "V8MediaError.h"
378#include "V8TimeRanges.h"
379#endif
380
381#if ENABLE(WEB_SOCKETS)
382#include "V8WebSocket.h"
383#endif
384
385#if ENABLE(WORKERS)
386#include "V8AbstractWorker.h"
387#include "V8DedicatedWorkerContext.h"
388#include "V8Worker.h"
389#include "V8WorkerContext.h"
390#include "V8WorkerLocation.h"
391#include "V8WorkerNavigator.h"
392#endif
393
394#if ENABLE(NOTIFICATIONS)
395#include "V8Notification.h"
396#include "V8NotificationCenter.h"
397#endif
398
399#if ENABLE(SHARED_WORKERS)
400#include "V8SharedWorker.h"
401#include "V8SharedWorkerContext.h"
402#endif
403
404#if ENABLE(3D_CANVAS)
405#include "V8WebGLRenderingContext.h"
406#include "V8WebGLArrayBuffer.h"
407#include "V8WebGLArray.h"
408#include "V8WebGLByteArray.h"
409#include "V8WebGLBuffer.h"
410#include "V8WebGLContextAttributes.h"
411#include "V8WebGLFloatArray.h"
412#include "V8WebGLFramebuffer.h"
413#include "V8WebGLIntArray.h"
414#include "V8WebGLProgram.h"
415#include "V8WebGLRenderbuffer.h"
416#include "V8WebGLShader.h"
417#include "V8WebGLShortArray.h"
418#include "V8WebGLTexture.h"
419#include "V8WebGLUniformLocation.h"
420#include "V8WebGLUnsignedByteArray.h"
421#include "V8WebGLUnsignedIntArray.h"
422#include "V8WebGLUnsignedShortArray.h"
423#endif
424
425#if ENABLE(DATABASE)
426#include "V8Database.h"
427#include "V8SQLError.h"
428#include "V8SQLResultSet.h"
429#include "V8SQLResultSetRowList.h"
430#include "V8SQLTransaction.h"
431#endif
432
433#if ENABLE(INDEXED_DATABASE)
434#include "V8IDBDatabaseError.h"
435#include "V8IDBDatabaseException.h"
436#include "V8IDBRequest.h"
437#include "V8IndexedDatabaseRequest.h"
438#endif
439
440#if ENABLE(XPATH)
441#include "V8XPathResult.h"
442#include "V8XPathException.h"
443#include "V8XPathExpression.h"
444#include "V8XPathNSResolver.h"
445#include "V8XPathEvaluator.h"
446#endif
447
448#if ENABLE(XSLT)
449#include "V8XSLTProcessor.h"
450#endif
451
452#if ENABLE(INSPECTOR)
453#include "V8InjectedScriptHost.h"
454#include "V8InspectorBackend.h"
455#include "V8InspectorFrontendHost.h"
456#endif
457
458#if ENABLE(EVENTSOURCE)
459#include "V8EventSource.h"
460#endif
461
462// Geolocation
463#include "V8Coordinates.h"
464#include "V8Geolocation.h"
465#include "V8Geoposition.h"
466#include "V8PositionError.h"
467
468#if PLATFORM(ANDROID)
469// Temporary modification - will not be upstreamed
470#include "V8Connection.h"
471#endif  // PLATFORM(ANDROID)
472
473namespace WebCore {
474
475v8::Persistent<v8::FunctionTemplate> V8ClassIndex::getTemplate(V8WrapperType type)
476{
477    switch (type) {
478#define MAKE_CASE(type, name)\
479    case V8ClassIndex::type: return V8##name::GetTemplate();
480    WRAPPER_TYPES(MAKE_CASE)
481#undef MAKE_CASE
482    default:
483        ASSERT_NOT_REACHED();
484        return v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New());
485  }
486}
487
488}  // namespace WebCore