Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 284863002: Add type maps from blink name to html name (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use implementation name Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « sdk/lib/_blink/dartium/_blink_dartium.dart ('k') | sdk/lib/indexed_db/dartium/indexed_db_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 33f066392fb0a915843fa7520b7399d85b56c693..54fcf5e474668dbe81557ee265ae2a6a60b4565e 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -108,24 +108,374 @@ Future<Isolate> spawnDomUri(Uri uri, List<String> args, message) {
// TODO(17738): Plumb arguments and return value through.
return _Utils.spawnDomUri(uri.toString());
}
-// FIXME: This should be generated.
-const _typeMap = const {
- 'EventTarget': EventTarget,
- 'Window': Window,
- 'Element': Element,
+// FIXME: Can we make this private?
+const htmlBlinkMap = const {
+ 'AbstractWorker': AbstractWorker,
+ 'Algorithm': Algorithm,
+ 'Animation': Animation,
+ 'ApplicationCache': ApplicationCache,
+ 'Attr': _Attr,
+ 'AutocompleteErrorEvent': AutocompleteErrorEvent,
+ 'BarProp': BarProp,
+ 'BeforeLoadEvent': BeforeLoadEvent,
+ 'BeforeUnloadEvent': BeforeUnloadEvent,
+ 'Blob': Blob,
+ 'CDATASection': CDataSection,
+ 'CSS': Css,
+ 'CSSCharsetRule': CssCharsetRule,
+ 'CSSFontFaceLoadEvent': CssFontFaceLoadEvent,
+ 'CSSFontFaceRule': CssFontFaceRule,
+ 'CSSImportRule': CssImportRule,
+ 'CSSKeyframeRule': CssKeyframeRule,
+ 'CSSKeyframesRule': CssKeyframesRule,
+ 'CSSMediaRule': CssMediaRule,
+ 'CSSPageRule': CssPageRule,
+ 'CSSPrimitiveValue': _CSSPrimitiveValue,
+ 'CSSRule': CssRule,
+ 'CSSRuleList': _CssRuleList,
+ 'CSSStyleDeclaration': CssStyleDeclaration,
+ 'CSSStyleRule': CssStyleRule,
+ 'CSSStyleSheet': CssStyleSheet,
+ 'CSSSupportsRule': CssSupportsRule,
+ 'CSSUnknownRule': _CSSUnknownRule,
+ 'CSSValue': _CSSValue,
+ 'CSSValueList': _CssValueList,
+ 'CSSViewportRule': CssViewportRule,
+ 'Canvas2DContextAttributes': Canvas2DContextAttributes,
+ 'CanvasGradient': CanvasGradient,
+ 'CanvasPattern': CanvasPattern,
+ 'CanvasRenderingContext': CanvasRenderingContext,
+ 'CanvasRenderingContext2D': CanvasRenderingContext2D,
+ 'CharacterData': CharacterData,
+ 'ChildNode': ChildNode,
+ 'ClientRect': _ClientRect,
+ 'ClientRectList': _ClientRectList,
+ 'Clipboard': DataTransfer,
+ 'CloseEvent': CloseEvent,
+ 'Comment': Comment,
+ 'CompositionEvent': CompositionEvent,
'Console': Console,
- 'Node': Node,
+ 'ConsoleBase': ConsoleBase,
+ 'Coordinates': Coordinates,
+ 'Counter': _Counter,
+ 'Crypto': Crypto,
+ 'CustomEvent': CustomEvent,
+ 'DOMError': DomError,
+ 'DOMException': DomException,
+ 'DOMFileSystem': FileSystem,
+ 'DOMFileSystemSync': _DOMFileSystemSync,
+ 'DOMImplementation': DomImplementation,
+ 'DOMParser': DomParser,
+ 'DOMSettableTokenList': DomSettableTokenList,
+ 'DOMStringList': DomStringList,
+ 'DOMStringMap': DomStringMap,
+ 'DOMTokenList': DomTokenList,
+ 'DataTransferItem': DataTransferItem,
+ 'DataTransferItemList': DataTransferItemList,
+ 'DatabaseSync': _DatabaseSync,
+ 'DedicatedWorkerGlobalScope': DedicatedWorkerGlobalScope,
+ 'DeprecatedStorageInfo': DeprecatedStorageInfo,
+ 'DeprecatedStorageQuota': DeprecatedStorageQuota,
+ 'DeviceAcceleration': DeviceAcceleration,
+ 'DeviceMotionEvent': DeviceMotionEvent,
+ 'DeviceOrientationEvent': DeviceOrientationEvent,
+ 'DeviceRotationRate': DeviceRotationRate,
+ 'DirectoryEntry': DirectoryEntry,
+ 'DirectoryEntrySync': _DirectoryEntrySync,
+ 'DirectoryReader': DirectoryReader,
+ 'DirectoryReaderSync': _DirectoryReaderSync,
'Document': Document,
- 'HTMLElement': HtmlElement,
+ 'DocumentFragment': DocumentFragment,
+ 'DocumentType': _DocumentType,
+ 'Element': Element,
+ 'Entry': Entry,
+ 'EntrySync': _EntrySync,
+ 'ErrorEvent': ErrorEvent,
+ 'Event': Event,
+ 'EventSource': EventSource,
+ 'EventTarget': EventTarget,
+ 'File': File,
+ 'FileEntry': FileEntry,
+ 'FileEntrySync': _FileEntrySync,
+ 'FileError': FileError,
+ 'FileList': FileList,
+ 'FileReader': FileReader,
+ 'FileReaderSync': _FileReaderSync,
+ 'FileWriter': FileWriter,
+ 'FileWriterSync': _FileWriterSync,
+ 'FocusEvent': FocusEvent,
+ 'FontFace': FontFace,
+ 'FontFaceSet': FontFaceSet,
+ 'FormData': FormData,
+ 'Gamepad': Gamepad,
+ 'GamepadList': _GamepadList,
+ 'Geolocation': Geolocation,
+ 'Geoposition': Geoposition,
+ 'GlobalEventHandlers': GlobalEventHandlers,
+ 'HTMLAllCollection': _HTMLAllCollection,
+ 'HTMLAnchorElement': AnchorElement,
+ 'HTMLAppletElement': _HTMLAppletElement,
+ 'HTMLAreaElement': AreaElement,
+ 'HTMLAudioElement': AudioElement,
+ 'HTMLBRElement': BRElement,
+ 'HTMLBaseElement': BaseElement,
+ 'HTMLBodyElement': BodyElement,
+ 'HTMLButtonElement': ButtonElement,
'HTMLCanvasElement': CanvasElement,
+ 'HTMLCollection': HtmlCollection,
+ 'HTMLContentElement': ContentElement,
+ 'HTMLDListElement': DListElement,
+ 'HTMLDataListElement': DataListElement,
+ 'HTMLDetailsElement': DetailsElement,
+ 'HTMLDialogElement': DialogElement,
+ 'HTMLDirectoryElement': _HTMLDirectoryElement,
+ 'HTMLDivElement': DivElement,
'HTMLDocument': HtmlDocument,
-};
+ 'HTMLElement': HtmlElement,
+ 'HTMLEmbedElement': EmbedElement,
+ 'HTMLFieldSetElement': FieldSetElement,
+ 'HTMLFontElement': _HTMLFontElement,
+ 'HTMLFormControlsCollection': HtmlFormControlsCollection,
+ 'HTMLFormElement': FormElement,
+ 'HTMLFrameElement': _HTMLFrameElement,
+ 'HTMLFrameSetElement': _HTMLFrameSetElement,
+ 'HTMLHRElement': HRElement,
+ 'HTMLHeadElement': HeadElement,
+ 'HTMLHeadingElement': HeadingElement,
+ 'HTMLHtmlElement': HtmlHtmlElement,
+ 'HTMLIFrameElement': IFrameElement,
+ 'HTMLImageElement': ImageElement,
+ 'HTMLInputElement': InputElement,
+ 'HTMLKeygenElement': KeygenElement,
+ 'HTMLLIElement': LIElement,
+ 'HTMLLabelElement': LabelElement,
+ 'HTMLLegendElement': LegendElement,
+ 'HTMLLinkElement': LinkElement,
+ 'HTMLMapElement': MapElement,
+ 'HTMLMarqueeElement': _HTMLMarqueeElement,
+ 'HTMLMediaElement': MediaElement,
+ 'HTMLMenuElement': MenuElement,
+ 'HTMLMetaElement': MetaElement,
+ 'HTMLMeterElement': MeterElement,
+ 'HTMLModElement': ModElement,
+ 'HTMLOListElement': OListElement,
+ 'HTMLObjectElement': ObjectElement,
+ 'HTMLOptGroupElement': OptGroupElement,
+ 'HTMLOptionElement': OptionElement,
+ 'HTMLOptionsCollection': HtmlOptionsCollection,
+ 'HTMLOutputElement': OutputElement,
+ 'HTMLParagraphElement': ParagraphElement,
+ 'HTMLParamElement': ParamElement,
+ 'HTMLPreElement': PreElement,
+ 'HTMLProgressElement': ProgressElement,
+ 'HTMLQuoteElement': QuoteElement,
+ 'HTMLScriptElement': ScriptElement,
+ 'HTMLSelectElement': SelectElement,
+ 'HTMLShadowElement': ShadowElement,
+ 'HTMLSourceElement': SourceElement,
+ 'HTMLSpanElement': SpanElement,
+ 'HTMLStyleElement': StyleElement,
+ 'HTMLTableCaptionElement': TableCaptionElement,
+ 'HTMLTableCellElement': TableCellElement,
+ 'HTMLTableColElement': TableColElement,
+ 'HTMLTableElement': TableElement,
+ 'HTMLTableRowElement': TableRowElement,
+ 'HTMLTableSectionElement': TableSectionElement,
+ 'HTMLTemplateElement': TemplateElement,
+ 'HTMLTextAreaElement': TextAreaElement,
+ 'HTMLTitleElement': TitleElement,
+ 'HTMLTrackElement': TrackElement,
+ 'HTMLUListElement': UListElement,
+ 'HTMLUnknownElement': UnknownElement,
+ 'HTMLVideoElement': VideoElement,
+ 'HashChangeEvent': HashChangeEvent,
+ 'History': History,
+ 'ImageBitmap': ImageBitmap,
+ 'ImageData': ImageData,
+ 'InputMethodContext': InputMethodContext,
+ 'InstallEvent': InstallEvent,
+ 'InstallPhaseEvent': InstallPhaseEvent,
+ 'Key': CryptoKey,
+ 'KeyPair': KeyPair,
+ 'KeyboardEvent': KeyboardEvent,
+ 'Location': Location,
+ 'MIDIAccess': MidiAccess,
+ 'MIDIAccessPromise': MidiAccessPromise,
+ 'MIDIConnectionEvent': MidiConnectionEvent,
+ 'MIDIInput': MidiInput,
+ 'MIDIMessageEvent': MidiMessageEvent,
+ 'MIDIOutput': MidiOutput,
+ 'MIDIPort': MidiPort,
+ 'MediaController': MediaController,
+ 'MediaError': MediaError,
+ 'MediaKeyError': MediaKeyError,
+ 'MediaKeyEvent': MediaKeyEvent,
+ 'MediaKeyMessageEvent': MediaKeyMessageEvent,
+ 'MediaKeyNeededEvent': MediaKeyNeededEvent,
+ 'MediaKeySession': MediaKeySession,
+ 'MediaKeys': MediaKeys,
+ 'MediaList': MediaList,
+ 'MediaQueryList': MediaQueryList,
+ 'MediaSource': MediaSource,
+ 'MediaStream': MediaStream,
+ 'MediaStreamEvent': MediaStreamEvent,
+ 'MediaStreamTrack': MediaStreamTrack,
+ 'MediaStreamTrackEvent': MediaStreamTrackEvent,
+ 'MemoryInfo': MemoryInfo,
+ 'MessageChannel': MessageChannel,
+ 'MessageEvent': MessageEvent,
+ 'MessagePort': MessagePort,
+ 'Metadata': Metadata,
+ 'MimeType': MimeType,
+ 'MimeTypeArray': MimeTypeArray,
+ 'MouseEvent': MouseEvent,
+ 'MutationEvent': _MutationEvent,
+ 'MutationObserver': MutationObserver,
+ 'MutationRecord': MutationRecord,
+ 'NamedNodeMap': _NamedNodeMap,
+ 'Navigator': Navigator,
+ 'NavigatorID': NavigatorID,
+ 'NavigatorOnLine': NavigatorOnLine,
+ 'NavigatorUserMediaError': NavigatorUserMediaError,
+ 'Node': Node,
+ 'NodeFilter': NodeFilter,
+ 'NodeIterator': NodeIterator,
+ 'NodeList': NodeList,
+ 'Notation': _Notation,
+ 'Notification': Notification,
+ 'NotificationCenter': _NotificationCenter,
+ 'OverflowEvent': OverflowEvent,
+ 'PagePopupController': _PagePopupController,
+ 'PageTransitionEvent': PageTransitionEvent,
+ 'ParentNode': ParentNode,
+ 'Path': Path,
+ 'Performance': Performance,
+ 'PerformanceEntry': PerformanceEntry,
+ 'PerformanceMark': PerformanceMark,
+ 'PerformanceMeasure': PerformanceMeasure,
+ 'PerformanceNavigation': PerformanceNavigation,
+ 'PerformanceResourceTiming': PerformanceResourceTiming,
+ 'PerformanceTiming': PerformanceTiming,
+ 'Player': Player,
+ 'Plugin': Plugin,
+ 'PluginArray': PluginArray,
+ 'PopStateEvent': PopStateEvent,
+ 'PositionError': PositionError,
+ 'ProcessingInstruction': ProcessingInstruction,
+ 'ProgressEvent': ProgressEvent,
+ 'RGBColor': _RGBColor,
+ 'RTCDTMFSender': RtcDtmfSender,
+ 'RTCDTMFToneChangeEvent': RtcDtmfToneChangeEvent,
+ 'RTCDataChannel': RtcDataChannel,
+ 'RTCDataChannelEvent': RtcDataChannelEvent,
+ 'RTCIceCandidate': RtcIceCandidate,
+ 'RTCIceCandidateEvent': RtcIceCandidateEvent,
+ 'RTCPeerConnection': RtcPeerConnection,
+ 'RTCSessionDescription': RtcSessionDescription,
+ 'RTCStatsReport': RtcStatsReport,
+ 'RTCStatsResponse': RtcStatsResponse,
+ 'RadioNodeList': _RadioNodeList,
+ 'Range': Range,
+ 'Rect': _Rect,
+ 'ResourceProgressEvent': ResourceProgressEvent,
+ 'Screen': Screen,
+ 'SecurityPolicyViolationEvent': SecurityPolicyViolationEvent,
+ 'Selection': Selection,
+ 'ServiceWorker': _ServiceWorker,
+ 'ServiceWorkerContainer': ServiceWorkerContainer,
+ 'ServiceWorkerGlobalScope': ServiceWorkerGlobalScope,
+ 'ShadowRoot': ShadowRoot,
+ 'SharedWorker': SharedWorker,
+ 'SharedWorkerGlobalScope': SharedWorkerGlobalScope,
+ 'SourceBuffer': SourceBuffer,
+ 'SourceBufferList': SourceBufferList,
+ 'SourceInfo': SourceInfo,
+ 'SpeechGrammar': SpeechGrammar,
+ 'SpeechGrammarList': SpeechGrammarList,
+ 'SpeechInputEvent': SpeechInputEvent,
+ 'SpeechInputResult': SpeechInputResult,
+ 'SpeechInputResultList': _SpeechInputResultList,
+ 'SpeechRecognition': SpeechRecognition,
+ 'SpeechRecognitionAlternative': SpeechRecognitionAlternative,
+ 'SpeechRecognitionError': SpeechRecognitionError,
+ 'SpeechRecognitionEvent': SpeechRecognitionEvent,
+ 'SpeechRecognitionResult': SpeechRecognitionResult,
+ 'SpeechRecognitionResultList': _SpeechRecognitionResultList,
+ 'SpeechSynthesis': SpeechSynthesis,
+ 'SpeechSynthesisEvent': SpeechSynthesisEvent,
+ 'SpeechSynthesisUtterance': SpeechSynthesisUtterance,
+ 'SpeechSynthesisVoice': SpeechSynthesisVoice,
+ 'Storage': Storage,
+ 'StorageEvent': StorageEvent,
+ 'StorageInfo': StorageInfo,
+ 'StorageQuota': StorageQuota,
+ 'Stream': FileStream,
+ 'StyleMedia': StyleMedia,
+ 'StyleSheet': StyleSheet,
+ 'StyleSheetList': _StyleSheetList,
+ 'SubtleCrypto': _SubtleCrypto,
+ 'Text': Text,
+ 'TextEvent': TextEvent,
+ 'TextMetrics': TextMetrics,
+ 'TextTrack': TextTrack,
+ 'TextTrackCue': TextTrackCue,
+ 'TextTrackCueList': TextTrackCueList,
+ 'TextTrackList': TextTrackList,
+ 'TimeRanges': TimeRanges,
+ 'TimedItem': TimedItem,
+ 'Timeline': Timeline,
+ 'Timing': Timing,
+ 'Touch': Touch,
+ 'TouchEvent': TouchEvent,
+ 'TouchList': TouchList,
+ 'TrackEvent': TrackEvent,
+ 'TransitionEvent': TransitionEvent,
+ 'TreeWalker': TreeWalker,
+ 'UIEvent': UIEvent,
+ 'URL': Url,
+ 'URLUtils': UrlUtils,
+ 'URLUtilsReadOnly': UrlUtilsReadOnly,
+ 'VTTCue': VttCue,
+ 'VTTRegion': VttRegion,
+ 'VTTRegionList': VttRegionList,
+ 'ValidityState': ValidityState,
+ 'VideoPlaybackQuality': VideoPlaybackQuality,
+ 'WebKitAnimationEvent': AnimationEvent,
+ 'WebKitCSSFilterRule': CssFilterRule,
+ 'WebKitCSSFilterValue': _WebKitCSSFilterValue,
+ 'WebKitCSSMatrix': _WebKitCSSMatrix,
+ 'WebKitCSSTransformValue': _WebKitCSSTransformValue,
+ 'WebKitMediaSource': _WebKitMediaSource,
+ 'WebKitNotification': _WebKitNotification,
+ 'WebKitPoint': _DomPoint,
+ 'WebKitSourceBuffer': _WebKitSourceBuffer,
+ 'WebKitSourceBufferList': _WebKitSourceBufferList,
+ 'WebSocket': WebSocket,
+ 'WheelEvent': WheelEvent,
+ 'Window': Window,
+ 'WindowBase64': WindowBase64,
+ 'WindowEventHandlers': WindowEventHandlers,
+ 'WindowTimers': _WindowTimers,
+ 'Worker': Worker,
+ 'WorkerConsole': WorkerConsole,
+ 'WorkerCrypto': WorkerCrypto,
+ 'WorkerGlobalScope': WorkerGlobalScope,
+ 'WorkerLocation': _WorkerLocation,
+ 'WorkerNavigator': _WorkerNavigator,
+ 'WorkerPerformance': WorkerPerformance,
+ 'XMLDocument': XmlDocument,
+ 'XMLHttpRequest': HttpRequest,
+ 'XMLHttpRequestEventTarget': HttpRequestEventTarget,
+ 'XMLHttpRequestProgressEvent': _XMLHttpRequestProgressEvent,
+ 'XMLHttpRequestUpload': HttpRequestUpload,
+ 'XMLSerializer': XmlSerializer,
+ 'XPathEvaluator': XPathEvaluator,
+ 'XPathExpression': XPathExpression,
+ 'XPathNSResolver': XPathNSResolver,
+ 'XPathResult': XPathResult,
+ 'XSLTProcessor': XsltProcessor,
-Type _getType(String key) {
- if (!_typeMap.containsKey(key))
- return null;
- return _typeMap[key];
-}
+};
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
« no previous file with comments | « sdk/lib/_blink/dartium/_blink_dartium.dart ('k') | sdk/lib/indexed_db/dartium/indexed_db_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698