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

Side by Side Diff: lib/html/frog/html_frog.dart

Issue 9732019: dart:html perf optimization based on runing Dromaeo benchmarks (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes Created 8 years, 9 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:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #library('html'); 1 #library('html');
2 2
3 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 3 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4 // for details. All rights reserved. Use of this source code is governed by a 4 // for details. All rights reserved. Use of this source code is governed by a
5 // BSD-style license that can be found in the LICENSE file. 5 // BSD-style license that can be found in the LICENSE file.
6 6
7 // DO NOT EDIT 7 // DO NOT EDIT
8 // Auto-generated dart:html library. 8 // Auto-generated dart:html library.
9 9
10 10
11 11
12 12
13 13
14 _WindowImpl _cachedWindow;
15 _DocumentImpl _cachedDocument;
16 14
17 void _init() { 15 Window get window() native "return window;";
18 _cachedDocument = _document;
19 _cachedWindow = _window;
20 // Feature detect that dart:dom and dart:html are not both loaded by
21 // checking for the presence of a bug that manifests itself when both
22 // libraries are loaded.
23 // TODO(jacobr): remove this code once b/1911 is fixed and the frog compiler
24 // is changed to generate compile time errors if two libraries that define
25 // the same native types in conflicting ways are imported.
26 var element = new Element.tag('body');
27 element.innerHTML = 'f';
28 if (element.text == '') {
29 _cachedWindow.console.error(
30 'Cannot import dart:html and dart:dom within the same application.');
31 throw new UnsupportedOperationException(
32 'Cannot import dart:html and dart:dom within the same application.');
33 }
34 }
35
36 Window get window() {
37 if (_cachedWindow == null) {
38 _init();
39 }
40 return _cachedWindow;
41 }
42
43 _WindowImpl get _window() native "return window;"; 16 _WindowImpl get _window() native "return window;";
44 17
45 Document get document() { 18 Document get document() native "return document;";
46 if (_cachedDocument == null) {
47 _init();
48 }
49 return _cachedDocument;
50 }
51 19
52 _DocumentImpl get _document() native "return window.document.documentElement;"; 20 _DocumentImpl get _document() native "return document;";
53 21
54 // Workaround for tags like <cite> that lack their own Element subclass -- 22 // Workaround for tags like <cite> that lack their own Element subclass --
55 // Dart issue 1990. 23 // Dart issue 1990.
56 class _HTMLElementImpl extends _ElementImpl native "*HTMLElement" { 24 class _HTMLElementImpl extends _ElementImpl native "*HTMLElement" {
57 } 25 }
58 26
59 class _AbstractWorkerImpl extends _EventTargetImpl implements AbstractWorker nat ive "*AbstractWorker" { 27 class _AbstractWorkerImpl extends _EventTargetImpl implements AbstractWorker nat ive "*AbstractWorker" {
60 28
61 _AbstractWorkerEventsImpl get on() => 29 _AbstractWorkerEventsImpl get on() =>
62 new _AbstractWorkerEventsImpl(this); 30 new _AbstractWorkerEventsImpl(this);
63 31
64 void _addEventListener(String type, EventListener listener, [bool useCapture = null]) native "this.addEventListener(type, listener, useCapture);"; 32 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re = null]) native "this.addEventListener(type, listener, useCapture);";
65 33
66 bool _dispatchEvent(_EventImpl evt) native "return this.dispatchEvent(evt);"; 34 bool $dom_dispatchEvent(_EventImpl evt) native "return this.dispatchEvent(evt) ;";
67 35
68 void _removeEventListener(String type, EventListener listener, [bool useCaptur e = null]) native "this.removeEventListener(type, listener, useCapture);"; 36 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture = null]) native "this.removeEventListener(type, listener, useCapture);";
69 } 37 }
70 38
71 class _AbstractWorkerEventsImpl extends _EventsImpl implements AbstractWorkerEve nts { 39 class _AbstractWorkerEventsImpl extends _EventsImpl implements AbstractWorkerEve nts {
72 _AbstractWorkerEventsImpl(_ptr) : super(_ptr); 40 _AbstractWorkerEventsImpl(_ptr) : super(_ptr);
73 41
74 EventListenerList get error() => _get('error'); 42 EventListenerList get error() => _get('error');
75 } 43 }
76 44
77 class _AnchorElementImpl extends _ElementImpl implements AnchorElement native "* HTMLAnchorElement" { 45 class _AnchorElementImpl extends _ElementImpl implements AnchorElement native "* HTMLAnchorElement" {
78 46
(...skipping 4121 matching lines...) Expand 10 before | Expand all | Expand 10 after
4200 static final int OBSOLETE = 5; 4168 static final int OBSOLETE = 5;
4201 4169
4202 static final int UNCACHED = 0; 4170 static final int UNCACHED = 0;
4203 4171
4204 static final int UPDATEREADY = 4; 4172 static final int UPDATEREADY = 4;
4205 4173
4206 final int status; 4174 final int status;
4207 4175
4208 void abort() native; 4176 void abort() native;
4209 4177
4210 void _addEventListener(String type, EventListener listener, [bool useCapture = null]) native "this.addEventListener(type, listener, useCapture);"; 4178 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re = null]) native "this.addEventListener(type, listener, useCapture);";
4211 4179
4212 bool _dispatchEvent(_EventImpl evt) native "return this.dispatchEvent(evt);"; 4180 bool $dom_dispatchEvent(_EventImpl evt) native "return this.dispatchEvent(evt) ;";
4213 4181
4214 void _removeEventListener(String type, EventListener listener, [bool useCaptur e = null]) native "this.removeEventListener(type, listener, useCapture);"; 4182 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture = null]) native "this.removeEventListener(type, listener, useCapture);";
4215 4183
4216 void swapCache() native; 4184 void swapCache() native;
4217 4185
4218 void update() native; 4186 void update() native;
4219 } 4187 }
4220 4188
4221 class _DOMApplicationCacheEventsImpl extends _EventsImpl implements DOMApplicati onCacheEvents { 4189 class _DOMApplicationCacheEventsImpl extends _EventsImpl implements DOMApplicati onCacheEvents {
4222 _DOMApplicationCacheEventsImpl(_ptr) : super(_ptr); 4190 _DOMApplicationCacheEventsImpl(_ptr) : super(_ptr);
4223 4191
4224 EventListenerList get cached() => _get('cached'); 4192 EventListenerList get cached() => _get('cached');
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
4315 4283
4316 class _DOMFormDataImpl implements DOMFormData native "*DOMFormData" { 4284 class _DOMFormDataImpl implements DOMFormData native "*DOMFormData" {
4317 4285
4318 void append(String name, String value, String filename) native; 4286 void append(String name, String value, String filename) native;
4319 } 4287 }
4320 4288
4321 class _DOMImplementationImpl implements DOMImplementation native "*DOMImplementa tion" { 4289 class _DOMImplementationImpl implements DOMImplementation native "*DOMImplementa tion" {
4322 4290
4323 _CSSStyleSheetImpl createCSSStyleSheet(String title, String media) native; 4291 _CSSStyleSheetImpl createCSSStyleSheet(String title, String media) native;
4324 4292
4325 _DocumentImpl createDocument(String namespaceURI, String qualifiedName, _Docum entTypeImpl doctype) => _FixHtmlDocumentReference(_createDocument(namespaceURI, qualifiedName, doctype)); 4293 _DocumentImpl createDocument(String namespaceURI, String qualifiedName, _Docum entTypeImpl doctype) native;
4326
4327 _EventTargetImpl _createDocument(String namespaceURI, String qualifiedName, _D ocumentTypeImpl doctype) native "return this.createDocument(namespaceURI, qualif iedName, doctype);";
4328 4294
4329 _DocumentTypeImpl createDocumentType(String qualifiedName, String publicId, St ring systemId) native; 4295 _DocumentTypeImpl createDocumentType(String qualifiedName, String publicId, St ring systemId) native;
4330 4296
4331 _DocumentImpl createHTMLDocument(String title) => _FixHtmlDocumentReference(_c reateHTMLDocument(title)); 4297 _DocumentImpl createHTMLDocument(String title) native;
4332
4333 _EventTargetImpl _createHTMLDocument(String title) native "return this.createH TMLDocument(title);";
4334 4298
4335 bool hasFeature(String feature, String version) native; 4299 bool hasFeature(String feature, String version) native;
4336 } 4300 }
4337 4301
4338 class _DOMMimeTypeImpl implements DOMMimeType native "*DOMMimeType" { 4302 class _DOMMimeTypeImpl implements DOMMimeType native "*DOMMimeType" {
4339 4303
4340 final String description; 4304 final String description;
4341 4305
4342 final _DOMPluginImpl enabledPlugin; 4306 final _DOMPluginImpl enabledPlugin;
4343 4307
4344 final String suffixes; 4308 final String suffixes;
4345 4309
4346 final String type; 4310 final String type;
4347 } 4311 }
4348 4312
4349 class _DOMMimeTypeArrayImpl implements DOMMimeTypeArray native "*DOMMimeTypeArra y" { 4313 class _DOMMimeTypeArrayImpl implements DOMMimeTypeArray native "*DOMMimeTypeArra y" {
4350 4314
4351 final int length; 4315 final int length;
4352 4316
4353 _DOMMimeTypeImpl item(int index) native; 4317 _DOMMimeTypeImpl item(int index) native;
4354 4318
4355 _DOMMimeTypeImpl namedItem(String name) native; 4319 _DOMMimeTypeImpl namedItem(String name) native;
4356 } 4320 }
4357 4321
4358 class _DOMParserImpl implements DOMParser native "*DOMParser" { 4322 class _DOMParserImpl implements DOMParser native "*DOMParser" {
4359 4323
4360 _DocumentImpl parseFromString(String str, String contentType) => _FixHtmlDocum entReference(_parseFromString(str, contentType)); 4324 _DocumentImpl parseFromString(String str, String contentType) native;
4361
4362 _EventTargetImpl _parseFromString(String str, String contentType) native "retu rn this.parseFromString(str, contentType);";
4363 } 4325 }
4364 4326
4365 class _DOMPluginImpl implements DOMPlugin native "*DOMPlugin" { 4327 class _DOMPluginImpl implements DOMPlugin native "*DOMPlugin" {
4366 4328
4367 final String description; 4329 final String description;
4368 4330
4369 final String filename; 4331 final String filename;
4370 4332
4371 final int length; 4333 final int length;
4372 4334
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
4673 } 4635 }
4674 4636
4675 class _DivElementImpl extends _ElementImpl implements DivElement native "*HTMLDi vElement" { 4637 class _DivElementImpl extends _ElementImpl implements DivElement native "*HTMLDi vElement" {
4676 4638
4677 String align; 4639 String align;
4678 } 4640 }
4679 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 4641 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4680 // for details. All rights reserved. Use of this source code is governed by a 4642 // for details. All rights reserved. Use of this source code is governed by a
4681 // BSD-style license that can be found in the LICENSE file. 4643 // BSD-style license that can be found in the LICENSE file.
4682 4644
4683 class _DocumentImpl extends _ElementImpl 4645 class _DocumentImpl extends _NodeImpl
4684 implements Document 4646 implements Document
4685 native "*HTMLHtmlElement" { 4647 native "*HTMLDocument"
4648 {
4649
4686 4650
4687 _DocumentEventsImpl get on() => 4651 _DocumentEventsImpl get on() =>
4688 new _DocumentEventsImpl(_jsDocument); 4652 new _DocumentEventsImpl(this);
4689 4653
4690 _ElementImpl get activeElement() native "return this.parentNode.activeElement; "; 4654 final _ElementImpl activeElement;
4691 4655
4692 _ElementImpl get body() native "return this.parentNode.body;"; 4656 _ElementImpl body;
4693 4657
4694 void set body(_ElementImpl value) native "this.parentNode.body = value;"; 4658 String charset;
4695 4659
4696 String get charset() native "return this.parentNode.charset;"; 4660 String cookie;
4697 4661
4698 void set charset(String value) native "this.parentNode.charset = value;"; 4662 _WindowImpl get window() native "return this.defaultView;";
4699 4663
4700 String get cookie() native "return this.parentNode.cookie;"; 4664 final _ElementImpl documentElement;
4701 4665
4702 void set cookie(String value) native "this.parentNode.cookie = value;"; 4666 final String domain;
4703 4667
4704 _WindowImpl get window() native "return this.parentNode.defaultView;"; 4668 final _HeadElementImpl head;
4705 4669
4706 String get domain() native "return this.parentNode.domain;"; 4670 final String lastModified;
4707 4671
4708 _HeadElementImpl get head() native "return this.parentNode.head;"; 4672 final String preferredStylesheetSet;
4709 4673
4710 String get lastModified() native "return this.parentNode.lastModified;"; 4674 final String readyState;
4711 4675
4712 String get preferredStylesheetSet() native "return this.parentNode.preferredSt ylesheetSet;"; 4676 final String referrer;
4713 4677
4714 String get readyState() native "return this.parentNode.readyState;"; 4678 String selectedStylesheetSet;
4715 4679
4716 String get referrer() native "return this.parentNode.referrer;"; 4680 final _StyleSheetListImpl styleSheets;
4717 4681
4718 String get selectedStylesheetSet() native "return this.parentNode.selectedStyl esheetSet;"; 4682 String title;
4719 4683
4720 void set selectedStylesheetSet(String value) native "this.parentNode.selectedS tylesheetSet = value;"; 4684 final _ElementImpl webkitCurrentFullScreenElement;
4721 4685
4722 _StyleSheetListImpl get styleSheets() native "return this.parentNode.styleShee ts;"; 4686 final bool webkitFullScreenKeyboardInputAllowed;
4723 4687
4724 String get title() native "return this.parentNode.title;"; 4688 final _ElementImpl webkitFullscreenElement;
4725 4689
4726 void set title(String value) native "this.parentNode.title = value;"; 4690 final bool webkitFullscreenEnabled;
4727 4691
4728 _ElementImpl get webkitCurrentFullScreenElement() native "return this.parentNo de.webkitCurrentFullScreenElement;"; 4692 final bool webkitHidden;
4729 4693
4730 bool get webkitFullScreenKeyboardInputAllowed() native "return this.parentNode .webkitFullScreenKeyboardInputAllowed;"; 4694 final bool webkitIsFullScreen;
4731 4695
4732 _ElementImpl get webkitFullscreenElement() native "return this.parentNode.webk itFullscreenElement;"; 4696 final String webkitVisibilityState;
4733 4697
4734 bool get webkitFullscreenEnabled() native "return this.parentNode.webkitFullsc reenEnabled;"; 4698 _RangeImpl caretRangeFromPoint(int x, int y) native;
4735 4699
4736 bool get webkitHidden() native "return this.parentNode.webkitHidden;"; 4700 _CDATASectionImpl createCDATASection(String data) native;
4737 4701
4738 bool get webkitIsFullScreen() native "return this.parentNode.webkitIsFullScree n;"; 4702 _DocumentFragmentImpl createDocumentFragment() native;
4739 4703
4740 String get webkitVisibilityState() native "return this.parentNode.webkitVisibi lityState;"; 4704 _ElementImpl $dom_createElement(String tagName) native "return this.createElem ent(tagName);";
4741 4705
4742 _RangeImpl caretRangeFromPoint(int x, int y) native "return this.parentNode.ca retRangeFromPoint(x, y);"; 4706 _ElementImpl $dom_createElementNS(String namespaceURI, String qualifiedName) n ative "return this.createElementNS(namespaceURI, qualifiedName);";
4743 4707
4744 _CDATASectionImpl createCDATASection(String data) native "return this.parentNo de.createCDATASection(data);"; 4708 _EventImpl $dom_createEvent(String eventType) native "return this.createEvent( eventType);";
4745 4709
4746 _DocumentFragmentImpl createDocumentFragment() native "return this.parentNode. createDocumentFragment();"; 4710 _RangeImpl createRange() native;
4747 4711
4748 _ElementImpl _createElement(String tagName) native "return this.parentNode.cre ateElement(tagName);"; 4712 _TextImpl $dom_createTextNode(String data) native "return this.createTextNode( data);";
4749 4713
4750 _ElementImpl _createElementNS(String namespaceURI, String qualifiedName) nativ e "return this.parentNode.createElementNS(namespaceURI, qualifiedName);"; 4714 _TouchImpl createTouch(_WindowImpl window, _EventTargetImpl target, int identi fier, int pageX, int pageY, int screenX, int screenY, int webkitRadiusX, int web kitRadiusY, num webkitRotationAngle, num webkitForce) native;
4751 4715
4752 _EventImpl _createEvent(String eventType) native "return this.parentNode.creat eEvent(eventType);"; 4716 _TouchListImpl $dom_createTouchList() native "return this.createTouchList();";
4753 4717
4754 _RangeImpl createRange() native "return this.parentNode.createRange();"; 4718 _ElementImpl elementFromPoint(int x, int y) native;
4755 4719
4756 _TextImpl _createTextNode(String data) native "return this.parentNode.createTe xtNode(data);"; 4720 bool execCommand(String command, bool userInterface, String value) native;
4757 4721
4758 _TouchImpl createTouch(_WindowImpl window, _EventTargetImpl target, int identi fier, int pageX, int pageY, int screenX, int screenY, int webkitRadiusX, int web kitRadiusY, num webkitRotationAngle, num webkitForce) native "return this.parent Node.createTouch(window, target, identifier, pageX, pageY, screenX, screenY, web kitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce);"; 4722 _CanvasRenderingContextImpl getCSSCanvasContext(String contextId, String name, int width, int height) native;
4759 4723
4760 _TouchListImpl _createTouchList() native "return this.parentNode.createTouchLi st();"; 4724 _ElementImpl $dom_getElementById(String elementId) native "return this.getElem entById(elementId);";
4761 4725
4762 _ElementImpl elementFromPoint(int x, int y) native "return this.parentNode.ele mentFromPoint(x, y);"; 4726 _NodeListImpl $dom_getElementsByClassName(String tagname) native "return this. getElementsByClassName(tagname);";
4763 4727
4764 bool execCommand(String command, bool userInterface, String value) native "ret urn this.parentNode.execCommand(command, userInterface, value);"; 4728 _NodeListImpl $dom_getElementsByName(String elementName) native "return this.g etElementsByName(elementName);";
4765 4729
4766 _CanvasRenderingContextImpl getCSSCanvasContext(String contextId, String name, int width, int height) native "return this.parentNode.getCSSCanvasContext(conte xtId, name, width, height);"; 4730 _NodeListImpl $dom_getElementsByTagName(String tagname) native "return this.ge tElementsByTagName(tagname);";
4767 4731
4768 bool queryCommandEnabled(String command) native "return this.parentNode.queryC ommandEnabled(command);"; 4732 bool queryCommandEnabled(String command) native;
4769 4733
4770 bool queryCommandIndeterm(String command) native "return this.parentNode.query CommandIndeterm(command);"; 4734 bool queryCommandIndeterm(String command) native;
4771 4735
4772 bool queryCommandState(String command) native "return this.parentNode.queryCom mandState(command);"; 4736 bool queryCommandState(String command) native;
4773 4737
4774 bool queryCommandSupported(String command) native "return this.parentNode.quer yCommandSupported(command);"; 4738 bool queryCommandSupported(String command) native;
4775 4739
4776 String queryCommandValue(String command) native "return this.parentNode.queryC ommandValue(command);"; 4740 String queryCommandValue(String command) native;
4777 4741
4778 void webkitCancelFullScreen() native "this.parentNode.webkitCancelFullScreen() ;"; 4742 _ElementImpl _query(String selectors) native "return this.querySelector(select ors);";
4779 4743
4780 void webkitExitFullscreen() native "this.parentNode.webkitExitFullscreen();"; 4744 _NodeListImpl $dom_querySelectorAll(String selectors) native "return this.quer ySelectorAll(selectors);";
4781 4745
4782 _WebKitNamedFlowImpl webkitGetFlowByName(String name) native "return this.pare ntNode.webkitGetFlowByName(name);"; 4746 void webkitCancelFullScreen() native;
4783 4747
4748 void webkitExitFullscreen() native;
4784 4749
4785 // For efficiency and simplicity, we always use the HtmlElement as the 4750 _WebKitNamedFlowImpl webkitGetFlowByName(String name) native;
4786 // Document but sometimes internally we need the real JS document object.
4787 _NodeImpl get _jsDocument() native "return this.parentNode;";
4788 4751
4789 // The document doesn't have a parent element. 4752 // TODO(jacobr): implement all Element methods not on Document.
4790 _ElementImpl get parent() => null;
4791 }
4792 4753
4793 // This class should not be externally visible. If a user ever gets access to 4754 _ElementImpl query(String selectors) {
4794 // a _SecretHtmlDocumentImpl object that is a bug. This object is hidden by 4755 // It is fine for our RegExp to detect element id query selectors to have
4795 // adding checks to all methods that could an HTMLDocument. We believe that 4756 // false negatives but not false positives.
4796 // list is limited to Event.target, and HTMLHtmlElement.parent. 4757 if (const RegExp("^#[_a-zA-Z]\\w*\$").hasMatch(selectors)) {
4797 class _SecretHtmlDocumentImpl extends _NodeImpl implements Node 4758 return $dom_getElementById(selectors.substring(1));
4798 native "*HTMLDocument" { 4759 }
4799 _DocumentImpl get _documentElement() native "return this.documentElement;"; 4760 return $dom_querySelector(selectors);
4800 } 4761 }
4801 4762
4802 EventTarget _FixHtmlDocumentReference(EventTarget eventTarget) { 4763 // TODO(jacobr): autogenerate this method.
4803 if (eventTarget is _SecretHtmlDocumentImpl) { 4764 _ElementImpl $dom_querySelector(String selectors) native "return this.querySel ector(selectors);";
4804 _SecretHtmlDocumentImpl secretDocument = eventTarget; 4765
4805 return secretDocument._documentElement; 4766 ElementList queryAll(String selectors) {
4806 } else { 4767 if (const RegExp("""^\\[name=["'][^'"]+['"]\\]\$""").hasMatch(selectors)) {
4807 return eventTarget; 4768 final mutableMatches = $dom_getElementsByName(
4769 selectors.substring(7,selectors.length - 2));
4770 int len = mutableMatches.length;
4771 final copyOfMatches = new List<Element>(len);
4772 for (int i = 0; i < len; ++i) {
4773 copyOfMatches[i] = mutableMatches[i];
4774 }
4775 return new _FrozenElementList._wrap(copyOfMatches);
4776 } else if (const RegExp("^[*a-zA-Z0-9]+\$").hasMatch(selectors)) {
4777 final mutableMatches = $dom_getElementsByTagName(selectors);
4778 int len = mutableMatches.length;
4779 final copyOfMatches = new List<Element>(len);
4780 for (int i = 0; i < len; ++i) {
4781 copyOfMatches[i] = mutableMatches[i];
4782 }
4783 return new _FrozenElementList._wrap(copyOfMatches);
4784 } else {
4785 return new _FrozenElementList._wrap($dom_querySelectorAll(selectors));
4786 }
4808 } 4787 }
4809 } 4788 }
4810 4789
4811 class _DocumentEventsImpl extends _ElementEventsImpl implements DocumentEvents { 4790 class _DocumentEventsImpl extends _ElementEventsImpl implements DocumentEvents {
4812 _DocumentEventsImpl(_ptr) : super(_ptr); 4791 _DocumentEventsImpl(_ptr) : super(_ptr);
4813 4792
4814 EventListenerList get abort() => _get('abort'); 4793 EventListenerList get abort() => _get('abort');
4815 4794
4816 EventListenerList get beforeCopy() => _get('beforecopy'); 4795 EventListenerList get beforeCopy() => _get('beforecopy');
4817 4796
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
5046 // TODO: The type of value should be Collection<Element>. See http://b/5392897 5025 // TODO: The type of value should be Collection<Element>. See http://b/5392897
5047 void set elements(value) { 5026 void set elements(value) {
5048 // Copy list first since we don't want liveness during iteration. 5027 // Copy list first since we don't want liveness during iteration.
5049 List copy = new List.from(value); 5028 List copy = new List.from(value);
5050 final elements = this.elements; 5029 final elements = this.elements;
5051 elements.clear(); 5030 elements.clear();
5052 elements.addAll(copy); 5031 elements.addAll(copy);
5053 } 5032 }
5054 5033
5055 ElementList queryAll(String selectors) => 5034 ElementList queryAll(String selectors) =>
5056 new _FrozenElementList._wrap(_querySelectorAll(selectors)); 5035 new _FrozenElementList._wrap($dom_querySelectorAll(selectors));
5057 5036
5058 String get innerHTML() { 5037 String get innerHTML() {
5059 final e = new Element.tag("div"); 5038 final e = new Element.tag("div");
5060 e.nodes.add(this.clone(true)); 5039 e.nodes.add(this.clone(true));
5061 return e.innerHTML; 5040 return e.innerHTML;
5062 } 5041 }
5063 5042
5064 String get outerHTML() => innerHTML; 5043 String get outerHTML() => innerHTML;
5065 5044
5066 // TODO(nweiz): Do we want to support some variant of innerHTML for XML and/or 5045 // TODO(nweiz): Do we want to support some variant of innerHTML for XML and/or
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
5115 bool get draggable() => false; 5094 bool get draggable() => false;
5116 bool get hidden() => false; 5095 bool get hidden() => false;
5117 bool get spellcheck() => false; 5096 bool get spellcheck() => false;
5118 bool get translate() => false; 5097 bool get translate() => false;
5119 int get tabIndex() => -1; 5098 int get tabIndex() => -1;
5120 String get id() => ""; 5099 String get id() => "";
5121 String get title() => ""; 5100 String get title() => "";
5122 String get tagName() => ""; 5101 String get tagName() => "";
5123 String get webkitdropzone() => ""; 5102 String get webkitdropzone() => "";
5124 String get webkitRegionOverflow() => ""; 5103 String get webkitRegionOverflow() => "";
5125 Element get firstElementChild() => elements.first(); 5104 Element get $dom_firstElementChild() => elements.first();
5126 Element get lastElementChild() => elements.last(); 5105 Element get $dom_lastElementChild() => elements.last();
5127 Element get nextElementSibling() => null; 5106 Element get nextElementSibling() => null;
5128 Element get previousElementSibling() => null; 5107 Element get previousElementSibling() => null;
5129 Element get offsetParent() => null; 5108 Element get offsetParent() => null;
5130 Element get parent() => null; 5109 Element get parent() => null;
5131 Map<String, String> get attributes() => const {}; 5110 Map<String, String> get attributes() => const {};
5132 // Issue 174: this should be a const set. 5111 // Issue 174: this should be a const set.
5133 Set<String> get classes() => new Set<String>(); 5112 Set<String> get classes() => new Set<String>();
5134 Map<String, String> get dataAttributes() => const {}; 5113 Map<String, String> get dataAttributes() => const {};
5135 CSSStyleDeclaration get style() => new Element.tag('div').style; 5114 CSSStyleDeclaration get style() => new Element.tag('div').style;
5136 Future<CSSStyleDeclaration> get computedStyle() => 5115 Future<CSSStyleDeclaration> get computedStyle() =>
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
5246 throw new UnsupportedOperationException( 5225 throw new UnsupportedOperationException(
5247 "WebKit region overflow can't be set for document fragments."); 5226 "WebKit region overflow can't be set for document fragments.");
5248 } 5227 }
5249 5228
5250 5229
5251 _ElementEventsImpl get on() => 5230 _ElementEventsImpl get on() =>
5252 new _ElementEventsImpl(this); 5231 new _ElementEventsImpl(this);
5253 5232
5254 _ElementImpl query(String selectors) native "return this.querySelector(selecto rs);"; 5233 _ElementImpl query(String selectors) native "return this.querySelector(selecto rs);";
5255 5234
5256 _NodeListImpl _querySelectorAll(String selectors) native "return this.querySel ectorAll(selectors);"; 5235 _NodeListImpl $dom_querySelectorAll(String selectors) native "return this.quer ySelectorAll(selectors);";
5257 5236
5258 } 5237 }
5259 5238
5260 class _DocumentTypeImpl extends _NodeImpl implements DocumentType native "*Docum entType" { 5239 class _DocumentTypeImpl extends _NodeImpl implements DocumentType native "*Docum entType" {
5261 5240
5262 final _NamedNodeMapImpl entities; 5241 final _NamedNodeMapImpl entities;
5263 5242
5264 final String internalSubset; 5243 final String internalSubset;
5265 5244
5266 final String name; 5245 final String name;
(...skipping 27 matching lines...) Expand all
5294 // BSD-style license that can be found in the LICENSE file. 5273 // BSD-style license that can be found in the LICENSE file.
5295 5274
5296 // TODO(jacobr): use _Lists.dart to remove some of the duplicated 5275 // TODO(jacobr): use _Lists.dart to remove some of the duplicated
5297 // functionality. 5276 // functionality.
5298 class _ChildrenElementList implements ElementList { 5277 class _ChildrenElementList implements ElementList {
5299 // Raw Element. 5278 // Raw Element.
5300 final _ElementImpl _element; 5279 final _ElementImpl _element;
5301 final _HTMLCollectionImpl _childElements; 5280 final _HTMLCollectionImpl _childElements;
5302 5281
5303 _ChildrenElementList._wrap(_ElementImpl element) 5282 _ChildrenElementList._wrap(_ElementImpl element)
5304 : _childElements = element._children, 5283 : _childElements = element.$dom_children,
5305 _element = element; 5284 _element = element;
5306 5285
5307 List<Element> _toList() { 5286 List<Element> _toList() {
5308 final output = new List(_childElements.length); 5287 final output = new List(_childElements.length);
5309 for (int i = 0, len = _childElements.length; i < len; i++) { 5288 for (int i = 0, len = _childElements.length; i < len; i++) {
5310 output[i] = _childElements[i]; 5289 output[i] = _childElements[i];
5311 } 5290 }
5312 return output; 5291 return output;
5313 } 5292 }
5314 5293
5315 _ElementImpl get first() { 5294 _ElementImpl get first() {
5316 return _element._firstElementChild; 5295 return _element.$dom_firstElementChild;
5317 } 5296 }
5318 5297
5319 void forEach(void f(Element element)) { 5298 void forEach(void f(Element element)) {
5320 for (_ElementImpl element in _childElements) { 5299 for (_ElementImpl element in _childElements) {
5321 f(element); 5300 f(element);
5322 } 5301 }
5323 } 5302 }
5324 5303
5325 ElementList filter(bool f(Element element)) { 5304 ElementList filter(bool f(Element element)) {
5326 final output = <Element>[]; 5305 final output = <Element>[];
(...skipping 25 matching lines...) Expand all
5352 5331
5353 Collection map(f(Element element)) { 5332 Collection map(f(Element element)) {
5354 final out = []; 5333 final out = [];
5355 for (Element el in this) { 5334 for (Element el in this) {
5356 out.add(f(el)); 5335 out.add(f(el));
5357 } 5336 }
5358 return out; 5337 return out;
5359 } 5338 }
5360 5339
5361 bool isEmpty() { 5340 bool isEmpty() {
5362 return _element._firstElementChild == null; 5341 return _element.$dom_firstElementChild == null;
5363 } 5342 }
5364 5343
5365 int get length() { 5344 int get length() {
5366 return _childElements.length; 5345 return _childElements.length;
5367 } 5346 }
5368 5347
5369 _ElementImpl operator [](int index) { 5348 _ElementImpl operator [](int index) {
5370 return _childElements[index]; 5349 return _childElements[index];
5371 } 5350 }
5372 5351
5373 void operator []=(int index, _ElementImpl value) { 5352 void operator []=(int index, _ElementImpl value) {
5374 _element._replaceChild(value, _childElements[index]); 5353 _element.$dom_replaceChild(value, _childElements[index]);
5375 } 5354 }
5376 5355
5377 void set length(int newLength) { 5356 void set length(int newLength) {
5378 // TODO(jacobr): remove children when length is reduced. 5357 // TODO(jacobr): remove children when length is reduced.
5379 throw const UnsupportedOperationException(''); 5358 throw const UnsupportedOperationException('');
5380 } 5359 }
5381 5360
5382 Element add(_ElementImpl value) { 5361 Element add(_ElementImpl value) {
5383 _element._appendChild(value); 5362 _element.$dom_appendChild(value);
5384 return value; 5363 return value;
5385 } 5364 }
5386 5365
5387 Element addLast(_ElementImpl value) => add(value); 5366 Element addLast(_ElementImpl value) => add(value);
5388 5367
5389 Iterator<Element> iterator() => _toList().iterator(); 5368 Iterator<Element> iterator() => _toList().iterator();
5390 5369
5391 void addAll(Collection<Element> collection) { 5370 void addAll(Collection<Element> collection) {
5392 for (_ElementImpl element in collection) { 5371 for (_ElementImpl element in collection) {
5393 _element._appendChild(element); 5372 _element.$dom_appendChild(element);
5394 } 5373 }
5395 } 5374 }
5396 5375
5397 void sort(int compare(Element a, Element b)) { 5376 void sort(int compare(Element a, Element b)) {
5398 throw const UnsupportedOperationException('TODO(jacobr): should we impl?'); 5377 throw const UnsupportedOperationException('TODO(jacobr): should we impl?');
5399 } 5378 }
5400 5379
5401 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) { 5380 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
5402 throw 'Not impl yet. todo(jacobr)'; 5381 throw 'Not impl yet. todo(jacobr)';
5403 } 5382 }
(...skipping 24 matching lines...) Expand all
5428 } 5407 }
5429 5408
5430 void clear() { 5409 void clear() {
5431 // It is unclear if we want to keep non element nodes? 5410 // It is unclear if we want to keep non element nodes?
5432 _element.text = ''; 5411 _element.text = '';
5433 } 5412 }
5434 5413
5435 Element removeLast() { 5414 Element removeLast() {
5436 final last = this.last(); 5415 final last = this.last();
5437 if (last != null) { 5416 if (last != null) {
5438 _element._removeChild(last); 5417 _element.$dom_removeChild(last);
5439 } 5418 }
5440 return last; 5419 return last;
5441 } 5420 }
5442 5421
5443 Element last() { 5422 Element last() {
5444 return _element.lastElementChild; 5423 return _element.$dom_lastElementChild;
5445 } 5424 }
5446 } 5425 }
5447 5426
5448 // TODO(jacobr): this is an inefficient implementation but it is hard to see 5427 // TODO(jacobr): this is an inefficient implementation but it is hard to see
5449 // a better option given that we cannot quite force NodeList to be an 5428 // a better option given that we cannot quite force NodeList to be an
5450 // ElementList as there are valid cases where a NodeList JavaScript object 5429 // ElementList as there are valid cases where a NodeList JavaScript object
5451 // contains Node objects that are not Elements. 5430 // contains Node objects that are not Elements.
5452 class _FrozenElementList implements ElementList { 5431 class _FrozenElementList implements ElementList {
5453 final List<Node> _nodeList; 5432 final List<Node> _nodeList;
5454 5433
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
5596 new _ElementList(super.getRange(start, length)); 5575 new _ElementList(super.getRange(start, length));
5597 } 5576 }
5598 5577
5599 class ElementAttributeMap implements Map<String, String> { 5578 class ElementAttributeMap implements Map<String, String> {
5600 5579
5601 final _ElementImpl _element; 5580 final _ElementImpl _element;
5602 5581
5603 ElementAttributeMap._wrap(this._element); 5582 ElementAttributeMap._wrap(this._element);
5604 5583
5605 bool containsValue(String value) { 5584 bool containsValue(String value) {
5606 final attributes = _element._attributes; 5585 final attributes = _element.$dom_attributes;
5607 for (int i = 0, len = attributes.length; i < len; i++) { 5586 for (int i = 0, len = attributes.length; i < len; i++) {
5608 if(value == attributes[i].value) { 5587 if(value == attributes[i].value) {
5609 return true; 5588 return true;
5610 } 5589 }
5611 } 5590 }
5612 return false; 5591 return false;
5613 } 5592 }
5614 5593
5615 bool containsKey(String key) { 5594 bool containsKey(String key) {
5616 return _element._hasAttribute(key); 5595 return _element.$dom_hasAttribute(key);
5617 } 5596 }
5618 5597
5619 String operator [](String key) { 5598 String operator [](String key) {
5620 return _element._getAttribute(key); 5599 return _element.$dom_getAttribute(key);
5621 } 5600 }
5622 5601
5623 void operator []=(String key, String value) { 5602 void operator []=(String key, String value) {
5624 _element._setAttribute(key, value); 5603 _element.$dom_setAttribute(key, value);
5625 } 5604 }
5626 5605
5627 String putIfAbsent(String key, String ifAbsent()) { 5606 String putIfAbsent(String key, String ifAbsent()) {
5628 if (!containsKey(key)) { 5607 if (!containsKey(key)) {
5629 this[key] = ifAbsent(); 5608 this[key] = ifAbsent();
5630 } 5609 }
5631 } 5610 }
5632 5611
5633 String remove(String key) { 5612 String remove(String key) {
5634 _element._removeAttribute(key); 5613 _element.$dom_removeAttribute(key);
5635 } 5614 }
5636 5615
5637 void clear() { 5616 void clear() {
5638 final attributes = _element._attributes; 5617 final attributes = _element.$dom_attributes;
5639 for (int i = attributes.length - 1; i >= 0; i--) { 5618 for (int i = attributes.length - 1; i >= 0; i--) {
5640 remove(attributes[i].name); 5619 remove(attributes[i].name);
5641 } 5620 }
5642 } 5621 }
5643 5622
5644 void forEach(void f(String key, String value)) { 5623 void forEach(void f(String key, String value)) {
5645 final attributes = _element._attributes; 5624 final attributes = _element.$dom_attributes;
5646 for (int i = 0, len = attributes.length; i < len; i++) { 5625 for (int i = 0, len = attributes.length; i < len; i++) {
5647 final item = attributes[i]; 5626 final item = attributes[i];
5648 f(item.name, item.value); 5627 f(item.name, item.value);
5649 } 5628 }
5650 } 5629 }
5651 5630
5652 Collection<String> getKeys() { 5631 Collection<String> getKeys() {
5653 // TODO(jacobr): generate a lazy collection instead. 5632 // TODO(jacobr): generate a lazy collection instead.
5654 final attributes = _element._attributes; 5633 final attributes = _element.$dom_attributes;
5655 final keys = new List<String>(attributes.length); 5634 final keys = new List<String>(attributes.length);
5656 for (int i = 0, len = attributes.length; i < len; i++) { 5635 for (int i = 0, len = attributes.length; i < len; i++) {
5657 keys[i] = attributes[i].name; 5636 keys[i] = attributes[i].name;
5658 } 5637 }
5659 return keys; 5638 return keys;
5660 } 5639 }
5661 5640
5662 Collection<String> getValues() { 5641 Collection<String> getValues() {
5663 // TODO(jacobr): generate a lazy collection instead. 5642 // TODO(jacobr): generate a lazy collection instead.
5664 final attributes = _element._attributes; 5643 final attributes = _element.$dom_attributes;
5665 final values = new List<String>(attributes.length); 5644 final values = new List<String>(attributes.length);
5666 for (int i = 0, len = attributes.length; i < len; i++) { 5645 for (int i = 0, len = attributes.length; i < len; i++) {
5667 values[i] = attributes[i].value; 5646 values[i] = attributes[i].value;
5668 } 5647 }
5669 return values; 5648 return values;
5670 } 5649 }
5671 5650
5672 /** 5651 /**
5673 * The number of {key, value} pairs in the map. 5652 * The number of {key, value} pairs in the map.
5674 */ 5653 */
5675 int get length() { 5654 int get length() {
5676 return _element._attributes.length; 5655 return _element.$dom_attributes.length;
5677 } 5656 }
5678 5657
5679 /** 5658 /**
5680 * Returns true if there is no {key, value} pair in the map. 5659 * Returns true if there is no {key, value} pair in the map.
5681 */ 5660 */
5682 bool isEmpty() { 5661 bool isEmpty() {
5683 return length == 0; 5662 return length == 0;
5684 } 5663 }
5685 } 5664 }
5686 5665
(...skipping 26 matching lines...) Expand all
5713 final ClientRect client; 5692 final ClientRect client;
5714 final ClientRect offset; 5693 final ClientRect offset;
5715 final ClientRect scroll; 5694 final ClientRect scroll;
5716 5695
5717 // TODO(jacobr): should we move these outside of ElementRect to avoid the 5696 // TODO(jacobr): should we move these outside of ElementRect to avoid the
5718 // overhead of computing them every time even though they are rarely used. 5697 // overhead of computing them every time even though they are rarely used.
5719 final _ClientRectImpl _boundingClientRect; 5698 final _ClientRectImpl _boundingClientRect;
5720 final _ClientRectListImpl _clientRects; 5699 final _ClientRectListImpl _clientRects;
5721 5700
5722 _ElementRectImpl(_ElementImpl element) : 5701 _ElementRectImpl(_ElementImpl element) :
5723 client = new _SimpleClientRect(element._clientLeft, 5702 client = new _SimpleClientRect(element.$dom_clientLeft,
5724 element._clientTop, 5703 element.$dom_clientTop,
5725 element._clientWidth, 5704 element.$dom_clientWidth,
5726 element._clientHeight), 5705 element.$dom_clientHeight),
5727 offset = new _SimpleClientRect(element._offsetLeft, 5706 offset = new _SimpleClientRect(element.$dom_offsetLeft,
5728 element._offsetTop, 5707 element.$dom_offsetTop,
5729 element._offsetWidth, 5708 element.$dom_offsetWidth,
5730 element._offsetHeight), 5709 element.$dom_offsetHeight),
5731 scroll = new _SimpleClientRect(element._scrollLeft, 5710 scroll = new _SimpleClientRect(element.$dom_scrollLeft,
5732 element._scrollTop, 5711 element.$dom_scrollTop,
5733 element._scrollWidth, 5712 element.$dom_scrollWidth,
5734 element._scrollHeight), 5713 element.$dom_scrollHeight),
5735 _boundingClientRect = element._getBoundingClientRect(), 5714 _boundingClientRect = element.$dom_getBoundingClientRect(),
5736 _clientRects = element._getClientRects(); 5715 _clientRects = element.$dom_getClientRects();
5737 5716
5738 _ClientRectImpl get bounding() => _boundingClientRect; 5717 _ClientRectImpl get bounding() => _boundingClientRect;
5739 5718
5740 // TODO(jacobr): cleanup. 5719 // TODO(jacobr): cleanup.
5741 List<ClientRect> get clientRects() { 5720 List<ClientRect> get clientRects() {
5742 final out = new List(_clientRects.length); 5721 final out = new List(_clientRects.length);
5743 for (num i = 0; i < _clientRects.length; i++) { 5722 for (num i = 0; i < _clientRects.length; i++) {
5744 out[i] = _clientRects.item(i); 5723 out[i] = _clientRects.item(i);
5745 } 5724 }
5746 return out; 5725 return out;
(...skipping 28 matching lines...) Expand all
5775 5754
5776 void set elements(Collection<Element> value) { 5755 void set elements(Collection<Element> value) {
5777 final elements = this.elements; 5756 final elements = this.elements;
5778 elements.clear(); 5757 elements.clear();
5779 elements.addAll(value); 5758 elements.addAll(value);
5780 } 5759 }
5781 5760
5782 ElementList get elements() => new _ChildrenElementList._wrap(this); 5761 ElementList get elements() => new _ChildrenElementList._wrap(this);
5783 5762
5784 ElementList queryAll(String selectors) => 5763 ElementList queryAll(String selectors) =>
5785 new _FrozenElementList._wrap(_querySelectorAll(selectors)); 5764 new _FrozenElementList._wrap($dom_querySelectorAll(selectors));
5786 5765
5787 Set<String> get classes() { 5766 Set<String> get classes() {
5788 if (_cssClassSet === null) { 5767 if (_cssClassSet === null) {
5789 _cssClassSet = new _CssClassSet(this); 5768 _cssClassSet = new _CssClassSet(this);
5790 } 5769 }
5791 return _cssClassSet; 5770 return _cssClassSet;
5792 } 5771 }
5793 5772
5794 void set classes(Collection<String> value) { 5773 void set classes(Collection<String> value) {
5795 _CssClassSet classSet = classes; 5774 _CssClassSet classSet = classes;
(...skipping 22 matching lines...) Expand all
5818 new Completer<ElementRect>()); 5797 new Completer<ElementRect>());
5819 } 5798 }
5820 5799
5821 Future<CSSStyleDeclaration> get computedStyle() { 5800 Future<CSSStyleDeclaration> get computedStyle() {
5822 // TODO(jacobr): last param should be null, see b/5045788 5801 // TODO(jacobr): last param should be null, see b/5045788
5823 return getComputedStyle(''); 5802 return getComputedStyle('');
5824 } 5803 }
5825 5804
5826 Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement) { 5805 Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement) {
5827 return _createMeasurementFuture( 5806 return _createMeasurementFuture(
5828 () => _window._getComputedStyle(this, pseudoElement), 5807 () => _window.$dom_getComputedStyle(this, pseudoElement),
5829 new Completer<CSSStyleDeclaration>()); 5808 new Completer<CSSStyleDeclaration>());
5830 } 5809 }
5831 5810
5832 _ElementEventsImpl get on() => 5811 _ElementEventsImpl get on() =>
5833 new _ElementEventsImpl(this); 5812 new _ElementEventsImpl(this);
5834 5813
5835 static final int ALLOW_KEYBOARD_INPUT = 1; 5814 static final int ALLOW_KEYBOARD_INPUT = 1;
5836 5815
5837 int get _childElementCount() native "return this.childElementCount;"; 5816 int get $dom_childElementCount() native "return this.childElementCount;";
5838 5817
5839 _HTMLCollectionImpl get _children() native "return this.children;"; 5818 _HTMLCollectionImpl get $dom_children() native "return this.children;";
5840 5819
5841 String get _className() native "return this.className;"; 5820 String get $dom_className() native "return this.className;";
5842 5821
5843 void set _className(String value) native "this.className = value;"; 5822 void set $dom_className(String value) native "this.className = value;";
5844 5823
5845 int get _clientHeight() native "return this.clientHeight;"; 5824 int get $dom_clientHeight() native "return this.clientHeight;";
5846 5825
5847 int get _clientLeft() native "return this.clientLeft;"; 5826 int get $dom_clientLeft() native "return this.clientLeft;";
5848 5827
5849 int get _clientTop() native "return this.clientTop;"; 5828 int get $dom_clientTop() native "return this.clientTop;";
5850 5829
5851 int get _clientWidth() native "return this.clientWidth;"; 5830 int get $dom_clientWidth() native "return this.clientWidth;";
5852 5831
5853 String contentEditable; 5832 String contentEditable;
5854 5833
5855 String dir; 5834 String dir;
5856 5835
5857 bool draggable; 5836 bool draggable;
5858 5837
5859 _ElementImpl get _firstElementChild() native "return this.firstElementChild;"; 5838 _ElementImpl get $dom_firstElementChild() native "return this.firstElementChil d;";
5860 5839
5861 bool hidden; 5840 bool hidden;
5862 5841
5863 String id; 5842 String id;
5864 5843
5865 String innerHTML; 5844 String innerHTML;
5866 5845
5867 final bool isContentEditable; 5846 final bool isContentEditable;
5868 5847
5869 String lang; 5848 String lang;
5870 5849
5871 final _ElementImpl lastElementChild; 5850 _ElementImpl get $dom_lastElementChild() native "return this.lastElementChild; ";
5872 5851
5873 final _ElementImpl nextElementSibling; 5852 final _ElementImpl nextElementSibling;
5874 5853
5875 int get _offsetHeight() native "return this.offsetHeight;"; 5854 int get $dom_offsetHeight() native "return this.offsetHeight;";
5876 5855
5877 int get _offsetLeft() native "return this.offsetLeft;"; 5856 int get $dom_offsetLeft() native "return this.offsetLeft;";
5878 5857
5879 final _ElementImpl offsetParent; 5858 final _ElementImpl offsetParent;
5880 5859
5881 int get _offsetTop() native "return this.offsetTop;"; 5860 int get $dom_offsetTop() native "return this.offsetTop;";
5882 5861
5883 int get _offsetWidth() native "return this.offsetWidth;"; 5862 int get $dom_offsetWidth() native "return this.offsetWidth;";
5884 5863
5885 final String outerHTML; 5864 final String outerHTML;
5886 5865
5887 final _ElementImpl previousElementSibling; 5866 final _ElementImpl previousElementSibling;
5888 5867
5889 int get _scrollHeight() native "return this.scrollHeight;"; 5868 int get $dom_scrollHeight() native "return this.scrollHeight;";
5890 5869
5891 int get _scrollLeft() native "return this.scrollLeft;"; 5870 int get $dom_scrollLeft() native "return this.scrollLeft;";
5892 5871
5893 void set _scrollLeft(int value) native "this.scrollLeft = value;"; 5872 void set $dom_scrollLeft(int value) native "this.scrollLeft = value;";
5894 5873
5895 int get _scrollTop() native "return this.scrollTop;"; 5874 int get $dom_scrollTop() native "return this.scrollTop;";
5896 5875
5897 void set _scrollTop(int value) native "this.scrollTop = value;"; 5876 void set $dom_scrollTop(int value) native "this.scrollTop = value;";
5898 5877
5899 int get _scrollWidth() native "return this.scrollWidth;"; 5878 int get $dom_scrollWidth() native "return this.scrollWidth;";
5900 5879
5901 bool spellcheck; 5880 bool spellcheck;
5902 5881
5903 final _CSSStyleDeclarationImpl style; 5882 final _CSSStyleDeclarationImpl style;
5904 5883
5905 int tabIndex; 5884 int tabIndex;
5906 5885
5907 final String tagName; 5886 final String tagName;
5908 5887
5909 String title; 5888 String title;
5910 5889
5911 bool translate; 5890 bool translate;
5912 5891
5913 final String webkitRegionOverflow; 5892 final String webkitRegionOverflow;
5914 5893
5915 String webkitdropzone; 5894 String webkitdropzone;
5916 5895
5917 void blur() native; 5896 void blur() native;
5918 5897
5919 void click() native; 5898 void click() native;
5920 5899
5921 void focus() native; 5900 void focus() native;
5922 5901
5923 String _getAttribute(String name) native "return this.getAttribute(name);"; 5902 String $dom_getAttribute(String name) native "return this.getAttribute(name);" ;
5924 5903
5925 _ClientRectImpl _getBoundingClientRect() native "return this.getBoundingClient Rect();"; 5904 _ClientRectImpl $dom_getBoundingClientRect() native "return this.getBoundingCl ientRect();";
5926 5905
5927 _ClientRectListImpl _getClientRects() native "return this.getClientRects();"; 5906 _ClientRectListImpl $dom_getClientRects() native "return this.getClientRects() ;";
5928 5907
5929 bool _hasAttribute(String name) native "return this.hasAttribute(name);"; 5908 _NodeListImpl $dom_getElementsByClassName(String name) native "return this.get ElementsByClassName(name);";
5909
5910 _NodeListImpl $dom_getElementsByTagName(String name) native "return this.getEl ementsByTagName(name);";
5911
5912 bool $dom_hasAttribute(String name) native "return this.hasAttribute(name);";
5930 5913
5931 _ElementImpl insertAdjacentElement(String where, _ElementImpl element) native; 5914 _ElementImpl insertAdjacentElement(String where, _ElementImpl element) native;
5932 5915
5933 void insertAdjacentHTML(String where, String html) native; 5916 void insertAdjacentHTML(String where, String html) native;
5934 5917
5935 void insertAdjacentText(String where, String text) native; 5918 void insertAdjacentText(String where, String text) native;
5936 5919
5937 _ElementImpl query(String selectors) native "return this.querySelector(selecto rs);"; 5920 _ElementImpl query(String selectors) native "return this.querySelector(selecto rs);";
5938 5921
5939 _NodeListImpl _querySelectorAll(String selectors) native "return this.querySel ectorAll(selectors);"; 5922 _NodeListImpl $dom_querySelectorAll(String selectors) native "return this.quer ySelectorAll(selectors);";
5940 5923
5941 void _removeAttribute(String name) native "this.removeAttribute(name);"; 5924 void $dom_removeAttribute(String name) native "this.removeAttribute(name);";
5942 5925
5943 void scrollByLines(int lines) native; 5926 void scrollByLines(int lines) native;
5944 5927
5945 void scrollByPages(int pages) native; 5928 void scrollByPages(int pages) native;
5946 5929
5947 void scrollIntoView([bool centerIfNeeded = null]) native "this.scrollIntoViewI fNeeded(centerIfNeeded);"; 5930 void scrollIntoView([bool centerIfNeeded = null]) native "this.scrollIntoViewI fNeeded(centerIfNeeded);";
5948 5931
5949 void _setAttribute(String name, String value) native "this.setAttribute(name, value);"; 5932 void $dom_setAttribute(String name, String value) native "this.setAttribute(na me, value);";
5950 5933
5951 bool matchesSelector(String selectors) native "return this.webkitMatchesSelect or(selectors);"; 5934 bool matchesSelector(String selectors) native "return this.webkitMatchesSelect or(selectors);";
5952 5935
5953 void webkitRequestFullScreen(int flags) native; 5936 void webkitRequestFullScreen(int flags) native;
5954 5937
5955 void webkitRequestFullscreen() native; 5938 void webkitRequestFullscreen() native;
5956 5939
5957 } 5940 }
5958 5941
5942 final _START_TAG_REGEXP = const RegExp('<(\\w+)');
5943 class _ElementFactoryProvider {
5944 static final _CUSTOM_PARENT_TAG_MAP = const {
5945 'body' : 'html',
5946 'head' : 'html',
5947 'caption' : 'table',
5948 'td': 'tr',
5949 'colgroup': 'table',
5950 'col' : 'colgroup',
5951 'tr' : 'tbody',
5952 'tbody' : 'table',
5953 'tfoot' : 'table',
5954 'thead' : 'table',
5955 'track' : 'audio',
5956 };
5957
5958 /** @domName Document.createElement */
5959 factory Element.html(String html) {
5960 // TODO(jacobr): this method can be made more robust and performant.
5961 // 1) Cache the dummy parent elements required to use innerHTML rather than
5962 // creating them every call.
5963 // 2) Verify that the html does not contain leading or trailing text nodes.
5964 // 3) Verify that the html does not contain both <head> and <body> tags.
5965 // 4) Detatch the created element from its dummy parent.
5966 String parentTag = 'div';
5967 String tag;
5968 final match = _START_TAG_REGEXP.firstMatch(html);
5969 if (match !== null) {
5970 tag = match.group(1).toLowerCase();
5971 if (_CUSTOM_PARENT_TAG_MAP.containsKey(tag)) {
5972 parentTag = _CUSTOM_PARENT_TAG_MAP[tag];
5973 }
5974 }
5975 final _ElementImpl temp = new Element.tag(parentTag);
5976 temp.innerHTML = html;
5977
5978 Element element;
5979 if (temp.elements.length == 1) {
5980 element = temp.elements.first;
5981 } else if (parentTag == 'html' && temp.elements.length == 2) {
5982 // Work around for edge case in WebKit and possibly other browsers where
5983 // both body and head elements are created even though the inner html
5984 // only contains a head or body element.
5985 element = temp.elements[tag == 'head' ? 0 : 1];
5986 } else {
5987 throw new IllegalArgumentException('HTML had ${temp.elements.length} ' +
5988 'top level elements but 1 expected');
5989 }
5990 element.remove();
5991 return element;
5992 }
5993
5994 /** @domName Document.createElement */
5995 // Optimization to improve performance until the frog compiler inlines this
5996 // method.
5997 factory Element.tag(String tag) native "return document.createElement(tag)";
5998 }
5999
5959 class _ElementEventsImpl extends _EventsImpl implements ElementEvents { 6000 class _ElementEventsImpl extends _EventsImpl implements ElementEvents {
5960 _ElementEventsImpl(_ptr) : super(_ptr); 6001 _ElementEventsImpl(_ptr) : super(_ptr);
5961 6002
5962 EventListenerList get abort() => _get('abort'); 6003 EventListenerList get abort() => _get('abort');
5963 6004
5964 EventListenerList get beforeCopy() => _get('beforecopy'); 6005 EventListenerList get beforeCopy() => _get('beforecopy');
5965 6006
5966 EventListenerList get beforeCut() => _get('beforecut'); 6007 EventListenerList get beforeCut() => _get('beforecut');
5967 6008
5968 EventListenerList get beforePaste() => _get('beforepaste'); 6009 EventListenerList get beforePaste() => _get('beforepaste');
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
6219 static final int SELECT = 16384; 6260 static final int SELECT = 16384;
6220 6261
6221 final bool bubbles; 6262 final bool bubbles;
6222 6263
6223 bool cancelBubble; 6264 bool cancelBubble;
6224 6265
6225 final bool cancelable; 6266 final bool cancelable;
6226 6267
6227 final _ClipboardImpl clipboardData; 6268 final _ClipboardImpl clipboardData;
6228 6269
6229 _EventTargetImpl get currentTarget() => _FixHtmlDocumentReference(_currentTarg et); 6270 final _EventTargetImpl currentTarget;
6230
6231 _EventTargetImpl get _currentTarget() native "return this.currentTarget;";
6232 6271
6233 final bool defaultPrevented; 6272 final bool defaultPrevented;
6234 6273
6235 final int eventPhase; 6274 final int eventPhase;
6236 6275
6237 bool returnValue; 6276 bool returnValue;
6238 6277
6239 _EventTargetImpl get srcElement() => _FixHtmlDocumentReference(_srcElement); 6278 final _EventTargetImpl srcElement;
6240 6279
6241 _EventTargetImpl get _srcElement() native "return this.srcElement;"; 6280 final _EventTargetImpl target;
6242
6243 _EventTargetImpl get target() => _FixHtmlDocumentReference(_target);
6244
6245 _EventTargetImpl get _target() native "return this.target;";
6246 6281
6247 final int timeStamp; 6282 final int timeStamp;
6248 6283
6249 final String type; 6284 final String type;
6250 6285
6251 void _initEvent(String eventTypeArg, bool canBubbleArg, bool cancelableArg) na tive "this.initEvent(eventTypeArg, canBubbleArg, cancelableArg);"; 6286 void $dom_initEvent(String eventTypeArg, bool canBubbleArg, bool cancelableArg ) native "this.initEvent(eventTypeArg, canBubbleArg, cancelableArg);";
6252 6287
6253 void preventDefault() native; 6288 void preventDefault() native;
6254 6289
6255 void stopImmediatePropagation() native; 6290 void stopImmediatePropagation() native;
6256 6291
6257 void stopPropagation() native; 6292 void stopPropagation() native;
6258 } 6293 }
6259 6294
6260 class _EventExceptionImpl implements EventException native "*EventException" { 6295 class _EventExceptionImpl implements EventException native "*EventException" {
6261 6296
(...skipping 20 matching lines...) Expand all
6282 static final int CONNECTING = 0; 6317 static final int CONNECTING = 0;
6283 6318
6284 static final int OPEN = 1; 6319 static final int OPEN = 1;
6285 6320
6286 final String URL; 6321 final String URL;
6287 6322
6288 final int readyState; 6323 final int readyState;
6289 6324
6290 final String url; 6325 final String url;
6291 6326
6292 void _addEventListener(String type, EventListener listener, [bool useCapture = null]) native "this.addEventListener(type, listener, useCapture);"; 6327 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re = null]) native "this.addEventListener(type, listener, useCapture);";
6293 6328
6294 void close() native; 6329 void close() native;
6295 6330
6296 bool _dispatchEvent(_EventImpl evt) native "return this.dispatchEvent(evt);"; 6331 bool $dom_dispatchEvent(_EventImpl evt) native "return this.dispatchEvent(evt) ;";
6297 6332
6298 void _removeEventListener(String type, EventListener listener, [bool useCaptur e = null]) native "this.removeEventListener(type, listener, useCapture);"; 6333 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture = null]) native "this.removeEventListener(type, listener, useCapture);";
6299 } 6334 }
6300 6335
6301 class _EventSourceEventsImpl extends _EventsImpl implements EventSourceEvents { 6336 class _EventSourceEventsImpl extends _EventsImpl implements EventSourceEvents {
6302 _EventSourceEventsImpl(_ptr) : super(_ptr); 6337 _EventSourceEventsImpl(_ptr) : super(_ptr);
6303 6338
6304 EventListenerList get error() => _get('error'); 6339 EventListenerList get error() => _get('error');
6305 6340
6306 EventListenerList get message() => _get('message'); 6341 EventListenerList get message() => _get('message');
6307 6342
6308 EventListenerList get open() => _get('open'); 6343 EventListenerList get open() => _get('open');
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
6345 _EventListenerListImpl remove(EventListener listener, 6380 _EventListenerListImpl remove(EventListener listener,
6346 [bool useCapture = false]) { 6381 [bool useCapture = false]) {
6347 _remove(listener, useCapture); 6382 _remove(listener, useCapture);
6348 return this; 6383 return this;
6349 } 6384 }
6350 6385
6351 bool dispatch(Event evt) { 6386 bool dispatch(Event evt) {
6352 // TODO(jacobr): what is the correct behavior here. We could alternately 6387 // TODO(jacobr): what is the correct behavior here. We could alternately
6353 // force the event to have the expected type. 6388 // force the event to have the expected type.
6354 assert(evt.type == _type); 6389 assert(evt.type == _type);
6355 return _ptr._dispatchEvent(evt); 6390 return _ptr.$dom_dispatchEvent(evt);
6356 } 6391 }
6357 6392
6358 void _add(EventListener listener, bool useCapture) { 6393 void _add(EventListener listener, bool useCapture) {
6359 _ptr._addEventListener(_type, listener, useCapture); 6394 _ptr.$dom_addEventListener(_type, listener, useCapture);
6360 } 6395 }
6361 6396
6362 void _remove(EventListener listener, bool useCapture) { 6397 void _remove(EventListener listener, bool useCapture) {
6363 _ptr._removeEventListener(_type, listener, useCapture); 6398 _ptr.$dom_removeEventListener(_type, listener, useCapture);
6364 } 6399 }
6365 } 6400 }
6366 6401
6367 6402
6368 class _EventTargetImpl implements EventTarget native "*EventTarget" { 6403 class _EventTargetImpl implements EventTarget native "*EventTarget" {
6369 6404
6370 Events get on() => new _EventsImpl(this); 6405 Events get on() => new _EventsImpl(this);
6371 6406
6372 void _addEventListener(String type, EventListener listener, [bool useCapture = null]) native "this.addEventListener(type, listener, useCapture);"; 6407 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re = null]) native "this.addEventListener(type, listener, useCapture);";
6373 6408
6374 bool _dispatchEvent(_EventImpl event) native "return this.dispatchEvent(event) ;"; 6409 bool $dom_dispatchEvent(_EventImpl event) native "return this.dispatchEvent(ev ent);";
6375 6410
6376 void _removeEventListener(String type, EventListener listener, [bool useCaptur e = null]) native "this.removeEventListener(type, listener, useCapture);"; 6411 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture = null]) native "this.removeEventListener(type, listener, useCapture);";
6377 6412
6378 } 6413 }
6379 6414
6380 class _FieldSetElementImpl extends _ElementImpl implements FieldSetElement nativ e "*HTMLFieldSetElement" { 6415 class _FieldSetElementImpl extends _ElementImpl implements FieldSetElement nativ e "*HTMLFieldSetElement" {
6381 6416
6382 final _FormElementImpl form; 6417 final _FormElementImpl form;
6383 6418
6384 String name; 6419 String name;
6385 6420
6386 final String type; 6421 final String type;
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
6807 6842
6808 bool checkValidity() native; 6843 bool checkValidity() native;
6809 6844
6810 void reset() native; 6845 void reset() native;
6811 6846
6812 void submit() native; 6847 void submit() native;
6813 } 6848 }
6814 6849
6815 class _FrameElementImpl extends _ElementImpl implements FrameElement native "*HT MLFrameElement" { 6850 class _FrameElementImpl extends _ElementImpl implements FrameElement native "*HT MLFrameElement" {
6816 6851
6817 _DocumentImpl get contentDocument() => _FixHtmlDocumentReference(_contentDocum ent); 6852 final _DocumentImpl contentDocument;
6818
6819 _EventTargetImpl get _contentDocument() native "return this.contentDocument;";
6820 6853
6821 final _WindowImpl contentWindow; 6854 final _WindowImpl contentWindow;
6822 6855
6823 String frameBorder; 6856 String frameBorder;
6824 6857
6825 final int height; 6858 final int height;
6826 6859
6827 String location; 6860 String location;
6828 6861
6829 String longDesc; 6862 String longDesc;
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
7052 void back() native; 7085 void back() native;
7053 7086
7054 void forward() native; 7087 void forward() native;
7055 7088
7056 void go(int distance) native; 7089 void go(int distance) native;
7057 7090
7058 void pushState(Object data, String title, [String url = null]) native; 7091 void pushState(Object data, String title, [String url = null]) native;
7059 7092
7060 void replaceState(Object data, String title, [String url = null]) native; 7093 void replaceState(Object data, String title, [String url = null]) native;
7061 } 7094 }
7062 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
7063 // for details. All rights reserved. Use of this source code is governed by a
7064 // BSD-style license that can be found in the LICENSE file.
7065 7095
7066 class _HtmlElementImpl extends _ElementImpl implements HtmlElement 7096 class _HtmlElementImpl extends _ElementImpl implements HtmlElement native "*HTML HtmlElement" {
7067 native "*IntentionallyInvalid" {
7068
7069 } 7097 }
7070 7098
7071 class _IDBAnyImpl implements IDBAny native "*IDBAny" { 7099 class _IDBAnyImpl implements IDBAny native "*IDBAny" {
7072 } 7100 }
7073 7101
7074 class _IDBCursorImpl implements IDBCursor native "*IDBCursor" { 7102 class _IDBCursorImpl implements IDBCursor native "*IDBCursor" {
7075 7103
7076 static final int NEXT = 0; 7104 static final int NEXT = 0;
7077 7105
7078 static final int NEXT_NO_DUPLICATE = 1; 7106 static final int NEXT_NO_DUPLICATE = 1;
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
7328 7356
7329 class _IDBVersionChangeRequestImpl extends _IDBRequestImpl implements IDBVersion ChangeRequest native "*IDBVersionChangeRequest" { 7357 class _IDBVersionChangeRequestImpl extends _IDBRequestImpl implements IDBVersion ChangeRequest native "*IDBVersionChangeRequest" {
7330 7358
7331 EventListener onblocked; 7359 EventListener onblocked;
7332 } 7360 }
7333 7361
7334 class _IFrameElementImpl extends _ElementImpl implements IFrameElement native "* HTMLIFrameElement" { 7362 class _IFrameElementImpl extends _ElementImpl implements IFrameElement native "* HTMLIFrameElement" {
7335 7363
7336 String align; 7364 String align;
7337 7365
7338 _DocumentImpl get contentDocument() => _FixHtmlDocumentReference(_contentDocum ent); 7366 final _DocumentImpl contentDocument;
7339
7340 _EventTargetImpl get _contentDocument() native "return this.contentDocument;";
7341 7367
7342 final _WindowImpl contentWindow; 7368 final _WindowImpl contentWindow;
7343 7369
7344 String frameBorder; 7370 String frameBorder;
7345 7371
7346 String height; 7372 String height;
7347 7373
7348 String longDesc; 7374 String longDesc;
7349 7375
7350 String marginHeight; 7376 String marginHeight;
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
8373 void initMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, O bject dataArg, String originArg, String lastEventIdArg, _WindowImpl sourceArg, L ist messagePorts) native; 8399 void initMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, O bject dataArg, String originArg, String lastEventIdArg, _WindowImpl sourceArg, L ist messagePorts) native;
8374 8400
8375 void webkitInitMessageEvent(String typeArg, bool canBubbleArg, bool cancelable Arg, Object dataArg, String originArg, String lastEventIdArg, _WindowImpl source Arg, List transferables) native; 8401 void webkitInitMessageEvent(String typeArg, bool canBubbleArg, bool cancelable Arg, Object dataArg, String originArg, String lastEventIdArg, _WindowImpl source Arg, List transferables) native;
8376 } 8402 }
8377 8403
8378 class _MessagePortImpl extends _EventTargetImpl implements MessagePort native "* MessagePort" { 8404 class _MessagePortImpl extends _EventTargetImpl implements MessagePort native "* MessagePort" {
8379 8405
8380 _MessagePortEventsImpl get on() => 8406 _MessagePortEventsImpl get on() =>
8381 new _MessagePortEventsImpl(this); 8407 new _MessagePortEventsImpl(this);
8382 8408
8383 void _addEventListener(String type, EventListener listener, [bool useCapture = null]) native "this.addEventListener(type, listener, useCapture);"; 8409 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re = null]) native "this.addEventListener(type, listener, useCapture);";
8384 8410
8385 void close() native; 8411 void close() native;
8386 8412
8387 bool _dispatchEvent(_EventImpl evt) native "return this.dispatchEvent(evt);"; 8413 bool $dom_dispatchEvent(_EventImpl evt) native "return this.dispatchEvent(evt) ;";
8388 8414
8389 void postMessage(String message, [List messagePorts = null]) native; 8415 void postMessage(String message, [List messagePorts = null]) native;
8390 8416
8391 void _removeEventListener(String type, EventListener listener, [bool useCaptur e = null]) native "this.removeEventListener(type, listener, useCapture);"; 8417 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture = null]) native "this.removeEventListener(type, listener, useCapture);";
8392 8418
8393 void start() native; 8419 void start() native;
8394 8420
8395 void webkitPostMessage(String message, [List transfer = null]) native; 8421 void webkitPostMessage(String message, [List transfer = null]) native;
8396 } 8422 }
8397 8423
8398 class _MessagePortEventsImpl extends _EventsImpl implements MessagePortEvents { 8424 class _MessagePortEventsImpl extends _EventsImpl implements MessagePortEvents {
8399 _MessagePortEventsImpl(_ptr) : super(_ptr); 8425 _MessagePortEventsImpl(_ptr) : super(_ptr);
8400 8426
8401 EventListenerList get message() => _get('message'); 8427 EventListenerList get message() => _get('message');
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
8458 final _ClipboardImpl dataTransfer; 8484 final _ClipboardImpl dataTransfer;
8459 8485
8460 final _NodeImpl fromElement; 8486 final _NodeImpl fromElement;
8461 8487
8462 final bool metaKey; 8488 final bool metaKey;
8463 8489
8464 final int offsetX; 8490 final int offsetX;
8465 8491
8466 final int offsetY; 8492 final int offsetY;
8467 8493
8468 _EventTargetImpl get relatedTarget() => _FixHtmlDocumentReference(_relatedTarg et); 8494 final _EventTargetImpl relatedTarget;
8469
8470 _EventTargetImpl get _relatedTarget() native "return this.relatedTarget;";
8471 8495
8472 final int screenX; 8496 final int screenX;
8473 8497
8474 final int screenY; 8498 final int screenY;
8475 8499
8476 final bool shiftKey; 8500 final bool shiftKey;
8477 8501
8478 final _NodeImpl toElement; 8502 final _NodeImpl toElement;
8479 8503
8480 final int x; 8504 final int x;
8481 8505
8482 final int y; 8506 final int y;
8483 8507
8484 void _initMouseEvent(String type, bool canBubble, bool cancelable, _WindowImpl view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrl Key, bool altKey, bool shiftKey, bool metaKey, int button, _EventTargetImpl rela tedTarget) native "this.initMouseEvent(type, canBubble, cancelable, view, detail , screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button , relatedTarget);"; 8508 void $dom_initMouseEvent(String type, bool canBubble, bool cancelable, _Window Impl view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, int button, _EventTargetImpl relatedTarget) native "this.initMouseEvent(type, canBubble, cancelable, view, de tail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, bu tton, relatedTarget);";
8485 } 8509 }
8486 8510
8487 class _MutationEventImpl extends _EventImpl implements MutationEvent native "*Mu tationEvent" { 8511 class _MutationEventImpl extends _EventImpl implements MutationEvent native "*Mu tationEvent" {
8488 8512
8489 static final int ADDITION = 2; 8513 static final int ADDITION = 2;
8490 8514
8491 static final int MODIFICATION = 1; 8515 static final int MODIFICATION = 1;
8492 8516
8493 static final int REMOVAL = 3; 8517 static final int REMOVAL = 3;
8494 8518
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
8641 class _NavigatorUserMediaErrorImpl implements NavigatorUserMediaError native "*N avigatorUserMediaError" { 8665 class _NavigatorUserMediaErrorImpl implements NavigatorUserMediaError native "*N avigatorUserMediaError" {
8642 8666
8643 static final int PERMISSION_DENIED = 1; 8667 static final int PERMISSION_DENIED = 1;
8644 8668
8645 final int code; 8669 final int code;
8646 } 8670 }
8647 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 8671 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
8648 // for details. All rights reserved. Use of this source code is governed by a 8672 // for details. All rights reserved. Use of this source code is governed by a
8649 // BSD-style license that can be found in the LICENSE file. 8673 // BSD-style license that can be found in the LICENSE file.
8650 8674
8675 /**
8676 * Lazy implementation of the child nodes of an element that does not request
8677 * the actual child nodes of an element until strictly necessary greatly
8678 * improving performance for the typical cases where it is not required.
8679 */
8680 class _ChildNodeListLazy implements NodeList {
8681 final _NodeImpl _this;
8682
8683 _ChildNodeListLazy(this._this);
8684
8685
8686 _NodeImpl get first() native "return this._this.firstChild;";
8687 _NodeImpl last() native "return this._this.lastChild;";
8688
8689 void add(_NodeImpl value) {
8690 _this.$dom_appendChild(value);
8691 }
8692
8693 void addLast(_NodeImpl value) {
8694 _this.$dom_appendChild(value);
8695 }
8696
8697
8698 void addAll(Collection<_NodeImpl> collection) {
8699 for (_NodeImpl node in collection) {
8700 _this.$dom_appendChild(node);
8701 }
8702 }
8703
8704 _NodeImpl removeLast() {
8705 final last = last();
8706 if (last != null) {
8707 _this.$dom_removeChild(last);
8708 }
8709 return last;
8710 }
8711
8712 void clear() {
8713 _this.text = '';
8714 }
8715
8716 void operator []=(int index, _NodeImpl value) {
8717 _this.$dom_replaceChild(value, this[index]);
8718 }
8719
8720 Iterator<Node> iterator() => _this.$dom_childNodes.iterator();
8721
8722 // TODO(jacobr): We can implement these methods much more efficiently by
8723 // looking up the nodeList only once instead of once per iteration.
8724 void forEach(void f(Node element)) => _Collections.forEach(this, f);
8725
8726 Collection map(f(Node element)) => _Collections.map(this, [], f);
8727
8728 Collection<Node> filter(bool f(Node element)) =>
8729 new _NodeListWrapper(_Collections.filter(this, <Node>[], f));
8730
8731 bool every(bool f(Node element)) => _Collections.every(this, f);
8732
8733 bool some(bool f(Node element)) => _Collections.some(this, f);
8734
8735 bool isEmpty() => this.length == 0;
8736
8737 // From List<Node>:
8738
8739 // TODO(jacobr): this could be implemented for child node lists.
8740 // The exception we throw here is misleading.
8741 void sort(int compare(Node a, Node b)) {
8742 throw new UnsupportedOperationException("Cannot sort immutable List.");
8743 }
8744
8745 int indexOf(Node element, [int start = 0]) =>
8746 _Lists.indexOf(this, element, start, this.length);
8747
8748 int lastIndexOf(Node element, [int start = 0]) =>
8749 _Lists.lastIndexOf(this, element, start);
8750
8751 // FIXME: implement thesee.
8752 void setRange(int start, int length, List<Node> from, [int startFrom]) {
8753 throw new UnsupportedOperationException(
8754 "Cannot setRange on immutable List.");
8755 }
8756 void removeRange(int start, int length) {
8757 throw new UnsupportedOperationException(
8758 "Cannot removeRange on immutable List.");
8759 }
8760 void insertRange(int start, int length, [Node initialValue]) {
8761 throw new UnsupportedOperationException(
8762 "Cannot insertRange on immutable List.");
8763 }
8764 NodeList getRange(int start, int length) =>
8765 new _NodeListWrapper(_Lists.getRange(this, start, length, <Node>[]));
8766
8767 // -- end List<Node> mixins.
8768
8769 // TODO(jacobr): benchmark whether this is more efficient or whether caching
8770 // a local copy of $dom_childNodes is more efficient.
8771 int get length() => _this.$dom_childNodes.length;
8772
8773 _NodeImpl operator[](int index) => _this.$dom_childNodes[index];
8774 }
8775
8651 class _NodeImpl extends _EventTargetImpl implements Node native "*Node" { 8776 class _NodeImpl extends _EventTargetImpl implements Node native "*Node" {
8652 _NodeListImpl get nodes() { 8777 _ChildNodeListLazy get nodes() {
8653 final list = _childNodes; 8778 return new _ChildNodeListLazy(this);
8654 list._parent = this;
8655 return list;
8656 } 8779 }
8657 8780
8658 void set nodes(Collection<Node> value) { 8781 void set nodes(Collection<Node> value) {
8659 // Copy list first since we don't want liveness during iteration. 8782 // Copy list first since we don't want liveness during iteration.
8660 // TODO(jacobr): there is a better way to do this. 8783 // TODO(jacobr): there is a better way to do this.
8661 List copy = new List.from(value); 8784 List copy = new List.from(value);
8662 text = ''; 8785 text = '';
8663 for (Node node in copy) { 8786 for (Node node in copy) {
8664 _appendChild(node); 8787 $dom_appendChild(node);
8665 } 8788 }
8666 } 8789 }
8667 8790
8668 // TODO(jacobr): should we throw an exception if parent is already null? 8791 // TODO(jacobr): should we throw an exception if parent is already null?
8669 _NodeImpl remove() { 8792 _NodeImpl remove() {
8670 if (this.parent != null) { 8793 if (this.parent != null) {
8671 final _NodeImpl parent = this.parent; 8794 final _NodeImpl parent = this.parent;
8672 parent._removeChild(this); 8795 parent.$dom_removeChild(this);
8673 } 8796 }
8674 return this; 8797 return this;
8675 } 8798 }
8676 8799
8677 _NodeImpl replaceWith(Node otherNode) { 8800 _NodeImpl replaceWith(Node otherNode) {
8678 try { 8801 try {
8679 final _NodeImpl parent = this.parent; 8802 final _NodeImpl parent = this.parent;
8680 parent._replaceChild(otherNode, this); 8803 parent.$dom_replaceChild(otherNode, this);
8681 } catch(var e) { 8804 } catch(var e) {
8682 8805
8683 }; 8806 };
8684 return this; 8807 return this;
8685 } 8808 }
8686 8809
8687 8810
8688 static final int ATTRIBUTE_NODE = 2; 8811 static final int ATTRIBUTE_NODE = 2;
8689 8812
8690 static final int CDATA_SECTION_NODE = 4; 8813 static final int CDATA_SECTION_NODE = 4;
(...skipping 23 matching lines...) Expand all
8714 static final int ENTITY_NODE = 6; 8837 static final int ENTITY_NODE = 6;
8715 8838
8716 static final int ENTITY_REFERENCE_NODE = 5; 8839 static final int ENTITY_REFERENCE_NODE = 5;
8717 8840
8718 static final int NOTATION_NODE = 12; 8841 static final int NOTATION_NODE = 12;
8719 8842
8720 static final int PROCESSING_INSTRUCTION_NODE = 7; 8843 static final int PROCESSING_INSTRUCTION_NODE = 7;
8721 8844
8722 static final int TEXT_NODE = 3; 8845 static final int TEXT_NODE = 3;
8723 8846
8724 _NamedNodeMapImpl get _attributes() native "return this.attributes;"; 8847 _NamedNodeMapImpl get $dom_attributes() native "return this.attributes;";
8725 8848
8726 _NodeListImpl get _childNodes() native "return this.childNodes;"; 8849 _NodeListImpl get $dom_childNodes() native "return this.childNodes;";
8850
8851 _NodeImpl get $dom_firstChild() native "return this.firstChild;";
8852
8853 _NodeImpl get $dom_lastChild() native "return this.lastChild;";
8727 8854
8728 _NodeImpl get nextNode() native "return this.nextSibling;"; 8855 _NodeImpl get nextNode() native "return this.nextSibling;";
8729 8856
8730 _DocumentImpl get document() => _FixHtmlDocumentReference(_document); 8857 int get $dom_nodeType() native "return this.nodeType;";
8731 8858
8732 _EventTargetImpl get _document() native "return this.ownerDocument;"; 8859 _DocumentImpl get document() native "return this.ownerDocument;";
8733 8860
8734 _NodeImpl get parent() native "return this.parentNode;"; 8861 _NodeImpl get parent() native "return this.parentNode;";
8735 8862
8736 _NodeImpl get previousNode() native "return this.previousSibling;"; 8863 _NodeImpl get previousNode() native "return this.previousSibling;";
8737 8864
8738 String get text() native "return this.textContent;"; 8865 String get text() native "return this.textContent;";
8739 8866
8740 void set text(String value) native "this.textContent = value;"; 8867 void set text(String value) native "this.textContent = value;";
8741 8868
8742 _NodeImpl _appendChild(_NodeImpl newChild) native "return this.appendChild(new Child);"; 8869 _NodeImpl $dom_appendChild(_NodeImpl newChild) native "return this.appendChild (newChild);";
8743 8870
8744 _NodeImpl clone(bool deep) native "return this.cloneNode(deep);"; 8871 _NodeImpl clone(bool deep) native "return this.cloneNode(deep);";
8745 8872
8746 bool contains(_NodeImpl other) native; 8873 bool contains(_NodeImpl other) native;
8747 8874
8748 bool hasChildNodes() native; 8875 bool hasChildNodes() native;
8749 8876
8750 _NodeImpl insertBefore(_NodeImpl newChild, _NodeImpl refChild) native; 8877 _NodeImpl insertBefore(_NodeImpl newChild, _NodeImpl refChild) native;
8751 8878
8752 _NodeImpl _removeChild(_NodeImpl oldChild) native "return this.removeChild(old Child);"; 8879 _NodeImpl $dom_removeChild(_NodeImpl oldChild) native "return this.removeChild (oldChild);";
8753 8880
8754 _NodeImpl _replaceChild(_NodeImpl newChild, _NodeImpl oldChild) native "return this.replaceChild(newChild, oldChild);"; 8881 _NodeImpl $dom_replaceChild(_NodeImpl newChild, _NodeImpl oldChild) native "re turn this.replaceChild(newChild, oldChild);";
8755 8882
8756 } 8883 }
8757 8884
8758 class _NodeFilterImpl implements NodeFilter native "*NodeFilter" { 8885 class _NodeFilterImpl implements NodeFilter native "*NodeFilter" {
8759 8886
8760 static final int FILTER_ACCEPT = 1; 8887 static final int FILTER_ACCEPT = 1;
8761 8888
8762 static final int FILTER_REJECT = 2; 8889 static final int FILTER_REJECT = 2;
8763 8890
8764 static final int FILTER_SKIP = 3; 8891 static final int FILTER_SKIP = 3;
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
8902 Iterator<Node> iterator() { 9029 Iterator<Node> iterator() {
8903 // Note: NodeLists are not fixed size. And most probably length shouldn't 9030 // Note: NodeLists are not fixed size. And most probably length shouldn't
8904 // be cached in both iterator _and_ forEach method. For now caching it 9031 // be cached in both iterator _and_ forEach method. For now caching it
8905 // for consistency. 9032 // for consistency.
8906 return new _FixedSizeListIterator<Node>(this); 9033 return new _FixedSizeListIterator<Node>(this);
8907 } 9034 }
8908 9035
8909 // From Collection<Node>: 9036 // From Collection<Node>:
8910 9037
8911 void add(_NodeImpl value) { 9038 void add(_NodeImpl value) {
8912 _parent._appendChild(value); 9039 _parent.$dom_appendChild(value);
8913 } 9040 }
8914 9041
8915 void addLast(_NodeImpl value) { 9042 void addLast(_NodeImpl value) {
8916 _parent._appendChild(value); 9043 _parent.$dom_appendChild(value);
8917 } 9044 }
8918 9045
8919 void addAll(Collection<_NodeImpl> collection) { 9046 void addAll(Collection<_NodeImpl> collection) {
8920 for (_NodeImpl node in collection) { 9047 for (_NodeImpl node in collection) {
8921 _parent._appendChild(node); 9048 _parent.$dom_appendChild(node);
8922 } 9049 }
8923 } 9050 }
8924 9051
8925 _NodeImpl removeLast() { 9052 _NodeImpl removeLast() {
8926 final last = this.last(); 9053 final last = this.last();
8927 if (last != null) { 9054 if (last != null) {
8928 _parent._removeChild(last); 9055 _parent.$dom_removeChild(last);
8929 } 9056 }
8930 return last; 9057 return last;
8931 } 9058 }
8932 9059
8933 void clear() { 9060 void clear() {
8934 _parent.text = ''; 9061 _parent.text = '';
8935 } 9062 }
8936 9063
8937 void operator []=(int index, _NodeImpl value) { 9064 void operator []=(int index, _NodeImpl value) {
8938 _parent._replaceChild(value, this[index]); 9065 _parent.$dom_replaceChild(value, this[index]);
8939 } 9066 }
8940 9067
8941 void forEach(void f(Node element)) => _Collections.forEach(this, f); 9068 void forEach(void f(Node element)) => _Collections.forEach(this, f);
8942 9069
8943 Collection map(f(Node element)) => _Collections.map(this, [], f); 9070 Collection map(f(Node element)) => _Collections.map(this, [], f);
8944 9071
8945 Collection<Node> filter(bool f(Node element)) => 9072 Collection<Node> filter(bool f(Node element)) =>
8946 new _NodeListWrapper(_Collections.filter(this, <Node>[], f)); 9073 new _NodeListWrapper(_Collections.filter(this, <Node>[], f));
8947 9074
8948 bool every(bool f(Node element)) => _Collections.every(this, f); 9075 bool every(bool f(Node element)) => _Collections.every(this, f);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
8985 final int length; 9112 final int length;
8986 9113
8987 _NodeImpl operator[](int index) native "return this[index];"; 9114 _NodeImpl operator[](int index) native "return this[index];";
8988 9115
8989 } 9116 }
8990 9117
8991 class _NodeSelectorImpl implements NodeSelector native "*NodeSelector" { 9118 class _NodeSelectorImpl implements NodeSelector native "*NodeSelector" {
8992 9119
8993 _ElementImpl query(String selectors) native "return this.querySelector(selecto rs);"; 9120 _ElementImpl query(String selectors) native "return this.querySelector(selecto rs);";
8994 9121
8995 _NodeListImpl _querySelectorAll(String selectors) native "return this.querySel ectorAll(selectors);"; 9122 _NodeListImpl $dom_querySelectorAll(String selectors) native "return this.quer ySelectorAll(selectors);";
8996 } 9123 }
8997 9124
8998 class _NotationImpl extends _NodeImpl implements Notation native "*Notation" { 9125 class _NotationImpl extends _NodeImpl implements Notation native "*Notation" {
8999 9126
9000 final String publicId; 9127 final String publicId;
9001 9128
9002 final String systemId; 9129 final String systemId;
9003 } 9130 }
9004 9131
9005 class _NotificationImpl extends _EventTargetImpl implements Notification native "*Notification" { 9132 class _NotificationImpl extends _EventTargetImpl implements Notification native "*Notification" {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
9078 String archive; 9205 String archive;
9079 9206
9080 String border; 9207 String border;
9081 9208
9082 String code; 9209 String code;
9083 9210
9084 String codeBase; 9211 String codeBase;
9085 9212
9086 String codeType; 9213 String codeType;
9087 9214
9088 _DocumentImpl get contentDocument() => _FixHtmlDocumentReference(_contentDocum ent); 9215 final _DocumentImpl contentDocument;
9089
9090 _EventTargetImpl get _contentDocument() native "return this.contentDocument;";
9091 9216
9092 String data; 9217 String data;
9093 9218
9094 bool declare; 9219 bool declare;
9095 9220
9096 final _FormElementImpl form; 9221 final _FormElementImpl form;
9097 9222
9098 String height; 9223 String height;
9099 9224
9100 int hspace; 9225 int hspace;
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
9665 String xmllang; 9790 String xmllang;
9666 9791
9667 String xmlspace; 9792 String xmlspace;
9668 9793
9669 // From SVGExternalResourcesRequired 9794 // From SVGExternalResourcesRequired
9670 9795
9671 final _SVGAnimatedBooleanImpl externalResourcesRequired; 9796 final _SVGAnimatedBooleanImpl externalResourcesRequired;
9672 9797
9673 // From SVGStylable 9798 // From SVGStylable
9674 9799
9675 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 9800 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
9676 9801
9677 // Use implementation from Element. 9802 // Use implementation from Element.
9678 // final _CSSStyleDeclarationImpl style; 9803 // final _CSSStyleDeclarationImpl style;
9679 9804
9680 _CSSValueImpl getPresentationAttribute(String name) native; 9805 _CSSValueImpl getPresentationAttribute(String name) native;
9681 9806
9682 // From SVGTransformable 9807 // From SVGTransformable
9683 9808
9684 final _SVGAnimatedTransformListImpl transform; 9809 final _SVGAnimatedTransformListImpl transform;
9685 9810
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
9894 String xmllang; 10019 String xmllang;
9895 10020
9896 String xmlspace; 10021 String xmlspace;
9897 10022
9898 // From SVGExternalResourcesRequired 10023 // From SVGExternalResourcesRequired
9899 10024
9900 final _SVGAnimatedBooleanImpl externalResourcesRequired; 10025 final _SVGAnimatedBooleanImpl externalResourcesRequired;
9901 10026
9902 // From SVGStylable 10027 // From SVGStylable
9903 10028
9904 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 10029 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
9905 10030
9906 // Use implementation from Element. 10031 // Use implementation from Element.
9907 // final _CSSStyleDeclarationImpl style; 10032 // final _CSSStyleDeclarationImpl style;
9908 10033
9909 _CSSValueImpl getPresentationAttribute(String name) native; 10034 _CSSValueImpl getPresentationAttribute(String name) native;
9910 10035
9911 // From SVGTransformable 10036 // From SVGTransformable
9912 10037
9913 final _SVGAnimatedTransformListImpl transform; 10038 final _SVGAnimatedTransformListImpl transform;
9914 10039
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
9946 String xmllang; 10071 String xmllang;
9947 10072
9948 String xmlspace; 10073 String xmlspace;
9949 10074
9950 // From SVGExternalResourcesRequired 10075 // From SVGExternalResourcesRequired
9951 10076
9952 final _SVGAnimatedBooleanImpl externalResourcesRequired; 10077 final _SVGAnimatedBooleanImpl externalResourcesRequired;
9953 10078
9954 // From SVGStylable 10079 // From SVGStylable
9955 10080
9956 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 10081 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
9957 10082
9958 // Use implementation from Element. 10083 // Use implementation from Element.
9959 // final _CSSStyleDeclarationImpl style; 10084 // final _CSSStyleDeclarationImpl style;
9960 10085
9961 _CSSValueImpl getPresentationAttribute(String name) native; 10086 _CSSValueImpl getPresentationAttribute(String name) native;
9962 10087
9963 // From SVGTransformable 10088 // From SVGTransformable
9964 10089
9965 final _SVGAnimatedTransformListImpl transform; 10090 final _SVGAnimatedTransformListImpl transform;
9966 10091
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
10071 String xmllang; 10196 String xmllang;
10072 10197
10073 String xmlspace; 10198 String xmlspace;
10074 10199
10075 // From SVGExternalResourcesRequired 10200 // From SVGExternalResourcesRequired
10076 10201
10077 final _SVGAnimatedBooleanImpl externalResourcesRequired; 10202 final _SVGAnimatedBooleanImpl externalResourcesRequired;
10078 10203
10079 // From SVGStylable 10204 // From SVGStylable
10080 10205
10081 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 10206 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
10082 10207
10083 // Use implementation from Element. 10208 // Use implementation from Element.
10084 // final _CSSStyleDeclarationImpl style; 10209 // final _CSSStyleDeclarationImpl style;
10085 10210
10086 _CSSValueImpl getPresentationAttribute(String name) native; 10211 _CSSValueImpl getPresentationAttribute(String name) native;
10087 10212
10088 // From SVGTransformable 10213 // From SVGTransformable
10089 10214
10090 final _SVGAnimatedTransformListImpl transform; 10215 final _SVGAnimatedTransformListImpl transform;
10091 10216
(...skipping 15 matching lines...) Expand all
10107 class _SVGDescElementImpl extends _SVGElementImpl implements SVGDescElement nati ve "*SVGDescElement" { 10232 class _SVGDescElementImpl extends _SVGElementImpl implements SVGDescElement nati ve "*SVGDescElement" {
10108 10233
10109 // From SVGLangSpace 10234 // From SVGLangSpace
10110 10235
10111 String xmllang; 10236 String xmllang;
10112 10237
10113 String xmlspace; 10238 String xmlspace;
10114 10239
10115 // From SVGStylable 10240 // From SVGStylable
10116 10241
10117 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 10242 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
10118 10243
10119 // Use implementation from Element. 10244 // Use implementation from Element.
10120 // final _CSSStyleDeclarationImpl style; 10245 // final _CSSStyleDeclarationImpl style;
10121 10246
10122 _CSSValueImpl getPresentationAttribute(String name) native; 10247 _CSSValueImpl getPresentationAttribute(String name) native;
10123 } 10248 }
10124 10249
10125 class _SVGDocumentImpl extends _DocumentImpl implements SVGDocument native "*SVG Document" { 10250 class _SVGDocumentImpl extends _DocumentImpl implements SVGDocument native "*SVG Document" {
10126 10251
10127 final _SVGSVGElementImpl rootElement; 10252 final _SVGSVGElementImpl rootElement;
10128 10253
10129 _EventImpl _createEvent(String eventType) native "return this.createEvent(even tType);"; 10254 _EventImpl $dom_createEvent(String eventType) native "return this.createEvent( eventType);";
10130 } 10255 }
10131 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 10256 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
10132 // for details. All rights reserved. Use of this source code is governed by a 10257 // for details. All rights reserved. Use of this source code is governed by a
10133 // BSD-style license that can be found in the LICENSE file. 10258 // BSD-style license that can be found in the LICENSE file.
10134 10259
10135 class _AttributeClassSet extends _CssClassSet { 10260 class _AttributeClassSet extends _CssClassSet {
10136 _AttributeClassSet(element) : super(element); 10261 _AttributeClassSet(element) : super(element);
10137 10262
10138 String _className() => _element.attributes['class']; 10263 String $dom_className() => _element.attributes['class'];
10139 10264
10140 void _write(Set s) { 10265 void _write(Set s) {
10141 _element.attributes['class'] = _formatSet(s); 10266 _element.attributes['class'] = _formatSet(s);
10142 } 10267 }
10143 } 10268 }
10144 10269
10145 class _SVGElementImpl extends _ElementImpl implements SVGElement native "*SVGEle ment" { 10270 class _SVGElementImpl extends _ElementImpl implements SVGElement native "*SVGEle ment" {
10146 Set<String> get classes() { 10271 Set<String> get classes() {
10147 if (_cssClassSet === null) { 10272 if (_cssClassSet === null) {
10148 _cssClassSet = new _AttributeClassSet(_ptr); 10273 _cssClassSet = new _AttributeClassSet(_ptr);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
10208 final _SVGElementInstanceImpl firstChild; 10333 final _SVGElementInstanceImpl firstChild;
10209 10334
10210 final _SVGElementInstanceImpl lastChild; 10335 final _SVGElementInstanceImpl lastChild;
10211 10336
10212 final _SVGElementInstanceImpl nextSibling; 10337 final _SVGElementInstanceImpl nextSibling;
10213 10338
10214 final _SVGElementInstanceImpl parentNode; 10339 final _SVGElementInstanceImpl parentNode;
10215 10340
10216 final _SVGElementInstanceImpl previousSibling; 10341 final _SVGElementInstanceImpl previousSibling;
10217 10342
10218 void _addEventListener(String type, EventListener listener, [bool useCapture = null]) native "this.addEventListener(type, listener, useCapture);"; 10343 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re = null]) native "this.addEventListener(type, listener, useCapture);";
10219 10344
10220 bool _dispatchEvent(_EventImpl event) native "return this.dispatchEvent(event) ;"; 10345 bool $dom_dispatchEvent(_EventImpl event) native "return this.dispatchEvent(ev ent);";
10221 10346
10222 void _removeEventListener(String type, EventListener listener, [bool useCaptur e = null]) native "this.removeEventListener(type, listener, useCapture);"; 10347 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture = null]) native "this.removeEventListener(type, listener, useCapture);";
10223 } 10348 }
10224 10349
10225 class _SVGElementInstanceEventsImpl extends _EventsImpl implements SVGElementIns tanceEvents { 10350 class _SVGElementInstanceEventsImpl extends _EventsImpl implements SVGElementIns tanceEvents {
10226 _SVGElementInstanceEventsImpl(_ptr) : super(_ptr); 10351 _SVGElementInstanceEventsImpl(_ptr) : super(_ptr);
10227 10352
10228 EventListenerList get abort() => _get('abort'); 10353 EventListenerList get abort() => _get('abort');
10229 10354
10230 EventListenerList get beforeCopy() => _get('beforecopy'); 10355 EventListenerList get beforeCopy() => _get('beforecopy');
10231 10356
10232 EventListenerList get beforeCut() => _get('beforecut'); 10357 EventListenerList get beforeCut() => _get('beforecut');
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
10338 String xmllang; 10463 String xmllang;
10339 10464
10340 String xmlspace; 10465 String xmlspace;
10341 10466
10342 // From SVGExternalResourcesRequired 10467 // From SVGExternalResourcesRequired
10343 10468
10344 final _SVGAnimatedBooleanImpl externalResourcesRequired; 10469 final _SVGAnimatedBooleanImpl externalResourcesRequired;
10345 10470
10346 // From SVGStylable 10471 // From SVGStylable
10347 10472
10348 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 10473 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
10349 10474
10350 // Use implementation from Element. 10475 // Use implementation from Element.
10351 // final _CSSStyleDeclarationImpl style; 10476 // final _CSSStyleDeclarationImpl style;
10352 10477
10353 _CSSValueImpl getPresentationAttribute(String name) native; 10478 _CSSValueImpl getPresentationAttribute(String name) native;
10354 10479
10355 // From SVGTransformable 10480 // From SVGTransformable
10356 10481
10357 final _SVGAnimatedTransformListImpl transform; 10482 final _SVGAnimatedTransformListImpl transform;
10358 10483
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
10420 final _SVGAnimatedStringImpl result; 10545 final _SVGAnimatedStringImpl result;
10421 10546
10422 final _SVGAnimatedLengthImpl width; 10547 final _SVGAnimatedLengthImpl width;
10423 10548
10424 final _SVGAnimatedLengthImpl x; 10549 final _SVGAnimatedLengthImpl x;
10425 10550
10426 final _SVGAnimatedLengthImpl y; 10551 final _SVGAnimatedLengthImpl y;
10427 10552
10428 // From SVGStylable 10553 // From SVGStylable
10429 10554
10430 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 10555 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
10431 10556
10432 // Use implementation from Element. 10557 // Use implementation from Element.
10433 // final _CSSStyleDeclarationImpl style; 10558 // final _CSSStyleDeclarationImpl style;
10434 10559
10435 _CSSValueImpl getPresentationAttribute(String name) native; 10560 _CSSValueImpl getPresentationAttribute(String name) native;
10436 } 10561 }
10437 10562
10438 class _SVGFEColorMatrixElementImpl extends _SVGElementImpl implements SVGFEColor MatrixElement native "*SVGFEColorMatrixElement" { 10563 class _SVGFEColorMatrixElementImpl extends _SVGElementImpl implements SVGFEColor MatrixElement native "*SVGFEColorMatrixElement" {
10439 10564
10440 static final int SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3; 10565 static final int SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3;
(...skipping 19 matching lines...) Expand all
10460 final _SVGAnimatedStringImpl result; 10585 final _SVGAnimatedStringImpl result;
10461 10586
10462 final _SVGAnimatedLengthImpl width; 10587 final _SVGAnimatedLengthImpl width;
10463 10588
10464 final _SVGAnimatedLengthImpl x; 10589 final _SVGAnimatedLengthImpl x;
10465 10590
10466 final _SVGAnimatedLengthImpl y; 10591 final _SVGAnimatedLengthImpl y;
10467 10592
10468 // From SVGStylable 10593 // From SVGStylable
10469 10594
10470 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 10595 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
10471 10596
10472 // Use implementation from Element. 10597 // Use implementation from Element.
10473 // final _CSSStyleDeclarationImpl style; 10598 // final _CSSStyleDeclarationImpl style;
10474 10599
10475 _CSSValueImpl getPresentationAttribute(String name) native; 10600 _CSSValueImpl getPresentationAttribute(String name) native;
10476 } 10601 }
10477 10602
10478 class _SVGFEComponentTransferElementImpl extends _SVGElementImpl implements SVGF EComponentTransferElement native "*SVGFEComponentTransferElement" { 10603 class _SVGFEComponentTransferElementImpl extends _SVGElementImpl implements SVGF EComponentTransferElement native "*SVGFEComponentTransferElement" {
10479 10604
10480 final _SVGAnimatedStringImpl in1; 10605 final _SVGAnimatedStringImpl in1;
10481 10606
10482 // From SVGFilterPrimitiveStandardAttributes 10607 // From SVGFilterPrimitiveStandardAttributes
10483 10608
10484 final _SVGAnimatedLengthImpl height; 10609 final _SVGAnimatedLengthImpl height;
10485 10610
10486 final _SVGAnimatedStringImpl result; 10611 final _SVGAnimatedStringImpl result;
10487 10612
10488 final _SVGAnimatedLengthImpl width; 10613 final _SVGAnimatedLengthImpl width;
10489 10614
10490 final _SVGAnimatedLengthImpl x; 10615 final _SVGAnimatedLengthImpl x;
10491 10616
10492 final _SVGAnimatedLengthImpl y; 10617 final _SVGAnimatedLengthImpl y;
10493 10618
10494 // From SVGStylable 10619 // From SVGStylable
10495 10620
10496 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 10621 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
10497 10622
10498 // Use implementation from Element. 10623 // Use implementation from Element.
10499 // final _CSSStyleDeclarationImpl style; 10624 // final _CSSStyleDeclarationImpl style;
10500 10625
10501 _CSSValueImpl getPresentationAttribute(String name) native; 10626 _CSSValueImpl getPresentationAttribute(String name) native;
10502 } 10627 }
10503 10628
10504 class _SVGFECompositeElementImpl extends _SVGElementImpl implements SVGFEComposi teElement native "*SVGFECompositeElement" { 10629 class _SVGFECompositeElementImpl extends _SVGElementImpl implements SVGFEComposi teElement native "*SVGFECompositeElement" {
10505 10630
10506 static final int SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6; 10631 static final int SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
10538 final _SVGAnimatedStringImpl result; 10663 final _SVGAnimatedStringImpl result;
10539 10664
10540 final _SVGAnimatedLengthImpl width; 10665 final _SVGAnimatedLengthImpl width;
10541 10666
10542 final _SVGAnimatedLengthImpl x; 10667 final _SVGAnimatedLengthImpl x;
10543 10668
10544 final _SVGAnimatedLengthImpl y; 10669 final _SVGAnimatedLengthImpl y;
10545 10670
10546 // From SVGStylable 10671 // From SVGStylable
10547 10672
10548 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 10673 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
10549 10674
10550 // Use implementation from Element. 10675 // Use implementation from Element.
10551 // final _CSSStyleDeclarationImpl style; 10676 // final _CSSStyleDeclarationImpl style;
10552 10677
10553 _CSSValueImpl getPresentationAttribute(String name) native; 10678 _CSSValueImpl getPresentationAttribute(String name) native;
10554 } 10679 }
10555 10680
10556 class _SVGFEConvolveMatrixElementImpl extends _SVGElementImpl implements SVGFECo nvolveMatrixElement native "*SVGFEConvolveMatrixElement" { 10681 class _SVGFEConvolveMatrixElementImpl extends _SVGElementImpl implements SVGFECo nvolveMatrixElement native "*SVGFEConvolveMatrixElement" {
10557 10682
10558 static final int SVG_EDGEMODE_DUPLICATE = 1; 10683 static final int SVG_EDGEMODE_DUPLICATE = 1;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
10594 final _SVGAnimatedStringImpl result; 10719 final _SVGAnimatedStringImpl result;
10595 10720
10596 final _SVGAnimatedLengthImpl width; 10721 final _SVGAnimatedLengthImpl width;
10597 10722
10598 final _SVGAnimatedLengthImpl x; 10723 final _SVGAnimatedLengthImpl x;
10599 10724
10600 final _SVGAnimatedLengthImpl y; 10725 final _SVGAnimatedLengthImpl y;
10601 10726
10602 // From SVGStylable 10727 // From SVGStylable
10603 10728
10604 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 10729 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
10605 10730
10606 // Use implementation from Element. 10731 // Use implementation from Element.
10607 // final _CSSStyleDeclarationImpl style; 10732 // final _CSSStyleDeclarationImpl style;
10608 10733
10609 _CSSValueImpl getPresentationAttribute(String name) native; 10734 _CSSValueImpl getPresentationAttribute(String name) native;
10610 } 10735 }
10611 10736
10612 class _SVGFEDiffuseLightingElementImpl extends _SVGElementImpl implements SVGFED iffuseLightingElement native "*SVGFEDiffuseLightingElement" { 10737 class _SVGFEDiffuseLightingElementImpl extends _SVGElementImpl implements SVGFED iffuseLightingElement native "*SVGFEDiffuseLightingElement" {
10613 10738
10614 final _SVGAnimatedNumberImpl diffuseConstant; 10739 final _SVGAnimatedNumberImpl diffuseConstant;
(...skipping 13 matching lines...) Expand all
10628 final _SVGAnimatedStringImpl result; 10753 final _SVGAnimatedStringImpl result;
10629 10754
10630 final _SVGAnimatedLengthImpl width; 10755 final _SVGAnimatedLengthImpl width;
10631 10756
10632 final _SVGAnimatedLengthImpl x; 10757 final _SVGAnimatedLengthImpl x;
10633 10758
10634 final _SVGAnimatedLengthImpl y; 10759 final _SVGAnimatedLengthImpl y;
10635 10760
10636 // From SVGStylable 10761 // From SVGStylable
10637 10762
10638 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 10763 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
10639 10764
10640 // Use implementation from Element. 10765 // Use implementation from Element.
10641 // final _CSSStyleDeclarationImpl style; 10766 // final _CSSStyleDeclarationImpl style;
10642 10767
10643 _CSSValueImpl getPresentationAttribute(String name) native; 10768 _CSSValueImpl getPresentationAttribute(String name) native;
10644 } 10769 }
10645 10770
10646 class _SVGFEDisplacementMapElementImpl extends _SVGElementImpl implements SVGFED isplacementMapElement native "*SVGFEDisplacementMapElement" { 10771 class _SVGFEDisplacementMapElementImpl extends _SVGElementImpl implements SVGFED isplacementMapElement native "*SVGFEDisplacementMapElement" {
10647 10772
10648 static final int SVG_CHANNEL_A = 4; 10773 static final int SVG_CHANNEL_A = 4;
(...skipping 23 matching lines...) Expand all
10672 final _SVGAnimatedStringImpl result; 10797 final _SVGAnimatedStringImpl result;
10673 10798
10674 final _SVGAnimatedLengthImpl width; 10799 final _SVGAnimatedLengthImpl width;
10675 10800
10676 final _SVGAnimatedLengthImpl x; 10801 final _SVGAnimatedLengthImpl x;
10677 10802
10678 final _SVGAnimatedLengthImpl y; 10803 final _SVGAnimatedLengthImpl y;
10679 10804
10680 // From SVGStylable 10805 // From SVGStylable
10681 10806
10682 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 10807 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
10683 10808
10684 // Use implementation from Element. 10809 // Use implementation from Element.
10685 // final _CSSStyleDeclarationImpl style; 10810 // final _CSSStyleDeclarationImpl style;
10686 10811
10687 _CSSValueImpl getPresentationAttribute(String name) native; 10812 _CSSValueImpl getPresentationAttribute(String name) native;
10688 } 10813 }
10689 10814
10690 class _SVGFEDistantLightElementImpl extends _SVGElementImpl implements SVGFEDist antLightElement native "*SVGFEDistantLightElement" { 10815 class _SVGFEDistantLightElementImpl extends _SVGElementImpl implements SVGFEDist antLightElement native "*SVGFEDistantLightElement" {
10691 10816
10692 final _SVGAnimatedNumberImpl azimuth; 10817 final _SVGAnimatedNumberImpl azimuth;
(...skipping 22 matching lines...) Expand all
10715 final _SVGAnimatedStringImpl result; 10840 final _SVGAnimatedStringImpl result;
10716 10841
10717 final _SVGAnimatedLengthImpl width; 10842 final _SVGAnimatedLengthImpl width;
10718 10843
10719 final _SVGAnimatedLengthImpl x; 10844 final _SVGAnimatedLengthImpl x;
10720 10845
10721 final _SVGAnimatedLengthImpl y; 10846 final _SVGAnimatedLengthImpl y;
10722 10847
10723 // From SVGStylable 10848 // From SVGStylable
10724 10849
10725 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 10850 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
10726 10851
10727 // Use implementation from Element. 10852 // Use implementation from Element.
10728 // final _CSSStyleDeclarationImpl style; 10853 // final _CSSStyleDeclarationImpl style;
10729 10854
10730 _CSSValueImpl getPresentationAttribute(String name) native; 10855 _CSSValueImpl getPresentationAttribute(String name) native;
10731 } 10856 }
10732 10857
10733 class _SVGFEFloodElementImpl extends _SVGElementImpl implements SVGFEFloodElemen t native "*SVGFEFloodElement" { 10858 class _SVGFEFloodElementImpl extends _SVGElementImpl implements SVGFEFloodElemen t native "*SVGFEFloodElement" {
10734 10859
10735 // From SVGFilterPrimitiveStandardAttributes 10860 // From SVGFilterPrimitiveStandardAttributes
10736 10861
10737 final _SVGAnimatedLengthImpl height; 10862 final _SVGAnimatedLengthImpl height;
10738 10863
10739 final _SVGAnimatedStringImpl result; 10864 final _SVGAnimatedStringImpl result;
10740 10865
10741 final _SVGAnimatedLengthImpl width; 10866 final _SVGAnimatedLengthImpl width;
10742 10867
10743 final _SVGAnimatedLengthImpl x; 10868 final _SVGAnimatedLengthImpl x;
10744 10869
10745 final _SVGAnimatedLengthImpl y; 10870 final _SVGAnimatedLengthImpl y;
10746 10871
10747 // From SVGStylable 10872 // From SVGStylable
10748 10873
10749 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 10874 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
10750 10875
10751 // Use implementation from Element. 10876 // Use implementation from Element.
10752 // final _CSSStyleDeclarationImpl style; 10877 // final _CSSStyleDeclarationImpl style;
10753 10878
10754 _CSSValueImpl getPresentationAttribute(String name) native; 10879 _CSSValueImpl getPresentationAttribute(String name) native;
10755 } 10880 }
10756 10881
10757 class _SVGFEFuncAElementImpl extends _SVGComponentTransferFunctionElementImpl im plements SVGFEFuncAElement native "*SVGFEFuncAElement" { 10882 class _SVGFEFuncAElementImpl extends _SVGComponentTransferFunctionElementImpl im plements SVGFEFuncAElement native "*SVGFEFuncAElement" {
10758 } 10883 }
10759 10884
(...skipping 23 matching lines...) Expand all
10783 final _SVGAnimatedStringImpl result; 10908 final _SVGAnimatedStringImpl result;
10784 10909
10785 final _SVGAnimatedLengthImpl width; 10910 final _SVGAnimatedLengthImpl width;
10786 10911
10787 final _SVGAnimatedLengthImpl x; 10912 final _SVGAnimatedLengthImpl x;
10788 10913
10789 final _SVGAnimatedLengthImpl y; 10914 final _SVGAnimatedLengthImpl y;
10790 10915
10791 // From SVGStylable 10916 // From SVGStylable
10792 10917
10793 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 10918 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
10794 10919
10795 // Use implementation from Element. 10920 // Use implementation from Element.
10796 // final _CSSStyleDeclarationImpl style; 10921 // final _CSSStyleDeclarationImpl style;
10797 10922
10798 _CSSValueImpl getPresentationAttribute(String name) native; 10923 _CSSValueImpl getPresentationAttribute(String name) native;
10799 } 10924 }
10800 10925
10801 class _SVGFEImageElementImpl extends _SVGElementImpl implements SVGFEImageElemen t native "*SVGFEImageElement" { 10926 class _SVGFEImageElementImpl extends _SVGElementImpl implements SVGFEImageElemen t native "*SVGFEImageElement" {
10802 10927
10803 final _SVGAnimatedPreserveAspectRatioImpl preserveAspectRatio; 10928 final _SVGAnimatedPreserveAspectRatioImpl preserveAspectRatio;
(...skipping 19 matching lines...) Expand all
10823 final _SVGAnimatedStringImpl result; 10948 final _SVGAnimatedStringImpl result;
10824 10949
10825 final _SVGAnimatedLengthImpl width; 10950 final _SVGAnimatedLengthImpl width;
10826 10951
10827 final _SVGAnimatedLengthImpl x; 10952 final _SVGAnimatedLengthImpl x;
10828 10953
10829 final _SVGAnimatedLengthImpl y; 10954 final _SVGAnimatedLengthImpl y;
10830 10955
10831 // From SVGStylable 10956 // From SVGStylable
10832 10957
10833 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 10958 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
10834 10959
10835 // Use implementation from Element. 10960 // Use implementation from Element.
10836 // final _CSSStyleDeclarationImpl style; 10961 // final _CSSStyleDeclarationImpl style;
10837 10962
10838 _CSSValueImpl getPresentationAttribute(String name) native; 10963 _CSSValueImpl getPresentationAttribute(String name) native;
10839 } 10964 }
10840 10965
10841 class _SVGFEMergeElementImpl extends _SVGElementImpl implements SVGFEMergeElemen t native "*SVGFEMergeElement" { 10966 class _SVGFEMergeElementImpl extends _SVGElementImpl implements SVGFEMergeElemen t native "*SVGFEMergeElement" {
10842 10967
10843 // From SVGFilterPrimitiveStandardAttributes 10968 // From SVGFilterPrimitiveStandardAttributes
10844 10969
10845 final _SVGAnimatedLengthImpl height; 10970 final _SVGAnimatedLengthImpl height;
10846 10971
10847 final _SVGAnimatedStringImpl result; 10972 final _SVGAnimatedStringImpl result;
10848 10973
10849 final _SVGAnimatedLengthImpl width; 10974 final _SVGAnimatedLengthImpl width;
10850 10975
10851 final _SVGAnimatedLengthImpl x; 10976 final _SVGAnimatedLengthImpl x;
10852 10977
10853 final _SVGAnimatedLengthImpl y; 10978 final _SVGAnimatedLengthImpl y;
10854 10979
10855 // From SVGStylable 10980 // From SVGStylable
10856 10981
10857 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 10982 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
10858 10983
10859 // Use implementation from Element. 10984 // Use implementation from Element.
10860 // final _CSSStyleDeclarationImpl style; 10985 // final _CSSStyleDeclarationImpl style;
10861 10986
10862 _CSSValueImpl getPresentationAttribute(String name) native; 10987 _CSSValueImpl getPresentationAttribute(String name) native;
10863 } 10988 }
10864 10989
10865 class _SVGFEMergeNodeElementImpl extends _SVGElementImpl implements SVGFEMergeNo deElement native "*SVGFEMergeNodeElement" { 10990 class _SVGFEMergeNodeElementImpl extends _SVGElementImpl implements SVGFEMergeNo deElement native "*SVGFEMergeNodeElement" {
10866 10991
10867 final _SVGAnimatedStringImpl in1; 10992 final _SVGAnimatedStringImpl in1;
(...skipping 24 matching lines...) Expand all
10892 final _SVGAnimatedStringImpl result; 11017 final _SVGAnimatedStringImpl result;
10893 11018
10894 final _SVGAnimatedLengthImpl width; 11019 final _SVGAnimatedLengthImpl width;
10895 11020
10896 final _SVGAnimatedLengthImpl x; 11021 final _SVGAnimatedLengthImpl x;
10897 11022
10898 final _SVGAnimatedLengthImpl y; 11023 final _SVGAnimatedLengthImpl y;
10899 11024
10900 // From SVGStylable 11025 // From SVGStylable
10901 11026
10902 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 11027 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
10903 11028
10904 // Use implementation from Element. 11029 // Use implementation from Element.
10905 // final _CSSStyleDeclarationImpl style; 11030 // final _CSSStyleDeclarationImpl style;
10906 11031
10907 _CSSValueImpl getPresentationAttribute(String name) native; 11032 _CSSValueImpl getPresentationAttribute(String name) native;
10908 } 11033 }
10909 11034
10910 class _SVGFEOffsetElementImpl extends _SVGElementImpl implements SVGFEOffsetElem ent native "*SVGFEOffsetElement" { 11035 class _SVGFEOffsetElementImpl extends _SVGElementImpl implements SVGFEOffsetElem ent native "*SVGFEOffsetElement" {
10911 11036
10912 final _SVGAnimatedNumberImpl dx; 11037 final _SVGAnimatedNumberImpl dx;
10913 11038
10914 final _SVGAnimatedNumberImpl dy; 11039 final _SVGAnimatedNumberImpl dy;
10915 11040
10916 final _SVGAnimatedStringImpl in1; 11041 final _SVGAnimatedStringImpl in1;
10917 11042
10918 // From SVGFilterPrimitiveStandardAttributes 11043 // From SVGFilterPrimitiveStandardAttributes
10919 11044
10920 final _SVGAnimatedLengthImpl height; 11045 final _SVGAnimatedLengthImpl height;
10921 11046
10922 final _SVGAnimatedStringImpl result; 11047 final _SVGAnimatedStringImpl result;
10923 11048
10924 final _SVGAnimatedLengthImpl width; 11049 final _SVGAnimatedLengthImpl width;
10925 11050
10926 final _SVGAnimatedLengthImpl x; 11051 final _SVGAnimatedLengthImpl x;
10927 11052
10928 final _SVGAnimatedLengthImpl y; 11053 final _SVGAnimatedLengthImpl y;
10929 11054
10930 // From SVGStylable 11055 // From SVGStylable
10931 11056
10932 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 11057 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
10933 11058
10934 // Use implementation from Element. 11059 // Use implementation from Element.
10935 // final _CSSStyleDeclarationImpl style; 11060 // final _CSSStyleDeclarationImpl style;
10936 11061
10937 _CSSValueImpl getPresentationAttribute(String name) native; 11062 _CSSValueImpl getPresentationAttribute(String name) native;
10938 } 11063 }
10939 11064
10940 class _SVGFEPointLightElementImpl extends _SVGElementImpl implements SVGFEPointL ightElement native "*SVGFEPointLightElement" { 11065 class _SVGFEPointLightElementImpl extends _SVGElementImpl implements SVGFEPointL ightElement native "*SVGFEPointLightElement" {
10941 11066
10942 final _SVGAnimatedNumberImpl x; 11067 final _SVGAnimatedNumberImpl x;
(...skipping 20 matching lines...) Expand all
10963 final _SVGAnimatedStringImpl result; 11088 final _SVGAnimatedStringImpl result;
10964 11089
10965 final _SVGAnimatedLengthImpl width; 11090 final _SVGAnimatedLengthImpl width;
10966 11091
10967 final _SVGAnimatedLengthImpl x; 11092 final _SVGAnimatedLengthImpl x;
10968 11093
10969 final _SVGAnimatedLengthImpl y; 11094 final _SVGAnimatedLengthImpl y;
10970 11095
10971 // From SVGStylable 11096 // From SVGStylable
10972 11097
10973 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 11098 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
10974 11099
10975 // Use implementation from Element. 11100 // Use implementation from Element.
10976 // final _CSSStyleDeclarationImpl style; 11101 // final _CSSStyleDeclarationImpl style;
10977 11102
10978 _CSSValueImpl getPresentationAttribute(String name) native; 11103 _CSSValueImpl getPresentationAttribute(String name) native;
10979 } 11104 }
10980 11105
10981 class _SVGFESpotLightElementImpl extends _SVGElementImpl implements SVGFESpotLig htElement native "*SVGFESpotLightElement" { 11106 class _SVGFESpotLightElementImpl extends _SVGElementImpl implements SVGFESpotLig htElement native "*SVGFESpotLightElement" {
10982 11107
10983 final _SVGAnimatedNumberImpl limitingConeAngle; 11108 final _SVGAnimatedNumberImpl limitingConeAngle;
(...skipping 24 matching lines...) Expand all
11008 final _SVGAnimatedStringImpl result; 11133 final _SVGAnimatedStringImpl result;
11009 11134
11010 final _SVGAnimatedLengthImpl width; 11135 final _SVGAnimatedLengthImpl width;
11011 11136
11012 final _SVGAnimatedLengthImpl x; 11137 final _SVGAnimatedLengthImpl x;
11013 11138
11014 final _SVGAnimatedLengthImpl y; 11139 final _SVGAnimatedLengthImpl y;
11015 11140
11016 // From SVGStylable 11141 // From SVGStylable
11017 11142
11018 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 11143 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
11019 11144
11020 // Use implementation from Element. 11145 // Use implementation from Element.
11021 // final _CSSStyleDeclarationImpl style; 11146 // final _CSSStyleDeclarationImpl style;
11022 11147
11023 _CSSValueImpl getPresentationAttribute(String name) native; 11148 _CSSValueImpl getPresentationAttribute(String name) native;
11024 } 11149 }
11025 11150
11026 class _SVGFETurbulenceElementImpl extends _SVGElementImpl implements SVGFETurbul enceElement native "*SVGFETurbulenceElement" { 11151 class _SVGFETurbulenceElementImpl extends _SVGElementImpl implements SVGFETurbul enceElement native "*SVGFETurbulenceElement" {
11027 11152
11028 static final int SVG_STITCHTYPE_NOSTITCH = 2; 11153 static final int SVG_STITCHTYPE_NOSTITCH = 2;
(...skipping 27 matching lines...) Expand all
11056 final _SVGAnimatedStringImpl result; 11181 final _SVGAnimatedStringImpl result;
11057 11182
11058 final _SVGAnimatedLengthImpl width; 11183 final _SVGAnimatedLengthImpl width;
11059 11184
11060 final _SVGAnimatedLengthImpl x; 11185 final _SVGAnimatedLengthImpl x;
11061 11186
11062 final _SVGAnimatedLengthImpl y; 11187 final _SVGAnimatedLengthImpl y;
11063 11188
11064 // From SVGStylable 11189 // From SVGStylable
11065 11190
11066 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 11191 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
11067 11192
11068 // Use implementation from Element. 11193 // Use implementation from Element.
11069 // final _CSSStyleDeclarationImpl style; 11194 // final _CSSStyleDeclarationImpl style;
11070 11195
11071 _CSSValueImpl getPresentationAttribute(String name) native; 11196 _CSSValueImpl getPresentationAttribute(String name) native;
11072 } 11197 }
11073 11198
11074 class _SVGFilterElementImpl extends _SVGElementImpl implements SVGFilterElement native "*SVGFilterElement" { 11199 class _SVGFilterElementImpl extends _SVGElementImpl implements SVGFilterElement native "*SVGFilterElement" {
11075 11200
11076 final _SVGAnimatedIntegerImpl filterResX; 11201 final _SVGAnimatedIntegerImpl filterResX;
(...skipping 23 matching lines...) Expand all
11100 String xmllang; 11225 String xmllang;
11101 11226
11102 String xmlspace; 11227 String xmlspace;
11103 11228
11104 // From SVGExternalResourcesRequired 11229 // From SVGExternalResourcesRequired
11105 11230
11106 final _SVGAnimatedBooleanImpl externalResourcesRequired; 11231 final _SVGAnimatedBooleanImpl externalResourcesRequired;
11107 11232
11108 // From SVGStylable 11233 // From SVGStylable
11109 11234
11110 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 11235 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
11111 11236
11112 // Use implementation from Element. 11237 // Use implementation from Element.
11113 // final _CSSStyleDeclarationImpl style; 11238 // final _CSSStyleDeclarationImpl style;
11114 11239
11115 _CSSValueImpl getPresentationAttribute(String name) native; 11240 _CSSValueImpl getPresentationAttribute(String name) native;
11116 } 11241 }
11117 11242
11118 class _SVGFilterPrimitiveStandardAttributesImpl extends _SVGStylableImpl impleme nts SVGFilterPrimitiveStandardAttributes native "*SVGFilterPrimitiveStandardAttr ibutes" { 11243 class _SVGFilterPrimitiveStandardAttributesImpl extends _SVGStylableImpl impleme nts SVGFilterPrimitiveStandardAttributes native "*SVGFilterPrimitiveStandardAttr ibutes" {
11119 11244
11120 final _SVGAnimatedLengthImpl height; 11245 final _SVGAnimatedLengthImpl height;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
11178 String xmllang; 11303 String xmllang;
11179 11304
11180 String xmlspace; 11305 String xmlspace;
11181 11306
11182 // From SVGExternalResourcesRequired 11307 // From SVGExternalResourcesRequired
11183 11308
11184 final _SVGAnimatedBooleanImpl externalResourcesRequired; 11309 final _SVGAnimatedBooleanImpl externalResourcesRequired;
11185 11310
11186 // From SVGStylable 11311 // From SVGStylable
11187 11312
11188 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 11313 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
11189 11314
11190 // Use implementation from Element. 11315 // Use implementation from Element.
11191 // final _CSSStyleDeclarationImpl style; 11316 // final _CSSStyleDeclarationImpl style;
11192 11317
11193 _CSSValueImpl getPresentationAttribute(String name) native; 11318 _CSSValueImpl getPresentationAttribute(String name) native;
11194 11319
11195 // From SVGTransformable 11320 // From SVGTransformable
11196 11321
11197 final _SVGAnimatedTransformListImpl transform; 11322 final _SVGAnimatedTransformListImpl transform;
11198 11323
(...skipping 29 matching lines...) Expand all
11228 String xmllang; 11353 String xmllang;
11229 11354
11230 String xmlspace; 11355 String xmlspace;
11231 11356
11232 // From SVGExternalResourcesRequired 11357 // From SVGExternalResourcesRequired
11233 11358
11234 final _SVGAnimatedBooleanImpl externalResourcesRequired; 11359 final _SVGAnimatedBooleanImpl externalResourcesRequired;
11235 11360
11236 // From SVGStylable 11361 // From SVGStylable
11237 11362
11238 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 11363 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
11239 11364
11240 // Use implementation from Element. 11365 // Use implementation from Element.
11241 // final _CSSStyleDeclarationImpl style; 11366 // final _CSSStyleDeclarationImpl style;
11242 11367
11243 _CSSValueImpl getPresentationAttribute(String name) native; 11368 _CSSValueImpl getPresentationAttribute(String name) native;
11244 11369
11245 // From SVGTransformable 11370 // From SVGTransformable
11246 11371
11247 final _SVGAnimatedTransformListImpl transform; 11372 final _SVGAnimatedTransformListImpl transform;
11248 11373
(...skipping 28 matching lines...) Expand all
11277 num x; 11402 num x;
11278 11403
11279 num y; 11404 num y;
11280 11405
11281 // From SVGURIReference 11406 // From SVGURIReference
11282 11407
11283 final _SVGAnimatedStringImpl href; 11408 final _SVGAnimatedStringImpl href;
11284 11409
11285 // From SVGStylable 11410 // From SVGStylable
11286 11411
11287 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 11412 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
11288 11413
11289 // Use implementation from Element. 11414 // Use implementation from Element.
11290 // final _CSSStyleDeclarationImpl style; 11415 // final _CSSStyleDeclarationImpl style;
11291 11416
11292 _CSSValueImpl getPresentationAttribute(String name) native; 11417 _CSSValueImpl getPresentationAttribute(String name) native;
11293 } 11418 }
11294 11419
11295 class _SVGGradientElementImpl extends _SVGElementImpl implements SVGGradientElem ent native "*SVGGradientElement" { 11420 class _SVGGradientElementImpl extends _SVGElementImpl implements SVGGradientElem ent native "*SVGGradientElement" {
11296 11421
11297 static final int SVG_SPREADMETHOD_PAD = 1; 11422 static final int SVG_SPREADMETHOD_PAD = 1;
(...skipping 13 matching lines...) Expand all
11311 // From SVGURIReference 11436 // From SVGURIReference
11312 11437
11313 final _SVGAnimatedStringImpl href; 11438 final _SVGAnimatedStringImpl href;
11314 11439
11315 // From SVGExternalResourcesRequired 11440 // From SVGExternalResourcesRequired
11316 11441
11317 final _SVGAnimatedBooleanImpl externalResourcesRequired; 11442 final _SVGAnimatedBooleanImpl externalResourcesRequired;
11318 11443
11319 // From SVGStylable 11444 // From SVGStylable
11320 11445
11321 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 11446 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
11322 11447
11323 // Use implementation from Element. 11448 // Use implementation from Element.
11324 // final _CSSStyleDeclarationImpl style; 11449 // final _CSSStyleDeclarationImpl style;
11325 11450
11326 _CSSValueImpl getPresentationAttribute(String name) native; 11451 _CSSValueImpl getPresentationAttribute(String name) native;
11327 } 11452 }
11328 11453
11329 class _SVGHKernElementImpl extends _SVGElementImpl implements SVGHKernElement na tive "*SVGHKernElement" { 11454 class _SVGHKernElementImpl extends _SVGElementImpl implements SVGHKernElement na tive "*SVGHKernElement" {
11330 } 11455 }
11331 11456
(...skipping 28 matching lines...) Expand all
11360 String xmllang; 11485 String xmllang;
11361 11486
11362 String xmlspace; 11487 String xmlspace;
11363 11488
11364 // From SVGExternalResourcesRequired 11489 // From SVGExternalResourcesRequired
11365 11490
11366 final _SVGAnimatedBooleanImpl externalResourcesRequired; 11491 final _SVGAnimatedBooleanImpl externalResourcesRequired;
11367 11492
11368 // From SVGStylable 11493 // From SVGStylable
11369 11494
11370 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 11495 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
11371 11496
11372 // Use implementation from Element. 11497 // Use implementation from Element.
11373 // final _CSSStyleDeclarationImpl style; 11498 // final _CSSStyleDeclarationImpl style;
11374 11499
11375 _CSSValueImpl getPresentationAttribute(String name) native; 11500 _CSSValueImpl getPresentationAttribute(String name) native;
11376 11501
11377 // From SVGTransformable 11502 // From SVGTransformable
11378 11503
11379 final _SVGAnimatedTransformListImpl transform; 11504 final _SVGAnimatedTransformListImpl transform;
11380 11505
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
11481 String xmllang; 11606 String xmllang;
11482 11607
11483 String xmlspace; 11608 String xmlspace;
11484 11609
11485 // From SVGExternalResourcesRequired 11610 // From SVGExternalResourcesRequired
11486 11611
11487 final _SVGAnimatedBooleanImpl externalResourcesRequired; 11612 final _SVGAnimatedBooleanImpl externalResourcesRequired;
11488 11613
11489 // From SVGStylable 11614 // From SVGStylable
11490 11615
11491 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 11616 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
11492 11617
11493 // Use implementation from Element. 11618 // Use implementation from Element.
11494 // final _CSSStyleDeclarationImpl style; 11619 // final _CSSStyleDeclarationImpl style;
11495 11620
11496 _CSSValueImpl getPresentationAttribute(String name) native; 11621 _CSSValueImpl getPresentationAttribute(String name) native;
11497 11622
11498 // From SVGTransformable 11623 // From SVGTransformable
11499 11624
11500 final _SVGAnimatedTransformListImpl transform; 11625 final _SVGAnimatedTransformListImpl transform;
11501 11626
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
11588 String xmllang; 11713 String xmllang;
11589 11714
11590 String xmlspace; 11715 String xmlspace;
11591 11716
11592 // From SVGExternalResourcesRequired 11717 // From SVGExternalResourcesRequired
11593 11718
11594 final _SVGAnimatedBooleanImpl externalResourcesRequired; 11719 final _SVGAnimatedBooleanImpl externalResourcesRequired;
11595 11720
11596 // From SVGStylable 11721 // From SVGStylable
11597 11722
11598 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 11723 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
11599 11724
11600 // Use implementation from Element. 11725 // Use implementation from Element.
11601 // final _CSSStyleDeclarationImpl style; 11726 // final _CSSStyleDeclarationImpl style;
11602 11727
11603 _CSSValueImpl getPresentationAttribute(String name) native; 11728 _CSSValueImpl getPresentationAttribute(String name) native;
11604 11729
11605 // From SVGFitToViewBox 11730 // From SVGFitToViewBox
11606 11731
11607 final _SVGAnimatedPreserveAspectRatioImpl preserveAspectRatio; 11732 final _SVGAnimatedPreserveAspectRatioImpl preserveAspectRatio;
11608 11733
(...skipping 29 matching lines...) Expand all
11638 String xmllang; 11763 String xmllang;
11639 11764
11640 String xmlspace; 11765 String xmlspace;
11641 11766
11642 // From SVGExternalResourcesRequired 11767 // From SVGExternalResourcesRequired
11643 11768
11644 final _SVGAnimatedBooleanImpl externalResourcesRequired; 11769 final _SVGAnimatedBooleanImpl externalResourcesRequired;
11645 11770
11646 // From SVGStylable 11771 // From SVGStylable
11647 11772
11648 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 11773 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
11649 11774
11650 // Use implementation from Element. 11775 // Use implementation from Element.
11651 // final _CSSStyleDeclarationImpl style; 11776 // final _CSSStyleDeclarationImpl style;
11652 11777
11653 _CSSValueImpl getPresentationAttribute(String name) native; 11778 _CSSValueImpl getPresentationAttribute(String name) native;
11654 } 11779 }
11655 11780
11656 class _SVGMatrixImpl implements SVGMatrix native "*SVGMatrix" { 11781 class _SVGMatrixImpl implements SVGMatrix native "*SVGMatrix" {
11657 11782
11658 num a; 11783 num a;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
11822 String xmllang; 11947 String xmllang;
11823 11948
11824 String xmlspace; 11949 String xmlspace;
11825 11950
11826 // From SVGExternalResourcesRequired 11951 // From SVGExternalResourcesRequired
11827 11952
11828 final _SVGAnimatedBooleanImpl externalResourcesRequired; 11953 final _SVGAnimatedBooleanImpl externalResourcesRequired;
11829 11954
11830 // From SVGStylable 11955 // From SVGStylable
11831 11956
11832 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 11957 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
11833 11958
11834 // Use implementation from Element. 11959 // Use implementation from Element.
11835 // final _CSSStyleDeclarationImpl style; 11960 // final _CSSStyleDeclarationImpl style;
11836 11961
11837 _CSSValueImpl getPresentationAttribute(String name) native; 11962 _CSSValueImpl getPresentationAttribute(String name) native;
11838 11963
11839 // From SVGTransformable 11964 // From SVGTransformable
11840 11965
11841 final _SVGAnimatedTransformListImpl transform; 11966 final _SVGAnimatedTransformListImpl transform;
11842 11967
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
12129 String xmllang; 12254 String xmllang;
12130 12255
12131 String xmlspace; 12256 String xmlspace;
12132 12257
12133 // From SVGExternalResourcesRequired 12258 // From SVGExternalResourcesRequired
12134 12259
12135 final _SVGAnimatedBooleanImpl externalResourcesRequired; 12260 final _SVGAnimatedBooleanImpl externalResourcesRequired;
12136 12261
12137 // From SVGStylable 12262 // From SVGStylable
12138 12263
12139 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 12264 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
12140 12265
12141 // Use implementation from Element. 12266 // Use implementation from Element.
12142 // final _CSSStyleDeclarationImpl style; 12267 // final _CSSStyleDeclarationImpl style;
12143 12268
12144 _CSSValueImpl getPresentationAttribute(String name) native; 12269 _CSSValueImpl getPresentationAttribute(String name) native;
12145 12270
12146 // From SVGFitToViewBox 12271 // From SVGFitToViewBox
12147 12272
12148 final _SVGAnimatedPreserveAspectRatioImpl preserveAspectRatio; 12273 final _SVGAnimatedPreserveAspectRatioImpl preserveAspectRatio;
12149 12274
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
12199 String xmllang; 12324 String xmllang;
12200 12325
12201 String xmlspace; 12326 String xmlspace;
12202 12327
12203 // From SVGExternalResourcesRequired 12328 // From SVGExternalResourcesRequired
12204 12329
12205 final _SVGAnimatedBooleanImpl externalResourcesRequired; 12330 final _SVGAnimatedBooleanImpl externalResourcesRequired;
12206 12331
12207 // From SVGStylable 12332 // From SVGStylable
12208 12333
12209 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 12334 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
12210 12335
12211 // Use implementation from Element. 12336 // Use implementation from Element.
12212 // final _CSSStyleDeclarationImpl style; 12337 // final _CSSStyleDeclarationImpl style;
12213 12338
12214 _CSSValueImpl getPresentationAttribute(String name) native; 12339 _CSSValueImpl getPresentationAttribute(String name) native;
12215 12340
12216 // From SVGTransformable 12341 // From SVGTransformable
12217 12342
12218 final _SVGAnimatedTransformListImpl transform; 12343 final _SVGAnimatedTransformListImpl transform;
12219 12344
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
12253 String xmllang; 12378 String xmllang;
12254 12379
12255 String xmlspace; 12380 String xmlspace;
12256 12381
12257 // From SVGExternalResourcesRequired 12382 // From SVGExternalResourcesRequired
12258 12383
12259 final _SVGAnimatedBooleanImpl externalResourcesRequired; 12384 final _SVGAnimatedBooleanImpl externalResourcesRequired;
12260 12385
12261 // From SVGStylable 12386 // From SVGStylable
12262 12387
12263 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 12388 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
12264 12389
12265 // Use implementation from Element. 12390 // Use implementation from Element.
12266 // final _CSSStyleDeclarationImpl style; 12391 // final _CSSStyleDeclarationImpl style;
12267 12392
12268 _CSSValueImpl getPresentationAttribute(String name) native; 12393 _CSSValueImpl getPresentationAttribute(String name) native;
12269 12394
12270 // From SVGTransformable 12395 // From SVGTransformable
12271 12396
12272 final _SVGAnimatedTransformListImpl transform; 12397 final _SVGAnimatedTransformListImpl transform;
12273 12398
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
12374 String xmllang; 12499 String xmllang;
12375 12500
12376 String xmlspace; 12501 String xmlspace;
12377 12502
12378 // From SVGExternalResourcesRequired 12503 // From SVGExternalResourcesRequired
12379 12504
12380 final _SVGAnimatedBooleanImpl externalResourcesRequired; 12505 final _SVGAnimatedBooleanImpl externalResourcesRequired;
12381 12506
12382 // From SVGStylable 12507 // From SVGStylable
12383 12508
12384 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 12509 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
12385 12510
12386 // Use implementation from Element. 12511 // Use implementation from Element.
12387 // final _CSSStyleDeclarationImpl style; 12512 // final _CSSStyleDeclarationImpl style;
12388 12513
12389 _CSSValueImpl getPresentationAttribute(String name) native; 12514 _CSSValueImpl getPresentationAttribute(String name) native;
12390 12515
12391 // From SVGTransformable 12516 // From SVGTransformable
12392 12517
12393 final _SVGAnimatedTransformListImpl transform; 12518 final _SVGAnimatedTransformListImpl transform;
12394 12519
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
12513 String xmllang; 12638 String xmllang;
12514 12639
12515 String xmlspace; 12640 String xmlspace;
12516 12641
12517 // From SVGExternalResourcesRequired 12642 // From SVGExternalResourcesRequired
12518 12643
12519 final _SVGAnimatedBooleanImpl externalResourcesRequired; 12644 final _SVGAnimatedBooleanImpl externalResourcesRequired;
12520 12645
12521 // From SVGStylable 12646 // From SVGStylable
12522 12647
12523 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 12648 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
12524 12649
12525 // Use implementation from Element. 12650 // Use implementation from Element.
12526 // final _CSSStyleDeclarationImpl style; 12651 // final _CSSStyleDeclarationImpl style;
12527 12652
12528 _CSSValueImpl getPresentationAttribute(String name) native; 12653 _CSSValueImpl getPresentationAttribute(String name) native;
12529 12654
12530 // From SVGLocatable 12655 // From SVGLocatable
12531 12656
12532 final _SVGElementImpl farthestViewportElement; 12657 final _SVGElementImpl farthestViewportElement;
12533 12658
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
12567 12692
12568 class _SVGSetElementImpl extends _SVGAnimationElementImpl implements SVGSetEleme nt native "*SVGSetElement" { 12693 class _SVGSetElementImpl extends _SVGAnimationElementImpl implements SVGSetEleme nt native "*SVGSetElement" {
12569 } 12694 }
12570 12695
12571 class _SVGStopElementImpl extends _SVGElementImpl implements SVGStopElement nati ve "*SVGStopElement" { 12696 class _SVGStopElementImpl extends _SVGElementImpl implements SVGStopElement nati ve "*SVGStopElement" {
12572 12697
12573 final _SVGAnimatedNumberImpl offset; 12698 final _SVGAnimatedNumberImpl offset;
12574 12699
12575 // From SVGStylable 12700 // From SVGStylable
12576 12701
12577 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 12702 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
12578 12703
12579 // Use implementation from Element. 12704 // Use implementation from Element.
12580 // final _CSSStyleDeclarationImpl style; 12705 // final _CSSStyleDeclarationImpl style;
12581 12706
12582 _CSSValueImpl getPresentationAttribute(String name) native; 12707 _CSSValueImpl getPresentationAttribute(String name) native;
12583 } 12708 }
12584 12709
12585 class _SVGStringListImpl implements SVGStringList native "*SVGStringList" { 12710 class _SVGStringListImpl implements SVGStringList native "*SVGStringList" {
12586 12711
12587 final int numberOfItems; 12712 final int numberOfItems;
12588 12713
12589 String appendItem(String item) native; 12714 String appendItem(String item) native;
12590 12715
12591 void clear() native; 12716 void clear() native;
12592 12717
12593 String getItem(int index) native; 12718 String getItem(int index) native;
12594 12719
12595 String initialize(String item) native; 12720 String initialize(String item) native;
12596 12721
12597 String insertItemBefore(String item, int index) native; 12722 String insertItemBefore(String item, int index) native;
12598 12723
12599 String removeItem(int index) native; 12724 String removeItem(int index) native;
12600 12725
12601 String replaceItem(String item, int index) native; 12726 String replaceItem(String item, int index) native;
12602 } 12727 }
12603 12728
12604 class _SVGStylableImpl implements SVGStylable native "*SVGStylable" { 12729 class _SVGStylableImpl implements SVGStylable native "*SVGStylable" {
12605 12730
12606 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 12731 _SVGAnimatedStringImpl get $dom_svgClassName() native "return this.className;" ;
12607 12732
12608 final _CSSStyleDeclarationImpl style; 12733 final _CSSStyleDeclarationImpl style;
12609 12734
12610 _CSSValueImpl getPresentationAttribute(String name) native; 12735 _CSSValueImpl getPresentationAttribute(String name) native;
12611 } 12736 }
12612 12737
12613 class _SVGStyleElementImpl extends _SVGElementImpl implements SVGStyleElement na tive "*SVGStyleElement" { 12738 class _SVGStyleElementImpl extends _SVGElementImpl implements SVGStyleElement na tive "*SVGStyleElement" {
12614 12739
12615 bool disabled; 12740 bool disabled;
12616 12741
(...skipping 30 matching lines...) Expand all
12647 String xmllang; 12772 String xmllang;
12648 12773
12649 String xmlspace; 12774 String xmlspace;
12650 12775
12651 // From SVGExternalResourcesRequired 12776 // From SVGExternalResourcesRequired
12652 12777
12653 final _SVGAnimatedBooleanImpl externalResourcesRequired; 12778 final _SVGAnimatedBooleanImpl externalResourcesRequired;
12654 12779
12655 // From SVGStylable 12780 // From SVGStylable
12656 12781
12657 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 12782 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
12658 12783
12659 // Use implementation from Element. 12784 // Use implementation from Element.
12660 // final _CSSStyleDeclarationImpl style; 12785 // final _CSSStyleDeclarationImpl style;
12661 12786
12662 _CSSValueImpl getPresentationAttribute(String name) native; 12787 _CSSValueImpl getPresentationAttribute(String name) native;
12663 12788
12664 // From SVGTransformable 12789 // From SVGTransformable
12665 12790
12666 final _SVGAnimatedTransformListImpl transform; 12791 final _SVGAnimatedTransformListImpl transform;
12667 12792
(...skipping 19 matching lines...) Expand all
12687 String xmllang; 12812 String xmllang;
12688 12813
12689 String xmlspace; 12814 String xmlspace;
12690 12815
12691 // From SVGExternalResourcesRequired 12816 // From SVGExternalResourcesRequired
12692 12817
12693 final _SVGAnimatedBooleanImpl externalResourcesRequired; 12818 final _SVGAnimatedBooleanImpl externalResourcesRequired;
12694 12819
12695 // From SVGStylable 12820 // From SVGStylable
12696 12821
12697 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 12822 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
12698 12823
12699 // Use implementation from Element. 12824 // Use implementation from Element.
12700 // final _CSSStyleDeclarationImpl style; 12825 // final _CSSStyleDeclarationImpl style;
12701 12826
12702 _CSSValueImpl getPresentationAttribute(String name) native; 12827 _CSSValueImpl getPresentationAttribute(String name) native;
12703 12828
12704 // From SVGFitToViewBox 12829 // From SVGFitToViewBox
12705 12830
12706 final _SVGAnimatedPreserveAspectRatioImpl preserveAspectRatio; 12831 final _SVGAnimatedPreserveAspectRatioImpl preserveAspectRatio;
12707 12832
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
12774 String xmllang; 12899 String xmllang;
12775 12900
12776 String xmlspace; 12901 String xmlspace;
12777 12902
12778 // From SVGExternalResourcesRequired 12903 // From SVGExternalResourcesRequired
12779 12904
12780 final _SVGAnimatedBooleanImpl externalResourcesRequired; 12905 final _SVGAnimatedBooleanImpl externalResourcesRequired;
12781 12906
12782 // From SVGStylable 12907 // From SVGStylable
12783 12908
12784 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 12909 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
12785 12910
12786 // Use implementation from Element. 12911 // Use implementation from Element.
12787 // final _CSSStyleDeclarationImpl style; 12912 // final _CSSStyleDeclarationImpl style;
12788 12913
12789 _CSSValueImpl getPresentationAttribute(String name) native; 12914 _CSSValueImpl getPresentationAttribute(String name) native;
12790 } 12915 }
12791 12916
12792 class _SVGTextElementImpl extends _SVGTextPositioningElementImpl implements SVGT extElement native "*SVGTextElement" { 12917 class _SVGTextElementImpl extends _SVGTextPositioningElementImpl implements SVGT extElement native "*SVGTextElement" {
12793 12918
12794 // From SVGTransformable 12919 // From SVGTransformable
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
12851 class _SVGTitleElementImpl extends _SVGElementImpl implements SVGTitleElement na tive "*SVGTitleElement" { 12976 class _SVGTitleElementImpl extends _SVGElementImpl implements SVGTitleElement na tive "*SVGTitleElement" {
12852 12977
12853 // From SVGLangSpace 12978 // From SVGLangSpace
12854 12979
12855 String xmllang; 12980 String xmllang;
12856 12981
12857 String xmlspace; 12982 String xmlspace;
12858 12983
12859 // From SVGStylable 12984 // From SVGStylable
12860 12985
12861 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 12986 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
12862 12987
12863 // Use implementation from Element. 12988 // Use implementation from Element.
12864 // final _CSSStyleDeclarationImpl style; 12989 // final _CSSStyleDeclarationImpl style;
12865 12990
12866 _CSSValueImpl getPresentationAttribute(String name) native; 12991 _CSSValueImpl getPresentationAttribute(String name) native;
12867 } 12992 }
12868 12993
12869 class _SVGTransformImpl implements SVGTransform native "*SVGTransform" { 12994 class _SVGTransformImpl implements SVGTransform native "*SVGTransform" {
12870 12995
12871 static final int SVG_TRANSFORM_MATRIX = 1; 12996 static final int SVG_TRANSFORM_MATRIX = 1;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
12976 String xmllang; 13101 String xmllang;
12977 13102
12978 String xmlspace; 13103 String xmlspace;
12979 13104
12980 // From SVGExternalResourcesRequired 13105 // From SVGExternalResourcesRequired
12981 13106
12982 final _SVGAnimatedBooleanImpl externalResourcesRequired; 13107 final _SVGAnimatedBooleanImpl externalResourcesRequired;
12983 13108
12984 // From SVGStylable 13109 // From SVGStylable
12985 13110
12986 _SVGAnimatedStringImpl get _svgClassName() native "return this.className;"; 13111 _SVGAnimatedStringImpl get $dom_$dom_svgClassName() native "return this.classN ame;";
12987 13112
12988 // Use implementation from Element. 13113 // Use implementation from Element.
12989 // final _CSSStyleDeclarationImpl style; 13114 // final _CSSStyleDeclarationImpl style;
12990 13115
12991 _CSSValueImpl getPresentationAttribute(String name) native; 13116 _CSSValueImpl getPresentationAttribute(String name) native;
12992 13117
12993 // From SVGTransformable 13118 // From SVGTransformable
12994 13119
12995 final _SVGAnimatedTransformListImpl transform; 13120 final _SVGAnimatedTransformListImpl transform;
12996 13121
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
13866 final int identifier; 13991 final int identifier;
13867 13992
13868 final int pageX; 13993 final int pageX;
13869 13994
13870 final int pageY; 13995 final int pageY;
13871 13996
13872 final int screenX; 13997 final int screenX;
13873 13998
13874 final int screenY; 13999 final int screenY;
13875 14000
13876 _EventTargetImpl get target() => _FixHtmlDocumentReference(_target); 14001 final _EventTargetImpl target;
13877
13878 _EventTargetImpl get _target() native "return this.target;";
13879 14002
13880 final num webkitForce; 14003 final num webkitForce;
13881 14004
13882 final int webkitRadiusX; 14005 final int webkitRadiusX;
13883 14006
13884 final int webkitRadiusY; 14007 final int webkitRadiusY;
13885 14008
13886 final num webkitRotationAngle; 14009 final num webkitRotationAngle;
13887 } 14010 }
13888 14011
(...skipping 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after
15411 final int bufferedAmount; 15534 final int bufferedAmount;
15412 15535
15413 final String extensions; 15536 final String extensions;
15414 15537
15415 final String protocol; 15538 final String protocol;
15416 15539
15417 final int readyState; 15540 final int readyState;
15418 15541
15419 final String url; 15542 final String url;
15420 15543
15421 void _addEventListener(String type, EventListener listener, [bool useCapture = null]) native "this.addEventListener(type, listener, useCapture);"; 15544 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re = null]) native "this.addEventListener(type, listener, useCapture);";
15422 15545
15423 void close([int code = null, String reason = null]) native; 15546 void close([int code = null, String reason = null]) native;
15424 15547
15425 bool _dispatchEvent(_EventImpl evt) native "return this.dispatchEvent(evt);"; 15548 bool $dom_dispatchEvent(_EventImpl evt) native "return this.dispatchEvent(evt) ;";
15426 15549
15427 void _removeEventListener(String type, EventListener listener, [bool useCaptur e = null]) native "this.removeEventListener(type, listener, useCapture);"; 15550 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture = null]) native "this.removeEventListener(type, listener, useCapture);";
15428 15551
15429 bool send(String data) native; 15552 bool send(String data) native;
15430 } 15553 }
15431 15554
15432 class _WebSocketEventsImpl extends _EventsImpl implements WebSocketEvents { 15555 class _WebSocketEventsImpl extends _EventsImpl implements WebSocketEvents {
15433 _WebSocketEventsImpl(_ptr) : super(_ptr); 15556 _WebSocketEventsImpl(_ptr) : super(_ptr);
15434 15557
15435 EventListenerList get close() => _get('close'); 15558 EventListenerList get close() => _get('close');
15436 15559
15437 EventListenerList get error() => _get('error'); 15560 EventListenerList get error() => _get('error');
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
15476 final int y; 15599 final int y;
15477 15600
15478 void initWebKitWheelEvent(int wheelDeltaX, int wheelDeltaY, _WindowImpl view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, b ool shiftKey, bool metaKey) native; 15601 void initWebKitWheelEvent(int wheelDeltaX, int wheelDeltaY, _WindowImpl view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, b ool shiftKey, bool metaKey) native;
15479 } 15602 }
15480 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 15603 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
15481 // for details. All rights reserved. Use of this source code is governed by a 15604 // for details. All rights reserved. Use of this source code is governed by a
15482 // BSD-style license that can be found in the LICENSE file. 15605 // BSD-style license that can be found in the LICENSE file.
15483 15606
15484 class _WindowImpl extends _EventTargetImpl implements Window native "@*DOMWindow " { 15607 class _WindowImpl extends _EventTargetImpl implements Window native "@*DOMWindow " {
15485 15608
15486 _DocumentImpl get document() native "return this.document.documentElement;"; 15609 _DocumentImpl get document() native "return this.document;";
15487 15610
15488 void requestLayoutFrame(TimeoutHandler callback) { 15611 void requestLayoutFrame(TimeoutHandler callback) {
15489 _addMeasurementFrameCallback(callback); 15612 _addMeasurementFrameCallback(callback);
15490 } 15613 }
15491 15614
15492 15615
15493 _WindowEventsImpl get on() => 15616 _WindowEventsImpl get on() =>
15494 new _WindowEventsImpl(this); 15617 new _WindowEventsImpl(this);
15495 15618
15496 static final int PERSISTENT = 1; 15619 static final int PERSISTENT = 1;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
15588 final _WindowImpl top; 15711 final _WindowImpl top;
15589 15712
15590 final _IDBFactoryImpl webkitIndexedDB; 15713 final _IDBFactoryImpl webkitIndexedDB;
15591 15714
15592 final _NotificationCenterImpl webkitNotifications; 15715 final _NotificationCenterImpl webkitNotifications;
15593 15716
15594 final _StorageInfoImpl webkitStorageInfo; 15717 final _StorageInfoImpl webkitStorageInfo;
15595 15718
15596 final _WindowImpl window; 15719 final _WindowImpl window;
15597 15720
15598 void _addEventListener(String type, EventListener listener, [bool useCapture = null]) native "this.addEventListener(type, listener, useCapture);"; 15721 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re = null]) native "this.addEventListener(type, listener, useCapture);";
15599 15722
15600 void alert(String message) native; 15723 void alert(String message) native;
15601 15724
15602 String atob(String string) native; 15725 String atob(String string) native;
15603 15726
15604 void blur() native; 15727 void blur() native;
15605 15728
15606 String btoa(String string) native; 15729 String btoa(String string) native;
15607 15730
15608 void captureEvents() native; 15731 void captureEvents() native;
15609 15732
15610 void clearInterval(int handle) native; 15733 void clearInterval(int handle) native;
15611 15734
15612 void clearTimeout(int handle) native; 15735 void clearTimeout(int handle) native;
15613 15736
15614 void close() native; 15737 void close() native;
15615 15738
15616 bool confirm(String message) native; 15739 bool confirm(String message) native;
15617 15740
15618 bool _dispatchEvent(_EventImpl evt) native "return this.dispatchEvent(evt);"; 15741 bool $dom_dispatchEvent(_EventImpl evt) native "return this.dispatchEvent(evt) ;";
15619 15742
15620 bool find(String string, bool caseSensitive, bool backwards, bool wrap, bool w holeWord, bool searchInFrames, bool showDialog) native; 15743 bool find(String string, bool caseSensitive, bool backwards, bool wrap, bool w holeWord, bool searchInFrames, bool showDialog) native;
15621 15744
15622 void focus() native; 15745 void focus() native;
15623 15746
15624 _CSSStyleDeclarationImpl _getComputedStyle(_ElementImpl element, String pseudo Element) native "return this.getComputedStyle(element, pseudoElement);"; 15747 _CSSStyleDeclarationImpl $dom_getComputedStyle(_ElementImpl element, String ps eudoElement) native "return this.getComputedStyle(element, pseudoElement);";
15625 15748
15626 _CSSRuleListImpl getMatchedCSSRules(_ElementImpl element, String pseudoElement ) native; 15749 _CSSRuleListImpl getMatchedCSSRules(_ElementImpl element, String pseudoElement ) native;
15627 15750
15628 _DOMSelectionImpl getSelection() native; 15751 _DOMSelectionImpl getSelection() native;
15629 15752
15630 _MediaQueryListImpl matchMedia(String query) native; 15753 _MediaQueryListImpl matchMedia(String query) native;
15631 15754
15632 void moveBy(num x, num y) native; 15755 void moveBy(num x, num y) native;
15633 15756
15634 void moveTo(num x, num y) native; 15757 void moveTo(num x, num y) native;
15635 15758
15636 _WindowImpl open(String url, String name, [String options = null]) native; 15759 _WindowImpl open(String url, String name, [String options = null]) native;
15637 15760
15638 _DatabaseImpl openDatabase(String name, String version, String displayName, in t estimatedSize, [DatabaseCallback creationCallback = null]) native; 15761 _DatabaseImpl openDatabase(String name, String version, String displayName, in t estimatedSize, [DatabaseCallback creationCallback = null]) native;
15639 15762
15640 void postMessage(Dynamic message, String targetOrigin, [List messagePorts = nu ll]) native; 15763 void postMessage(Dynamic message, String targetOrigin, [List messagePorts = nu ll]) native;
15641 15764
15642 void print() native; 15765 void print() native;
15643 15766
15644 String prompt(String message, String defaultValue) native; 15767 String prompt(String message, String defaultValue) native;
15645 15768
15646 void releaseEvents() native; 15769 void releaseEvents() native;
15647 15770
15648 void _removeEventListener(String type, EventListener listener, [bool useCaptur e = null]) native "this.removeEventListener(type, listener, useCapture);"; 15771 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture = null]) native "this.removeEventListener(type, listener, useCapture);";
15649 15772
15650 void resizeBy(num x, num y) native; 15773 void resizeBy(num x, num y) native;
15651 15774
15652 void resizeTo(num width, num height) native; 15775 void resizeTo(num width, num height) native;
15653 15776
15654 void scroll(int x, int y) native; 15777 void scroll(int x, int y) native;
15655 15778
15656 void scrollBy(int x, int y) native; 15779 void scrollBy(int x, int y) native;
15657 15780
15658 void scrollTo(int x, int y) native; 15781 void scrollTo(int x, int y) native;
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
15956 final int readyState; 16079 final int readyState;
15957 16080
15958 final Object response; 16081 final Object response;
15959 16082
15960 final _BlobImpl responseBlob; 16083 final _BlobImpl responseBlob;
15961 16084
15962 final String responseText; 16085 final String responseText;
15963 16086
15964 String responseType; 16087 String responseType;
15965 16088
15966 _DocumentImpl get responseXML() => _FixHtmlDocumentReference(_responseXML); 16089 final _DocumentImpl responseXML;
15967
15968 _EventTargetImpl get _responseXML() native "return this.responseXML;";
15969 16090
15970 final int status; 16091 final int status;
15971 16092
15972 final String statusText; 16093 final String statusText;
15973 16094
15974 final _XMLHttpRequestUploadImpl upload; 16095 final _XMLHttpRequestUploadImpl upload;
15975 16096
15976 bool withCredentials; 16097 bool withCredentials;
15977 16098
15978 void abort() native; 16099 void abort() native;
15979 16100
15980 void _addEventListener(String type, EventListener listener, [bool useCapture = null]) native "this.addEventListener(type, listener, useCapture);"; 16101 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re = null]) native "this.addEventListener(type, listener, useCapture);";
15981 16102
15982 bool _dispatchEvent(_EventImpl evt) native "return this.dispatchEvent(evt);"; 16103 bool $dom_dispatchEvent(_EventImpl evt) native "return this.dispatchEvent(evt) ;";
15983 16104
15984 String getAllResponseHeaders() native; 16105 String getAllResponseHeaders() native;
15985 16106
15986 String getResponseHeader(String header) native; 16107 String getResponseHeader(String header) native;
15987 16108
15988 void open(String method, String url, [bool async = null, String user = null, S tring password = null]) native; 16109 void open(String method, String url, [bool async = null, String user = null, S tring password = null]) native;
15989 16110
15990 void overrideMimeType(String override) native; 16111 void overrideMimeType(String override) native;
15991 16112
15992 void _removeEventListener(String type, EventListener listener, [bool useCaptur e = null]) native "this.removeEventListener(type, listener, useCapture);"; 16113 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture = null]) native "this.removeEventListener(type, listener, useCapture);";
15993 16114
15994 void send([var data = null]) native; 16115 void send([var data = null]) native;
15995 16116
15996 void setRequestHeader(String header, String value) native; 16117 void setRequestHeader(String header, String value) native;
15997 } 16118 }
15998 16119
15999 class _XMLHttpRequestEventsImpl extends _EventsImpl implements XMLHttpRequestEve nts { 16120 class _XMLHttpRequestEventsImpl extends _EventsImpl implements XMLHttpRequestEve nts {
16000 _XMLHttpRequestEventsImpl(_ptr) : super(_ptr); 16121 _XMLHttpRequestEventsImpl(_ptr) : super(_ptr);
16001 16122
16002 EventListenerList get abort() => _get('abort'); 16123 EventListenerList get abort() => _get('abort');
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
16034 final int position; 16155 final int position;
16035 16156
16036 final int totalSize; 16157 final int totalSize;
16037 } 16158 }
16038 16159
16039 class _XMLHttpRequestUploadImpl extends _EventTargetImpl implements XMLHttpReque stUpload native "*XMLHttpRequestUpload" { 16160 class _XMLHttpRequestUploadImpl extends _EventTargetImpl implements XMLHttpReque stUpload native "*XMLHttpRequestUpload" {
16040 16161
16041 _XMLHttpRequestUploadEventsImpl get on() => 16162 _XMLHttpRequestUploadEventsImpl get on() =>
16042 new _XMLHttpRequestUploadEventsImpl(this); 16163 new _XMLHttpRequestUploadEventsImpl(this);
16043 16164
16044 void _addEventListener(String type, EventListener listener, [bool useCapture = null]) native "this.addEventListener(type, listener, useCapture);"; 16165 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re = null]) native "this.addEventListener(type, listener, useCapture);";
16045 16166
16046 bool _dispatchEvent(_EventImpl evt) native "return this.dispatchEvent(evt);"; 16167 bool $dom_dispatchEvent(_EventImpl evt) native "return this.dispatchEvent(evt) ;";
16047 16168
16048 void _removeEventListener(String type, EventListener listener, [bool useCaptur e = null]) native "this.removeEventListener(type, listener, useCapture);"; 16169 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture = null]) native "this.removeEventListener(type, listener, useCapture);";
16049 } 16170 }
16050 16171
16051 class _XMLHttpRequestUploadEventsImpl extends _EventsImpl implements XMLHttpRequ estUploadEvents { 16172 class _XMLHttpRequestUploadEventsImpl extends _EventsImpl implements XMLHttpRequ estUploadEvents {
16052 _XMLHttpRequestUploadEventsImpl(_ptr) : super(_ptr); 16173 _XMLHttpRequestUploadEventsImpl(_ptr) : super(_ptr);
16053 16174
16054 EventListenerList get abort() => _get('abort'); 16175 EventListenerList get abort() => _get('abort');
16055 16176
16056 EventListenerList get error() => _get('error'); 16177 EventListenerList get error() => _get('error');
16057 16178
16058 EventListenerList get load() => _get('load'); 16179 EventListenerList get load() => _get('load');
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
16151 String getParameter(String namespaceURI, String localName) native; 16272 String getParameter(String namespaceURI, String localName) native;
16152 16273
16153 void importStylesheet(_NodeImpl stylesheet) native; 16274 void importStylesheet(_NodeImpl stylesheet) native;
16154 16275
16155 void removeParameter(String namespaceURI, String localName) native; 16276 void removeParameter(String namespaceURI, String localName) native;
16156 16277
16157 void reset() native; 16278 void reset() native;
16158 16279
16159 void setParameter(String namespaceURI, String localName, String value) native; 16280 void setParameter(String namespaceURI, String localName, String value) native;
16160 16281
16161 _DocumentImpl transformToDocument(_NodeImpl source) => _FixHtmlDocumentReferen ce(_transformToDocument(source)); 16282 _DocumentImpl transformToDocument(_NodeImpl source) native;
16162
16163 _EventTargetImpl _transformToDocument(_NodeImpl source) native "return this.tr ansformToDocument(source);";
16164 16283
16165 _DocumentFragmentImpl transformToFragment(_NodeImpl source, _DocumentImpl docV al) native; 16284 _DocumentFragmentImpl transformToFragment(_NodeImpl source, _DocumentImpl docV al) native;
16166 } 16285 }
16167 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 16286 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
16168 // for details. All rights reserved. Use of this source code is governed by a 16287 // for details. All rights reserved. Use of this source code is governed by a
16169 // BSD-style license that can be found in the LICENSE file. 16288 // BSD-style license that can be found in the LICENSE file.
16170 16289
16171 class _AudioElementFactoryProvider { 16290 class _AudioElementFactoryProvider {
16172 factory AudioElement([String src = null]) native ''' 16291 factory AudioElement([String src = null]) native '''
16173 if (src == null) return new Audio(); 16292 if (src == null) return new Audio();
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
16402 } 16521 }
16403 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 16522 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
16404 // for details. All rights reserved. Use of this source code is governed by a 16523 // for details. All rights reserved. Use of this source code is governed by a
16405 // BSD-style license that can be found in the LICENSE file. 16524 // BSD-style license that can be found in the LICENSE file.
16406 16525
16407 // WARNING: Do not edit - generated code. 16526 // WARNING: Do not edit - generated code.
16408 16527
16409 interface AbstractWorker extends EventTarget { 16528 interface AbstractWorker extends EventTarget {
16410 16529
16411 AbstractWorkerEvents get on(); 16530 AbstractWorkerEvents get on();
16531
16532 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]);
16533
16534 bool $dom_dispatchEvent(Event evt);
16535
16536 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture]);
16412 } 16537 }
16413 16538
16414 interface AbstractWorkerEvents extends Events { 16539 interface AbstractWorkerEvents extends Events {
16415 16540
16416 EventListenerList get error(); 16541 EventListenerList get error();
16417 } 16542 }
16418 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 16543 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
16419 // for details. All rights reserved. Use of this source code is governed by a 16544 // for details. All rights reserved. Use of this source code is governed by a
16420 // BSD-style license that can be found in the LICENSE file. 16545 // BSD-style license that can be found in the LICENSE file.
16421 16546
(...skipping 3490 matching lines...) Expand 10 before | Expand all | Expand 10 after
19912 static final int OBSOLETE = 5; 20037 static final int OBSOLETE = 5;
19913 20038
19914 static final int UNCACHED = 0; 20039 static final int UNCACHED = 0;
19915 20040
19916 static final int UPDATEREADY = 4; 20041 static final int UPDATEREADY = 4;
19917 20042
19918 final int status; 20043 final int status;
19919 20044
19920 void abort(); 20045 void abort();
19921 20046
20047 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]);
20048
20049 bool $dom_dispatchEvent(Event evt);
20050
20051 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture]);
20052
19922 void swapCache(); 20053 void swapCache();
19923 20054
19924 void update(); 20055 void update();
19925 } 20056 }
19926 20057
19927 interface DOMApplicationCacheEvents extends Events { 20058 interface DOMApplicationCacheEvents extends Events {
19928 20059
19929 EventListenerList get cached(); 20060 EventListenerList get cached();
19930 20061
19931 EventListenerList get checking(); 20062 EventListenerList get checking();
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
20555 final Element activeElement; 20686 final Element activeElement;
20556 20687
20557 Element body; 20688 Element body;
20558 20689
20559 String charset; 20690 String charset;
20560 20691
20561 String cookie; 20692 String cookie;
20562 20693
20563 final Window window; 20694 final Window window;
20564 20695
20696 final Element documentElement;
20697
20565 final String domain; 20698 final String domain;
20566 20699
20567 final HeadElement head; 20700 final HeadElement head;
20568 20701
20569 final String lastModified; 20702 final String lastModified;
20570 20703
20571 final String preferredStylesheetSet; 20704 final String preferredStylesheetSet;
20572 20705
20573 final String readyState; 20706 final String readyState;
20574 20707
(...skipping 18 matching lines...) Expand all
20593 final bool webkitIsFullScreen; 20726 final bool webkitIsFullScreen;
20594 20727
20595 final String webkitVisibilityState; 20728 final String webkitVisibilityState;
20596 20729
20597 Range caretRangeFromPoint(int x, int y); 20730 Range caretRangeFromPoint(int x, int y);
20598 20731
20599 CDATASection createCDATASection(String data); 20732 CDATASection createCDATASection(String data);
20600 20733
20601 DocumentFragment createDocumentFragment(); 20734 DocumentFragment createDocumentFragment();
20602 20735
20736 Element $dom_createElement(String tagName);
20737
20738 Element $dom_createElementNS(String namespaceURI, String qualifiedName);
20739
20740 Event $dom_createEvent(String eventType);
20741
20603 Range createRange(); 20742 Range createRange();
20604 20743
20744 Text $dom_createTextNode(String data);
20745
20605 Touch createTouch(Window window, EventTarget target, int identifier, int pageX , int pageY, int screenX, int screenY, int webkitRadiusX, int webkitRadiusY, num webkitRotationAngle, num webkitForce); 20746 Touch createTouch(Window window, EventTarget target, int identifier, int pageX , int pageY, int screenX, int screenY, int webkitRadiusX, int webkitRadiusY, num webkitRotationAngle, num webkitForce);
20606 20747
20748 TouchList $dom_createTouchList();
20749
20607 Element elementFromPoint(int x, int y); 20750 Element elementFromPoint(int x, int y);
20608 20751
20609 bool execCommand(String command, bool userInterface, String value); 20752 bool execCommand(String command, bool userInterface, String value);
20610 20753
20611 CanvasRenderingContext getCSSCanvasContext(String contextId, String name, int width, int height); 20754 CanvasRenderingContext getCSSCanvasContext(String contextId, String name, int width, int height);
20612 20755
20756 Element $dom_getElementById(String elementId);
20757
20758 NodeList $dom_getElementsByClassName(String tagname);
20759
20760 NodeList $dom_getElementsByName(String elementName);
20761
20762 NodeList $dom_getElementsByTagName(String tagname);
20763
20613 bool queryCommandEnabled(String command); 20764 bool queryCommandEnabled(String command);
20614 20765
20615 bool queryCommandIndeterm(String command); 20766 bool queryCommandIndeterm(String command);
20616 20767
20617 bool queryCommandState(String command); 20768 bool queryCommandState(String command);
20618 20769
20619 bool queryCommandSupported(String command); 20770 bool queryCommandSupported(String command);
20620 20771
20621 String queryCommandValue(String command); 20772 String queryCommandValue(String command);
20622 20773
20774 Element query(String selectors);
20775
20776 NodeList $dom_querySelectorAll(String selectors);
20777
20623 void webkitCancelFullScreen(); 20778 void webkitCancelFullScreen();
20624 20779
20625 void webkitExitFullscreen(); 20780 void webkitExitFullscreen();
20626 20781
20627 WebKitNamedFlow webkitGetFlowByName(String name); 20782 WebKitNamedFlow webkitGetFlowByName(String name);
20628 20783
20629 } 20784 }
20630 20785
20631 interface DocumentEvents extends ElementEvents { 20786 interface DocumentEvents extends ElementEvents {
20632 20787
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
20740 20895
20741 DocumentFragment.svg(String svg); 20896 DocumentFragment.svg(String svg);
20742 20897
20743 DocumentFragment clone(bool deep); 20898 DocumentFragment clone(bool deep);
20744 20899
20745 20900
20746 ElementEvents get on(); 20901 ElementEvents get on();
20747 20902
20748 Element query(String selectors); 20903 Element query(String selectors);
20749 20904
20905 NodeList $dom_querySelectorAll(String selectors);
20906
20750 } 20907 }
20751 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 20908 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
20752 // for details. All rights reserved. Use of this source code is governed by a 20909 // for details. All rights reserved. Use of this source code is governed by a
20753 // BSD-style license that can be found in the LICENSE file. 20910 // BSD-style license that can be found in the LICENSE file.
20754 20911
20755 // WARNING: Do not edit - generated code. 20912 // WARNING: Do not edit - generated code.
20756 20913
20757 interface DocumentType extends Node { 20914 interface DocumentType extends Node {
20758 20915
20759 final NamedNodeMap entities; 20916 final NamedNodeMap entities;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
20801 // BSD-style license that can be found in the LICENSE file. 20958 // BSD-style license that can be found in the LICENSE file.
20802 20959
20803 // WARNING: Do not edit - generated code. 20960 // WARNING: Do not edit - generated code.
20804 20961
20805 /** 20962 /**
20806 * Provides a Map abstraction on top of data-* attributes, similar to the 20963 * Provides a Map abstraction on top of data-* attributes, similar to the
20807 * dataSet in the old DOM. 20964 * dataSet in the old DOM.
20808 */ 20965 */
20809 class _DataAttributeMap implements Map<String, String> { 20966 class _DataAttributeMap implements Map<String, String> {
20810 20967
20811 final Map<String, String> _attributes; 20968 final Map<String, String> $dom_attributes;
20812 20969
20813 _DataAttributeMap(this._attributes); 20970 _DataAttributeMap(this.$dom_attributes);
20814 20971
20815 // interface Map 20972 // interface Map
20816 20973
20817 // TODO: Use lazy iterator when it is available on Map. 20974 // TODO: Use lazy iterator when it is available on Map.
20818 bool containsValue(String value) => getValues().some((v) => v == value); 20975 bool containsValue(String value) => getValues().some((v) => v == value);
20819 20976
20820 bool containsKey(String key) => _attributes.containsKey(_attr(key)); 20977 bool containsKey(String key) => $dom_attributes.containsKey(_attr(key));
20821 20978
20822 String operator [](String key) => _attributes[_attr(key)]; 20979 String operator [](String key) => $dom_attributes[_attr(key)];
20823 20980
20824 void operator []=(String key, String value) { 20981 void operator []=(String key, String value) {
20825 _attributes[_attr(key)] = value; 20982 $dom_attributes[_attr(key)] = value;
20826 } 20983 }
20827 20984
20828 String putIfAbsent(String key, String ifAbsent()) { 20985 String putIfAbsent(String key, String ifAbsent()) {
20829 if (!containsKey(key)) { 20986 if (!containsKey(key)) {
20830 return this[key] = ifAbsent(); 20987 return this[key] = ifAbsent();
20831 } 20988 }
20832 return this[key]; 20989 return this[key];
20833 } 20990 }
20834 20991
20835 String remove(String key) => _attributes.remove(_attr(key)); 20992 String remove(String key) => $dom_attributes.remove(_attr(key));
20836 20993
20837 void clear() { 20994 void clear() {
20838 // Needs to operate on a snapshot since we are mutatiting the collection. 20995 // Needs to operate on a snapshot since we are mutatiting the collection.
20839 for (String key in getKeys()) { 20996 for (String key in getKeys()) {
20840 remove(key); 20997 remove(key);
20841 } 20998 }
20842 } 20999 }
20843 21000
20844 void forEach(void f(String key, String value)) { 21001 void forEach(void f(String key, String value)) {
20845 _attributes.forEach((String key, String value) { 21002 $dom_attributes.forEach((String key, String value) {
20846 if (_matches(key)) { 21003 if (_matches(key)) {
20847 f(_strip(key), value); 21004 f(_strip(key), value);
20848 } 21005 }
20849 }); 21006 });
20850 } 21007 }
20851 21008
20852 Collection<String> getKeys() { 21009 Collection<String> getKeys() {
20853 final keys = new List<String>(); 21010 final keys = new List<String>();
20854 _attributes.forEach((String key, String value) { 21011 $dom_attributes.forEach((String key, String value) {
20855 if (_matches(key)) { 21012 if (_matches(key)) {
20856 keys.add(_strip(key)); 21013 keys.add(_strip(key));
20857 } 21014 }
20858 }); 21015 });
20859 return keys; 21016 return keys;
20860 } 21017 }
20861 21018
20862 Collection<String> getValues() { 21019 Collection<String> getValues() {
20863 final values = new List<String>(); 21020 final values = new List<String>();
20864 _attributes.forEach((String key, String value) { 21021 $dom_attributes.forEach((String key, String value) {
20865 if (_matches(key)) { 21022 if (_matches(key)) {
20866 values.add(value); 21023 values.add(value);
20867 } 21024 }
20868 }); 21025 });
20869 return values; 21026 return values;
20870 } 21027 }
20871 21028
20872 int get length() => getKeys().length; 21029 int get length() => getKeys().length;
20873 21030
20874 // TODO: Use lazy iterator when it is available on Map. 21031 // TODO: Use lazy iterator when it is available on Map.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
20985 _write(s); 21142 _write(s);
20986 } 21143 }
20987 21144
20988 /** 21145 /**
20989 * Read the class names from the Element class property, 21146 * Read the class names from the Element class property,
20990 * and put them into a set (duplicates are discarded). 21147 * and put them into a set (duplicates are discarded).
20991 */ 21148 */
20992 Set<String> _read() { 21149 Set<String> _read() {
20993 // TODO(mattsh) simplify this once split can take regex. 21150 // TODO(mattsh) simplify this once split can take regex.
20994 Set<String> s = new Set<String>(); 21151 Set<String> s = new Set<String>();
20995 for (String name in _className().split(' ')) { 21152 for (String name in $dom_className().split(' ')) {
20996 String trimmed = name.trim(); 21153 String trimmed = name.trim();
20997 if (!trimmed.isEmpty()) { 21154 if (!trimmed.isEmpty()) {
20998 s.add(trimmed); 21155 s.add(trimmed);
20999 } 21156 }
21000 } 21157 }
21001 return s; 21158 return s;
21002 } 21159 }
21003 21160
21004 /** 21161 /**
21005 * Read the class names as a space-separated string. This is meant to be 21162 * Read the class names as a space-separated string. This is meant to be
21006 * overridden by subclasses. 21163 * overridden by subclasses.
21007 */ 21164 */
21008 String _className() => _element._className; 21165 String $dom_className() => _element.$dom_className;
21009 21166
21010 /** 21167 /**
21011 * Join all the elements of a set into one string and write 21168 * Join all the elements of a set into one string and write
21012 * back to the element. 21169 * back to the element.
21013 */ 21170 */
21014 void _write(Set s) { 21171 void _write(Set s) {
21015 _element._className = _formatSet(s); 21172 _element.$dom_className = _formatSet(s);
21016 } 21173 }
21017 21174
21018 String _formatSet(Set<String> s) { 21175 String _formatSet(Set<String> s) {
21019 // TODO(mattsh) should be able to pass Set to String.joins http:/b/5398605 21176 // TODO(mattsh) should be able to pass Set to String.joins http:/b/5398605
21020 List list = new List.from(s); 21177 List list = new List.from(s);
21021 return Strings.join(list, ' '); 21178 return Strings.join(list, ' ');
21022 } 21179 }
21023 } 21180 }
21024 21181
21025 interface ElementList extends List<Element> { 21182 interface ElementList extends List<Element> {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
21092 21249
21093 Element clone(bool deep); 21250 Element clone(bool deep);
21094 21251
21095 Element get parent(); 21252 Element get parent();
21096 21253
21097 21254
21098 ElementEvents get on(); 21255 ElementEvents get on();
21099 21256
21100 static final int ALLOW_KEYBOARD_INPUT = 1; 21257 static final int ALLOW_KEYBOARD_INPUT = 1;
21101 21258
21259 final int $dom_childElementCount;
21260
21261 final HTMLCollection $dom_children;
21262
21263 String $dom_className;
21264
21265 final int $dom_clientHeight;
21266
21267 final int $dom_clientLeft;
21268
21269 final int $dom_clientTop;
21270
21271 final int $dom_clientWidth;
21272
21102 String contentEditable; 21273 String contentEditable;
21103 21274
21104 String dir; 21275 String dir;
21105 21276
21106 bool draggable; 21277 bool draggable;
21107 21278
21279 final Element $dom_firstElementChild;
21280
21108 bool hidden; 21281 bool hidden;
21109 21282
21110 String id; 21283 String id;
21111 21284
21112 String innerHTML; 21285 String innerHTML;
21113 21286
21114 final bool isContentEditable; 21287 final bool isContentEditable;
21115 21288
21116 String lang; 21289 String lang;
21117 21290
21118 final Element lastElementChild; 21291 final Element $dom_lastElementChild;
21119 21292
21120 final Element nextElementSibling; 21293 final Element nextElementSibling;
21121 21294
21295 final int $dom_offsetHeight;
21296
21297 final int $dom_offsetLeft;
21298
21122 final Element offsetParent; 21299 final Element offsetParent;
21123 21300
21301 final int $dom_offsetTop;
21302
21303 final int $dom_offsetWidth;
21304
21124 final String outerHTML; 21305 final String outerHTML;
21125 21306
21126 final Element previousElementSibling; 21307 final Element previousElementSibling;
21127 21308
21309 final int $dom_scrollHeight;
21310
21311 int $dom_scrollLeft;
21312
21313 int $dom_scrollTop;
21314
21315 final int $dom_scrollWidth;
21316
21128 bool spellcheck; 21317 bool spellcheck;
21129 21318
21130 final CSSStyleDeclaration style; 21319 final CSSStyleDeclaration style;
21131 21320
21132 int tabIndex; 21321 int tabIndex;
21133 21322
21134 final String tagName; 21323 final String tagName;
21135 21324
21136 String title; 21325 String title;
21137 21326
21138 bool translate; 21327 bool translate;
21139 21328
21140 final String webkitRegionOverflow; 21329 final String webkitRegionOverflow;
21141 21330
21142 String webkitdropzone; 21331 String webkitdropzone;
21143 21332
21144 void blur(); 21333 void blur();
21145 21334
21146 void click(); 21335 void click();
21147 21336
21148 void focus(); 21337 void focus();
21149 21338
21339 String $dom_getAttribute(String name);
21340
21341 ClientRect $dom_getBoundingClientRect();
21342
21343 ClientRectList $dom_getClientRects();
21344
21345 NodeList $dom_getElementsByClassName(String name);
21346
21347 NodeList $dom_getElementsByTagName(String name);
21348
21349 bool $dom_hasAttribute(String name);
21350
21150 Element insertAdjacentElement(String where, Element element); 21351 Element insertAdjacentElement(String where, Element element);
21151 21352
21152 void insertAdjacentHTML(String where, String html); 21353 void insertAdjacentHTML(String where, String html);
21153 21354
21154 void insertAdjacentText(String where, String text); 21355 void insertAdjacentText(String where, String text);
21155 21356
21156 Element query(String selectors); 21357 Element query(String selectors);
21157 21358
21359 NodeList $dom_querySelectorAll(String selectors);
21360
21361 void $dom_removeAttribute(String name);
21362
21158 void scrollByLines(int lines); 21363 void scrollByLines(int lines);
21159 21364
21160 void scrollByPages(int pages); 21365 void scrollByPages(int pages);
21161 21366
21162 void scrollIntoView([bool centerIfNeeded]); 21367 void scrollIntoView([bool centerIfNeeded]);
21163 21368
21369 void $dom_setAttribute(String name, String value);
21370
21164 bool matchesSelector(String selectors); 21371 bool matchesSelector(String selectors);
21165 21372
21166 void webkitRequestFullScreen(int flags); 21373 void webkitRequestFullScreen(int flags);
21167 21374
21168 void webkitRequestFullscreen(); 21375 void webkitRequestFullscreen();
21169 21376
21170 } 21377 }
21171 21378
21172 interface ElementEvents extends Events { 21379 interface ElementEvents extends Events {
21173 21380
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
21531 bool returnValue; 21738 bool returnValue;
21532 21739
21533 final EventTarget srcElement; 21740 final EventTarget srcElement;
21534 21741
21535 final EventTarget target; 21742 final EventTarget target;
21536 21743
21537 final int timeStamp; 21744 final int timeStamp;
21538 21745
21539 final String type; 21746 final String type;
21540 21747
21748 void $dom_initEvent(String eventTypeArg, bool canBubbleArg, bool cancelableArg );
21749
21541 void preventDefault(); 21750 void preventDefault();
21542 21751
21543 void stopImmediatePropagation(); 21752 void stopImmediatePropagation();
21544 21753
21545 void stopPropagation(); 21754 void stopPropagation();
21546 } 21755 }
21547 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 21756 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
21548 // for details. All rights reserved. Use of this source code is governed by a 21757 // for details. All rights reserved. Use of this source code is governed by a
21549 // BSD-style license that can be found in the LICENSE file. 21758 // BSD-style license that can be found in the LICENSE file.
21550 21759
(...skipping 30 matching lines...) Expand all
21581 static final int CONNECTING = 0; 21790 static final int CONNECTING = 0;
21582 21791
21583 static final int OPEN = 1; 21792 static final int OPEN = 1;
21584 21793
21585 final String URL; 21794 final String URL;
21586 21795
21587 final int readyState; 21796 final int readyState;
21588 21797
21589 final String url; 21798 final String url;
21590 21799
21800 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]);
21801
21591 void close(); 21802 void close();
21803
21804 bool $dom_dispatchEvent(Event evt);
21805
21806 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture]);
21592 } 21807 }
21593 21808
21594 interface EventSourceEvents extends Events { 21809 interface EventSourceEvents extends Events {
21595 21810
21596 EventListenerList get error(); 21811 EventListenerList get error();
21597 21812
21598 EventListenerList get message(); 21813 EventListenerList get message();
21599 21814
21600 EventListenerList get open(); 21815 EventListenerList get open();
21601 } 21816 }
(...skipping 12 matching lines...) Expand all
21614 } 21829 }
21615 21830
21616 interface Events { 21831 interface Events {
21617 EventListenerList operator [](String type); 21832 EventListenerList operator [](String type);
21618 } 21833 }
21619 21834
21620 interface EventTarget { 21835 interface EventTarget {
21621 21836
21622 final Events on; 21837 final Events on;
21623 21838
21839 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]);
21840
21841 bool $dom_dispatchEvent(Event event);
21842
21843 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture]);
21844
21624 } 21845 }
21625 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 21846 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
21626 // for details. All rights reserved. Use of this source code is governed by a 21847 // for details. All rights reserved. Use of this source code is governed by a
21627 // BSD-style license that can be found in the LICENSE file. 21848 // BSD-style license that can be found in the LICENSE file.
21628 21849
21629 // WARNING: Do not edit - generated code. 21850 // WARNING: Do not edit - generated code.
21630 21851
21631 interface FieldSetElement extends Element { 21852 interface FieldSetElement extends Element {
21632 21853
21633 final FormElement form; 21854 final FormElement form;
(...skipping 1907 matching lines...) Expand 10 before | Expand all | Expand 10 after
23541 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 23762 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
23542 // for details. All rights reserved. Use of this source code is governed by a 23763 // for details. All rights reserved. Use of this source code is governed by a
23543 // BSD-style license that can be found in the LICENSE file. 23764 // BSD-style license that can be found in the LICENSE file.
23544 23765
23545 // WARNING: Do not edit - generated code. 23766 // WARNING: Do not edit - generated code.
23546 23767
23547 interface MessagePort extends EventTarget { 23768 interface MessagePort extends EventTarget {
23548 23769
23549 MessagePortEvents get on(); 23770 MessagePortEvents get on();
23550 23771
23772 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]);
23773
23551 void close(); 23774 void close();
23552 23775
23776 bool $dom_dispatchEvent(Event evt);
23777
23553 void postMessage(String message, [List messagePorts]); 23778 void postMessage(String message, [List messagePorts]);
23554 23779
23780 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture]);
23781
23555 void start(); 23782 void start();
23556 23783
23557 void webkitPostMessage(String message, [List transfer]); 23784 void webkitPostMessage(String message, [List transfer]);
23558 } 23785 }
23559 23786
23560 interface MessagePortEvents extends Events { 23787 interface MessagePortEvents extends Events {
23561 23788
23562 EventListenerList get message(); 23789 EventListenerList get message();
23563 } 23790 }
23564 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 23791 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
23670 23897
23671 final int screenY; 23898 final int screenY;
23672 23899
23673 final bool shiftKey; 23900 final bool shiftKey;
23674 23901
23675 final Node toElement; 23902 final Node toElement;
23676 23903
23677 final int x; 23904 final int x;
23678 23905
23679 final int y; 23906 final int y;
23907
23908 void $dom_initMouseEvent(String type, bool canBubble, bool cancelable, Window view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlK ey, bool altKey, bool shiftKey, bool metaKey, int button, EventTarget relatedTar get);
23680 } 23909 }
23681 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 23910 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
23682 // for details. All rights reserved. Use of this source code is governed by a 23911 // for details. All rights reserved. Use of this source code is governed by a
23683 // BSD-style license that can be found in the LICENSE file. 23912 // BSD-style license that can be found in the LICENSE file.
23684 23913
23685 // WARNING: Do not edit - generated code. 23914 // WARNING: Do not edit - generated code.
23686 23915
23687 interface MutationEvent extends Event { 23916 interface MutationEvent extends Event {
23688 23917
23689 static final int ADDITION = 2; 23918 static final int ADDITION = 2;
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
23845 static final int ENTITY_NODE = 6; 24074 static final int ENTITY_NODE = 6;
23846 24075
23847 static final int ENTITY_REFERENCE_NODE = 5; 24076 static final int ENTITY_REFERENCE_NODE = 5;
23848 24077
23849 static final int NOTATION_NODE = 12; 24078 static final int NOTATION_NODE = 12;
23850 24079
23851 static final int PROCESSING_INSTRUCTION_NODE = 7; 24080 static final int PROCESSING_INSTRUCTION_NODE = 7;
23852 24081
23853 static final int TEXT_NODE = 3; 24082 static final int TEXT_NODE = 3;
23854 24083
24084 final NamedNodeMap $dom_attributes;
24085
24086 final NodeList $dom_childNodes;
24087
24088 final Node $dom_firstChild;
24089
24090 final Node $dom_lastChild;
24091
23855 final Node nextNode; 24092 final Node nextNode;
23856 24093
24094 final int $dom_nodeType;
24095
23857 final Document document; 24096 final Document document;
23858 24097
23859 final Node parent; 24098 final Node parent;
23860 24099
23861 final Node previousNode; 24100 final Node previousNode;
23862 24101
23863 String text; 24102 String text;
23864 24103
24104 Node $dom_appendChild(Node newChild);
24105
23865 Node clone(bool deep); 24106 Node clone(bool deep);
23866 24107
23867 bool contains(Node other); 24108 bool contains(Node other);
23868 24109
23869 bool hasChildNodes(); 24110 bool hasChildNodes();
23870 24111
23871 Node insertBefore(Node newChild, Node refChild); 24112 Node insertBefore(Node newChild, Node refChild);
23872 24113
24114 Node $dom_removeChild(Node oldChild);
24115
24116 Node $dom_replaceChild(Node newChild, Node oldChild);
24117
23873 } 24118 }
23874 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 24119 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
23875 // for details. All rights reserved. Use of this source code is governed by a 24120 // for details. All rights reserved. Use of this source code is governed by a
23876 // BSD-style license that can be found in the LICENSE file. 24121 // BSD-style license that can be found in the LICENSE file.
23877 24122
23878 // WARNING: Do not edit - generated code. 24123 // WARNING: Do not edit - generated code.
23879 24124
23880 interface NodeFilter { 24125 interface NodeFilter {
23881 24126
23882 static final int FILTER_ACCEPT = 1; 24127 static final int FILTER_ACCEPT = 1;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
23964 // WARNING: Do not edit - generated code. 24209 // WARNING: Do not edit - generated code.
23965 24210
23966 interface NodeSelector { 24211 interface NodeSelector {
23967 24212
23968 // TODO(nweiz): add this back once DocumentFragment is ported. 24213 // TODO(nweiz): add this back once DocumentFragment is ported.
23969 // ElementList queryAll(String selectors); 24214 // ElementList queryAll(String selectors);
23970 24215
23971 24216
23972 Element query(String selectors); 24217 Element query(String selectors);
23973 24218
24219 NodeList $dom_querySelectorAll(String selectors);
24220
23974 } 24221 }
23975 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 24222 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
23976 // for details. All rights reserved. Use of this source code is governed by a 24223 // for details. All rights reserved. Use of this source code is governed by a
23977 // BSD-style license that can be found in the LICENSE file. 24224 // BSD-style license that can be found in the LICENSE file.
23978 24225
23979 // WARNING: Do not edit - generated code. 24226 // WARNING: Do not edit - generated code.
23980 24227
23981 interface Notation extends Node { 24228 interface Notation extends Node {
23982 24229
23983 final String publicId; 24230 final String publicId;
(...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after
25251 } 25498 }
25252 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 25499 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
25253 // for details. All rights reserved. Use of this source code is governed by a 25500 // for details. All rights reserved. Use of this source code is governed by a
25254 // BSD-style license that can be found in the LICENSE file. 25501 // BSD-style license that can be found in the LICENSE file.
25255 25502
25256 // WARNING: Do not edit - generated code. 25503 // WARNING: Do not edit - generated code.
25257 25504
25258 interface SVGDocument extends Document { 25505 interface SVGDocument extends Document {
25259 25506
25260 final SVGSVGElement rootElement; 25507 final SVGSVGElement rootElement;
25508
25509 Event $dom_createEvent(String eventType);
25261 } 25510 }
25262 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 25511 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
25263 // for details. All rights reserved. Use of this source code is governed by a 25512 // for details. All rights reserved. Use of this source code is governed by a
25264 // BSD-style license that can be found in the LICENSE file. 25513 // BSD-style license that can be found in the LICENSE file.
25265 25514
25266 interface SVGElement extends Element default _SVGElementFactoryProvider { 25515 interface SVGElement extends Element default _SVGElementFactoryProvider {
25267 25516
25268 SVGElement.tag(String tag); 25517 SVGElement.tag(String tag);
25269 SVGElement.svg(String svg); 25518 SVGElement.svg(String svg);
25270 25519
(...skipping 27 matching lines...) Expand all
25298 25547
25299 final SVGElementInstance firstChild; 25548 final SVGElementInstance firstChild;
25300 25549
25301 final SVGElementInstance lastChild; 25550 final SVGElementInstance lastChild;
25302 25551
25303 final SVGElementInstance nextSibling; 25552 final SVGElementInstance nextSibling;
25304 25553
25305 final SVGElementInstance parentNode; 25554 final SVGElementInstance parentNode;
25306 25555
25307 final SVGElementInstance previousSibling; 25556 final SVGElementInstance previousSibling;
25557
25558 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]);
25559
25560 bool $dom_dispatchEvent(Event event);
25561
25562 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture]);
25308 } 25563 }
25309 25564
25310 interface SVGElementInstanceEvents extends Events { 25565 interface SVGElementInstanceEvents extends Events {
25311 25566
25312 EventListenerList get abort(); 25567 EventListenerList get abort();
25313 25568
25314 EventListenerList get beforeCopy(); 25569 EventListenerList get beforeCopy();
25315 25570
25316 EventListenerList get beforeCut(); 25571 EventListenerList get beforeCut();
25317 25572
(...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after
27150 String replaceItem(String item, int index); 27405 String replaceItem(String item, int index);
27151 } 27406 }
27152 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 27407 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
27153 // for details. All rights reserved. Use of this source code is governed by a 27408 // for details. All rights reserved. Use of this source code is governed by a
27154 // BSD-style license that can be found in the LICENSE file. 27409 // BSD-style license that can be found in the LICENSE file.
27155 27410
27156 // WARNING: Do not edit - generated code. 27411 // WARNING: Do not edit - generated code.
27157 27412
27158 interface SVGStylable { 27413 interface SVGStylable {
27159 27414
27415 final SVGAnimatedString $dom_svgClassName;
27416
27160 final CSSStyleDeclaration style; 27417 final CSSStyleDeclaration style;
27161 27418
27162 CSSValue getPresentationAttribute(String name); 27419 CSSValue getPresentationAttribute(String name);
27163 } 27420 }
27164 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 27421 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
27165 // for details. All rights reserved. Use of this source code is governed by a 27422 // for details. All rights reserved. Use of this source code is governed by a
27166 // BSD-style license that can be found in the LICENSE file. 27423 // BSD-style license that can be found in the LICENSE file.
27167 27424
27168 // WARNING: Do not edit - generated code. 27425 // WARNING: Do not edit - generated code.
27169 27426
(...skipping 2778 matching lines...) Expand 10 before | Expand all | Expand 10 after
29948 final int bufferedAmount; 30205 final int bufferedAmount;
29949 30206
29950 final String extensions; 30207 final String extensions;
29951 30208
29952 final String protocol; 30209 final String protocol;
29953 30210
29954 final int readyState; 30211 final int readyState;
29955 30212
29956 final String url; 30213 final String url;
29957 30214
30215 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]);
30216
29958 void close([int code, String reason]); 30217 void close([int code, String reason]);
29959 30218
30219 bool $dom_dispatchEvent(Event evt);
30220
30221 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture]);
30222
29960 bool send(String data); 30223 bool send(String data);
29961 } 30224 }
29962 30225
29963 interface WebSocketEvents extends Events { 30226 interface WebSocketEvents extends Events {
29964 30227
29965 EventListenerList get close(); 30228 EventListenerList get close();
29966 30229
29967 EventListenerList get error(); 30230 EventListenerList get error();
29968 30231
29969 EventListenerList get message(); 30232 EventListenerList get message();
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
30127 final Window top; 30390 final Window top;
30128 30391
30129 final IDBFactory webkitIndexedDB; 30392 final IDBFactory webkitIndexedDB;
30130 30393
30131 final NotificationCenter webkitNotifications; 30394 final NotificationCenter webkitNotifications;
30132 30395
30133 final StorageInfo webkitStorageInfo; 30396 final StorageInfo webkitStorageInfo;
30134 30397
30135 final Window window; 30398 final Window window;
30136 30399
30400 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]);
30401
30137 void alert(String message); 30402 void alert(String message);
30138 30403
30139 String atob(String string); 30404 String atob(String string);
30140 30405
30141 void blur(); 30406 void blur();
30142 30407
30143 String btoa(String string); 30408 String btoa(String string);
30144 30409
30145 void captureEvents(); 30410 void captureEvents();
30146 30411
30147 void clearInterval(int handle); 30412 void clearInterval(int handle);
30148 30413
30149 void clearTimeout(int handle); 30414 void clearTimeout(int handle);
30150 30415
30151 void close(); 30416 void close();
30152 30417
30153 bool confirm(String message); 30418 bool confirm(String message);
30154 30419
30420 bool $dom_dispatchEvent(Event evt);
30421
30155 bool find(String string, bool caseSensitive, bool backwards, bool wrap, bool w holeWord, bool searchInFrames, bool showDialog); 30422 bool find(String string, bool caseSensitive, bool backwards, bool wrap, bool w holeWord, bool searchInFrames, bool showDialog);
30156 30423
30157 void focus(); 30424 void focus();
30158 30425
30426 CSSStyleDeclaration $dom_getComputedStyle(Element element, String pseudoElemen t);
30427
30159 CSSRuleList getMatchedCSSRules(Element element, String pseudoElement); 30428 CSSRuleList getMatchedCSSRules(Element element, String pseudoElement);
30160 30429
30161 DOMSelection getSelection(); 30430 DOMSelection getSelection();
30162 30431
30163 MediaQueryList matchMedia(String query); 30432 MediaQueryList matchMedia(String query);
30164 30433
30165 void moveBy(num x, num y); 30434 void moveBy(num x, num y);
30166 30435
30167 void moveTo(num x, num y); 30436 void moveTo(num x, num y);
30168 30437
30169 Window open(String url, String name, [String options]); 30438 Window open(String url, String name, [String options]);
30170 30439
30171 Database openDatabase(String name, String version, String displayName, int est imatedSize, [DatabaseCallback creationCallback]); 30440 Database openDatabase(String name, String version, String displayName, int est imatedSize, [DatabaseCallback creationCallback]);
30172 30441
30173 void postMessage(Dynamic message, String targetOrigin, [List messagePorts]); 30442 void postMessage(Dynamic message, String targetOrigin, [List messagePorts]);
30174 30443
30175 void print(); 30444 void print();
30176 30445
30177 String prompt(String message, String defaultValue); 30446 String prompt(String message, String defaultValue);
30178 30447
30179 void releaseEvents(); 30448 void releaseEvents();
30180 30449
30450 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture]);
30451
30181 void resizeBy(num x, num y); 30452 void resizeBy(num x, num y);
30182 30453
30183 void resizeTo(num width, num height); 30454 void resizeTo(num width, num height);
30184 30455
30185 void scroll(int x, int y); 30456 void scroll(int x, int y);
30186 30457
30187 void scrollBy(int x, int y); 30458 void scrollBy(int x, int y);
30188 30459
30189 void scrollTo(int x, int y); 30460 void scrollTo(int x, int y);
30190 30461
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
30527 final int status; 30798 final int status;
30528 30799
30529 final String statusText; 30800 final String statusText;
30530 30801
30531 final XMLHttpRequestUpload upload; 30802 final XMLHttpRequestUpload upload;
30532 30803
30533 bool withCredentials; 30804 bool withCredentials;
30534 30805
30535 void abort(); 30806 void abort();
30536 30807
30808 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]);
30809
30810 bool $dom_dispatchEvent(Event evt);
30811
30537 String getAllResponseHeaders(); 30812 String getAllResponseHeaders();
30538 30813
30539 String getResponseHeader(String header); 30814 String getResponseHeader(String header);
30540 30815
30541 void open(String method, String url, [bool async, String user, String password ]); 30816 void open(String method, String url, [bool async, String user, String password ]);
30542 30817
30543 void overrideMimeType(String override); 30818 void overrideMimeType(String override);
30544 30819
30820 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture]);
30821
30545 void send([var data]); 30822 void send([var data]);
30546 30823
30547 void setRequestHeader(String header, String value); 30824 void setRequestHeader(String header, String value);
30548 } 30825 }
30549 30826
30550 interface XMLHttpRequestEvents extends Events { 30827 interface XMLHttpRequestEvents extends Events {
30551 30828
30552 EventListenerList get abort(); 30829 EventListenerList get abort();
30553 30830
30554 EventListenerList get error(); 30831 EventListenerList get error();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
30597 } 30874 }
30598 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 30875 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
30599 // for details. All rights reserved. Use of this source code is governed by a 30876 // for details. All rights reserved. Use of this source code is governed by a
30600 // BSD-style license that can be found in the LICENSE file. 30877 // BSD-style license that can be found in the LICENSE file.
30601 30878
30602 // WARNING: Do not edit - generated code. 30879 // WARNING: Do not edit - generated code.
30603 30880
30604 interface XMLHttpRequestUpload extends EventTarget { 30881 interface XMLHttpRequestUpload extends EventTarget {
30605 30882
30606 XMLHttpRequestUploadEvents get on(); 30883 XMLHttpRequestUploadEvents get on();
30884
30885 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]);
30886
30887 bool $dom_dispatchEvent(Event evt);
30888
30889 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture]);
30607 } 30890 }
30608 30891
30609 interface XMLHttpRequestUploadEvents extends Events { 30892 interface XMLHttpRequestUploadEvents extends Events {
30610 30893
30611 EventListenerList get abort(); 30894 EventListenerList get abort();
30612 30895
30613 EventListenerList get error(); 30896 EventListenerList get error();
30614 30897
30615 EventListenerList get load(); 30898 EventListenerList get load();
30616 30899
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after
31530 for (TimeoutHandler handler in readyMeasurementFrameCallbacks) { 31813 for (TimeoutHandler handler in readyMeasurementFrameCallbacks) {
31531 // TODO(jacobr): wrap each call to a handler in a try-catch block. 31814 // TODO(jacobr): wrap each call to a handler in a try-catch block.
31532 handler(); 31815 handler();
31533 } 31816 }
31534 } 31817 }
31535 } 31818 }
31536 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 31819 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
31537 // for details. All rights reserved. Use of this source code is governed by a 31820 // for details. All rights reserved. Use of this source code is governed by a
31538 // BSD-style license that can be found in the LICENSE file. 31821 // BSD-style license that can be found in the LICENSE file.
31539 31822
31540 class _TextFactoryProvider {
31541
31542 factory Text(String data) => _document._createTextNode(data);
31543 }
31544
31545 class _EventFactoryProvider { 31823 class _EventFactoryProvider {
31546 factory Event(String type, [bool canBubble = true, 31824 factory Event(String type, [bool canBubble = true,
31547 bool cancelable = true]) { 31825 bool cancelable = true]) {
31548 final _EventImpl e = _document._createEvent("Event"); 31826 final _EventImpl e = _document.$dom_createEvent("Event");
31549 e._initEvent(type, canBubble, cancelable); 31827 e.$dom_initEvent(type, canBubble, cancelable);
31550 return e; 31828 return e;
31551 } 31829 }
31552 } 31830 }
31553 31831
31554 class _MouseEventFactoryProvider { 31832 class _MouseEventFactoryProvider {
31555 factory MouseEvent(String type, Window view, int detail, 31833 factory MouseEvent(String type, Window view, int detail,
31556 int screenX, int screenY, int clientX, int clientY, int button, 31834 int screenX, int screenY, int clientX, int clientY, int button,
31557 [bool canBubble = true, bool cancelable = true, bool ctrlKey = false, 31835 [bool canBubble = true, bool cancelable = true, bool ctrlKey = false,
31558 bool altKey = false, bool shiftKey = false, bool metaKey = false, 31836 bool altKey = false, bool shiftKey = false, bool metaKey = false,
31559 EventTarget relatedTarget = null]) { 31837 EventTarget relatedTarget = null]) {
31560 final e = _document._createEvent("MouseEvent"); 31838 final e = _document.$dom_createEvent("MouseEvent");
31561 e._initMouseEvent(type, canBubble, cancelable, view, detail, 31839 e.$dom_initMouseEvent(type, canBubble, cancelable, view, detail,
31562 screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, 31840 screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey,
31563 button, relatedTarget); 31841 button, relatedTarget);
31564 return e; 31842 return e;
31565 } 31843 }
31566 } 31844 }
31567 31845
31568 class _CSSStyleDeclarationFactoryProvider { 31846 class _CSSStyleDeclarationFactoryProvider {
31569 factory CSSStyleDeclaration.css(String css) { 31847 factory CSSStyleDeclaration.css(String css) {
31570 final style = new Element.tag('div').style; 31848 final style = new Element.tag('div').style;
31571 style.cssText = css; 31849 style.cssText = css;
31572 return style; 31850 return style;
31573 } 31851 }
31574 31852
31575 factory CSSStyleDeclaration() { 31853 factory CSSStyleDeclaration() {
31576 return new CSSStyleDeclaration.css(''); 31854 return new CSSStyleDeclaration.css('');
31577 } 31855 }
31578 } 31856 }
31579 31857
31580 final _START_TAG_REGEXP = const RegExp('<(\\w+)');
31581 class _ElementFactoryProvider {
31582 static final _CUSTOM_PARENT_TAG_MAP = const {
31583 'body' : 'html',
31584 'head' : 'html',
31585 'caption' : 'table',
31586 'td': 'tr',
31587 'colgroup': 'table',
31588 'col' : 'colgroup',
31589 'tr' : 'tbody',
31590 'tbody' : 'table',
31591 'tfoot' : 'table',
31592 'thead' : 'table',
31593 'track' : 'audio',
31594 };
31595
31596 /** @domName Document.createElement */
31597 factory Element.html(String html) {
31598 // TODO(jacobr): this method can be made more robust and performant.
31599 // 1) Cache the dummy parent elements required to use innerHTML rather than
31600 // creating them every call.
31601 // 2) Verify that the html does not contain leading or trailing text nodes.
31602 // 3) Verify that the html does not contain both <head> and <body> tags.
31603 // 4) Detatch the created element from its dummy parent.
31604 String parentTag = 'div';
31605 String tag;
31606 final match = _START_TAG_REGEXP.firstMatch(html);
31607 if (match !== null) {
31608 tag = match.group(1).toLowerCase();
31609 if (_CUSTOM_PARENT_TAG_MAP.containsKey(tag)) {
31610 parentTag = _CUSTOM_PARENT_TAG_MAP[tag];
31611 }
31612 }
31613 final _ElementImpl temp = new Element.tag(parentTag);
31614 temp.innerHTML = html;
31615
31616 Element element;
31617 if (temp.elements.length == 1) {
31618 element = temp.elements.first;
31619 } else if (parentTag == 'html' && temp.elements.length == 2) {
31620 // Work around for edge case in WebKit and possibly other browsers where
31621 // both body and head elements are created even though the inner html
31622 // only contains a head or body element.
31623 element = temp.elements[tag == 'head' ? 0 : 1];
31624 } else {
31625 throw new IllegalArgumentException('HTML had ${temp.elements.length} ' +
31626 'top level elements but 1 expected');
31627 }
31628 element.remove();
31629 return element;
31630 }
31631
31632 /** @domName Document.createElement */
31633 factory Element.tag(String tag) => _document._createElement(tag);
31634 }
31635
31636 class _DocumentFragmentFactoryProvider { 31858 class _DocumentFragmentFactoryProvider {
31637 /** @domName Document.createDocumentFragment */ 31859 /** @domName Document.createDocumentFragment */
31638 factory DocumentFragment() => document.createDocumentFragment(); 31860 factory DocumentFragment() => document.createDocumentFragment();
31639 31861
31640 factory DocumentFragment.html(String html) { 31862 factory DocumentFragment.html(String html) {
31641 final fragment = new DocumentFragment(); 31863 final fragment = new DocumentFragment();
31642 fragment.innerHTML = html; 31864 fragment.innerHTML = html;
31643 return fragment; 31865 return fragment;
31644 } 31866 }
31645 31867
(...skipping 17 matching lines...) Expand all
31663 // Copy list first since we don't want liveness during iteration. 31885 // Copy list first since we don't want liveness during iteration.
31664 final List nodes = new List.from(e.nodes); 31886 final List nodes = new List.from(e.nodes);
31665 fragment.nodes.addAll(nodes); 31887 fragment.nodes.addAll(nodes);
31666 return fragment; 31888 return fragment;
31667 } 31889 }
31668 } 31890 }
31669 31891
31670 class _SVGElementFactoryProvider { 31892 class _SVGElementFactoryProvider {
31671 factory SVGElement.tag(String tag) { 31893 factory SVGElement.tag(String tag) {
31672 final Element temp = 31894 final Element temp =
31673 _document._createElementNS("http://www.w3.org/2000/svg", tag); 31895 _document.$dom_createElementNS("http://www.w3.org/2000/svg", tag);
31674 return temp; 31896 return temp;
31675 } 31897 }
31676 31898
31677 factory SVGElement.svg(String svg) { 31899 factory SVGElement.svg(String svg) {
31678 Element parentTag; 31900 Element parentTag;
31679 final match = _START_TAG_REGEXP.firstMatch(svg); 31901 final match = _START_TAG_REGEXP.firstMatch(svg);
31680 if (match != null && match.group(1).toLowerCase() == 'svg') { 31902 if (match != null && match.group(1).toLowerCase() == 'svg') {
31681 parentTag = new Element.tag('div'); 31903 parentTag = new Element.tag('div');
31682 } else { 31904 } else {
31683 parentTag = new SVGSVGElement(); 31905 parentTag = new SVGSVGElement();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
31764 31986
31765 class _PointFactoryProvider { 31987 class _PointFactoryProvider {
31766 31988
31767 factory Point(num x, num y) native 'return new WebKitPoint(x, y);'; 31989 factory Point(num x, num y) native 'return new WebKitPoint(x, y);';
31768 } 31990 }
31769 31991
31770 class _WebSocketFactoryProvider { 31992 class _WebSocketFactoryProvider {
31771 31993
31772 factory WebSocket(String url) native '''return new WebSocket(url);'''; 31994 factory WebSocket(String url) native '''return new WebSocket(url);''';
31773 } 31995 }
31774 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 31996
31997 class _TextFactoryProvider {
31998 factory Text(String data) native "return document.createTextNode(data);";
31999 }// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
31775 // for details. All rights reserved. Use of this source code is governed by a 32000 // for details. All rights reserved. Use of this source code is governed by a
31776 // BSD-style license that can be found in the LICENSE file. 32001 // BSD-style license that can be found in the LICENSE file.
31777 32002
31778 // TODO(rnystrom): add a way to supress public classes from DartDoc output. 32003 // TODO(rnystrom): add a way to supress public classes from DartDoc output.
32004 // TODO(jacobr): we can remove this class now that we are using the $dom_
32005 // convention for deprecated methods rather than truly private methods.
31779 /** 32006 /**
31780 * This class is intended for testing purposes only. 32007 * This class is intended for testing purposes only.
31781 */ 32008 */
31782 class Testing { 32009 class Testing {
31783 static void addEventListener(EventTarget target, String type, EventListener li stener, bool useCapture) { 32010 static void addEventListener(EventTarget target, String type, EventListener li stener, bool useCapture) {
31784 final _EventTargetImpl targetImpl = target; 32011 final _EventTargetImpl targetImpl = target;
31785 targetImpl._addEventListener(type, listener, useCapture); 32012 targetImpl.$dom_addEventListener(type, listener, useCapture);
31786 } 32013 }
31787 static void removeEventListener(EventTarget target, String type, EventListener listener, bool useCapture) { 32014 static void removeEventListener(EventTarget target, String type, EventListener listener, bool useCapture) {
31788 final _EventTargetImpl targetImpl = target; 32015 final _EventTargetImpl targetImpl = target;
31789 targetImpl._removeEventListener(type, listener, useCapture); 32016 targetImpl.$dom_removeEventListener(type, listener, useCapture);
31790 } 32017 }
31791 32018
31792 }// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 32019 }// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
31793 // for details. All rights reserved. Use of this source code is governed by a 32020 // for details. All rights reserved. Use of this source code is governed by a
31794 // BSD-style license that can be found in the LICENSE file. 32021 // BSD-style license that can be found in the LICENSE file.
31795 32022
31796 /** 32023 /**
31797 * Utils for device detection. 32024 * Utils for device detection.
31798 */ 32025 */
31799 class _Device { 32026 class _Device {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
31903 if (length < 0) throw new IllegalArgumentException('length'); 32130 if (length < 0) throw new IllegalArgumentException('length');
31904 if (start < 0) throw new IndexOutOfRangeException(start); 32131 if (start < 0) throw new IndexOutOfRangeException(start);
31905 int end = start + length; 32132 int end = start + length;
31906 if (end > a.length) throw new IndexOutOfRangeException(end); 32133 if (end > a.length) throw new IndexOutOfRangeException(end);
31907 for (int i = start; i < end; i++) { 32134 for (int i = start; i < end; i++) {
31908 accumulator.add(a[i]); 32135 accumulator.add(a[i]);
31909 } 32136 }
31910 return accumulator; 32137 return accumulator;
31911 } 32138 }
31912 } 32139 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698