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

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

Issue 9677012: Port the SVG code to the wrapperless DOM. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « client/html/dartium/html_dartium.dart ('k') | client/html/release/html.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 static final int CSS_RGBCOLOR = 25; 797 static final int CSS_RGBCOLOR = 25;
798 798
799 static final int CSS_S = 15; 799 static final int CSS_S = 15;
800 800
801 static final int CSS_STRING = 19; 801 static final int CSS_STRING = 19;
802 802
803 static final int CSS_UNKNOWN = 0; 803 static final int CSS_UNKNOWN = 0;
804 804
805 static final int CSS_URI = 20; 805 static final int CSS_URI = 20;
806 806
807 static final int CSS_VH = 27;
808
809 static final int CSS_VMIN = 28;
810
811 static final int CSS_VW = 26;
812
813 final int primitiveType; 807 final int primitiveType;
814 808
815 _CounterImpl getCounterValue() native; 809 _CounterImpl getCounterValue() native;
816 810
817 num getFloatValue(int unitType) native; 811 num getFloatValue(int unitType) native;
818 812
819 _RGBColorImpl getRGBColorValue() native; 813 _RGBColorImpl getRGBColorValue() native;
820 814
821 _RectImpl getRectValue() native; 815 _RectImpl getRectValue() native;
822 816
(...skipping 3862 matching lines...) Expand 10 before | Expand all | Expand 10 after
4685 String get webkitVisibilityState() native "return this.parentNode.webkitVisibi lityState;"; 4679 String get webkitVisibilityState() native "return this.parentNode.webkitVisibi lityState;";
4686 4680
4687 _RangeImpl caretRangeFromPoint(int x, int y) native "return this.parentNode.ca retRangeFromPoint(x, y);"; 4681 _RangeImpl caretRangeFromPoint(int x, int y) native "return this.parentNode.ca retRangeFromPoint(x, y);";
4688 4682
4689 _CDATASectionImpl createCDATASection(String data) native "return this.parentNo de.createCDATASection(data);"; 4683 _CDATASectionImpl createCDATASection(String data) native "return this.parentNo de.createCDATASection(data);";
4690 4684
4691 _DocumentFragmentImpl createDocumentFragment() native "return this.parentNode. createDocumentFragment();"; 4685 _DocumentFragmentImpl createDocumentFragment() native "return this.parentNode. createDocumentFragment();";
4692 4686
4693 _ElementImpl _createElement(String tagName) native "return this.parentNode.cre ateElement(tagName);"; 4687 _ElementImpl _createElement(String tagName) native "return this.parentNode.cre ateElement(tagName);";
4694 4688
4689 _ElementImpl _createElementNS(String namespaceURI, String qualifiedName) nativ e "return this.parentNode.createElementNS(namespaceURI, qualifiedName);";
4690
4695 _EventImpl _createEvent(String eventType) native "return this.parentNode.creat eEvent(eventType);"; 4691 _EventImpl _createEvent(String eventType) native "return this.parentNode.creat eEvent(eventType);";
4696 4692
4697 _RangeImpl createRange() native "return this.parentNode.createRange();"; 4693 _RangeImpl createRange() native "return this.parentNode.createRange();";
4698 4694
4699 _TextImpl _createTextNode(String data) native "return this.parentNode.createTe xtNode(data);"; 4695 _TextImpl _createTextNode(String data) native "return this.parentNode.createTe xtNode(data);";
4700 4696
4701 _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);"; 4697 _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);";
4702 4698
4703 _TouchListImpl _createTouchList() native "return this.parentNode.createTouchLi st();"; 4699 _TouchListImpl _createTouchList() native "return this.parentNode.createTouchLi st();";
4704 4700
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
5215 class _DynamicsCompressorNodeImpl extends _AudioNodeImpl implements DynamicsComp ressorNode native "*DynamicsCompressorNode" { 5211 class _DynamicsCompressorNodeImpl extends _AudioNodeImpl implements DynamicsComp ressorNode native "*DynamicsCompressorNode" {
5216 5212
5217 final _AudioParamImpl knee; 5213 final _AudioParamImpl knee;
5218 5214
5219 final _AudioParamImpl ratio; 5215 final _AudioParamImpl ratio;
5220 5216
5221 final _AudioParamImpl reduction; 5217 final _AudioParamImpl reduction;
5222 5218
5223 final _AudioParamImpl threshold; 5219 final _AudioParamImpl threshold;
5224 } 5220 }
5221
5222 class _EXTTextureFilterAnisotropicImpl implements EXTTextureFilterAnisotropic na tive "*EXTTextureFilterAnisotropic" {
5223
5224 static final int MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
5225
5226 static final int TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
5227 }
5225 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 5228 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
5226 // for details. All rights reserved. Use of this source code is governed by a 5229 // for details. All rights reserved. Use of this source code is governed by a
5227 // BSD-style license that can be found in the LICENSE file. 5230 // BSD-style license that can be found in the LICENSE file.
5228 5231
5229 // TODO(jacobr): use _Lists.dart to remove some of the duplicated 5232 // TODO(jacobr): use _Lists.dart to remove some of the duplicated
5230 // functionality. 5233 // functionality.
5231 class _ChildrenElementList implements ElementList { 5234 class _ChildrenElementList implements ElementList {
5232 // Raw Element. 5235 // Raw Element.
5233 final _ElementImpl _element; 5236 final _ElementImpl _element;
5234 final _HTMLCollectionImpl _childElements; 5237 final _HTMLCollectionImpl _childElements;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
5314 5317
5315 Element add(_ElementImpl value) { 5318 Element add(_ElementImpl value) {
5316 _element._appendChild(value); 5319 _element._appendChild(value);
5317 return value; 5320 return value;
5318 } 5321 }
5319 5322
5320 Element addLast(_ElementImpl value) => add(value); 5323 Element addLast(_ElementImpl value) => add(value);
5321 5324
5322 Iterator<Element> iterator() => _toList().iterator(); 5325 Iterator<Element> iterator() => _toList().iterator();
5323 5326
5324 void addAll(Collection<_ElementImpl> collection) { 5327 void addAll(Collection<Element> collection) {
5325 for (_ElementImpl element in collection) { 5328 for (_ElementImpl element in collection) {
5326 _element._appendChild(element); 5329 _element._appendChild(element);
5327 } 5330 }
5328 } 5331 }
5329 5332
5330 void sort(int compare(Element a, Element b)) { 5333 void sort(int compare(Element a, Element b)) {
5331 throw const UnsupportedOperationException('TODO(jacobr): should we impl?'); 5334 throw const UnsupportedOperationException('TODO(jacobr): should we impl?');
5332 } 5335 }
5333 5336
5334 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) { 5337 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
6305 bool _dispatchEvent(_EventImpl event) native "return this.dispatchEvent(event) ;"; 6308 bool _dispatchEvent(_EventImpl event) native "return this.dispatchEvent(event) ;";
6306 6309
6307 void _removeEventListener(String type, EventListener listener, [bool useCaptur e = null]) native "this.removeEventListener(type, listener, useCapture);"; 6310 void _removeEventListener(String type, EventListener listener, [bool useCaptur e = null]) native "this.removeEventListener(type, listener, useCapture);";
6308 6311
6309 } 6312 }
6310 6313
6311 class _FieldSetElementImpl extends _ElementImpl implements FieldSetElement nativ e "*HTMLFieldSetElement" { 6314 class _FieldSetElementImpl extends _ElementImpl implements FieldSetElement nativ e "*HTMLFieldSetElement" {
6312 6315
6313 final _FormElementImpl form; 6316 final _FormElementImpl form;
6314 6317
6318 String name;
6319
6320 final String type;
6321
6315 final String validationMessage; 6322 final String validationMessage;
6316 6323
6317 final _ValidityStateImpl validity; 6324 final _ValidityStateImpl validity;
6318 6325
6319 final bool willValidate; 6326 final bool willValidate;
6320 6327
6321 bool checkValidity() native; 6328 bool checkValidity() native;
6322 6329
6323 void setCustomValidity(String error) native; 6330 void setCustomValidity(String error) native;
6324 } 6331 }
(...skipping 3694 matching lines...) Expand 10 before | Expand all | Expand 10 after
10019 10026
10020 _CSSValueImpl getPresentationAttribute(String name) native; 10027 _CSSValueImpl getPresentationAttribute(String name) native;
10021 } 10028 }
10022 10029
10023 class _SVGDocumentImpl extends _DocumentImpl implements SVGDocument native "*SVG Document" { 10030 class _SVGDocumentImpl extends _DocumentImpl implements SVGDocument native "*SVG Document" {
10024 10031
10025 final _SVGSVGElementImpl rootElement; 10032 final _SVGSVGElementImpl rootElement;
10026 10033
10027 _EventImpl _createEvent(String eventType) native "return this.createEvent(even tType);"; 10034 _EventImpl _createEvent(String eventType) native "return this.createEvent(even tType);";
10028 } 10035 }
10036 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
10037 // for details. All rights reserved. Use of this source code is governed by a
10038 // BSD-style license that can be found in the LICENSE file.
10039
10040 class _AttributeClassSet extends _CssClassSet {
10041 _AttributeClassSet(element) : super(element);
10042
10043 String _className() => _element.attributes['class'];
10044
10045 void _write(Set s) {
10046 _element.attributes['class'] = _formatSet(s);
10047 }
10048 }
10029 10049
10030 class _SVGElementImpl extends _ElementImpl implements SVGElement native "*SVGEle ment" { 10050 class _SVGElementImpl extends _ElementImpl implements SVGElement native "*SVGEle ment" {
10051 Set<String> get classes() {
10052 if (_cssClassSet === null) {
10053 _cssClassSet = new _AttributeClassSet(_ptr);
10054 }
10055 return _cssClassSet;
10056 }
10057
10058 ElementList get elements() => new FilteredElementList(this);
10059
10060 void set elements(Collection<Element> value) {
10061 final elements = this.elements;
10062 elements.clear();
10063 elements.addAll(value);
10064 }
10065
10066 String get outerHTML() {
10067 final container = new Element.tag("div");
10068 final SVGElement clone = this.clone(true);
10069 container.elements.add(clone);
10070 return container.innerHTML;
10071 }
10072
10073 String get innerHTML() {
10074 final container = new Element.tag("div");
10075 final SVGElement clone = this.clone(true);
10076 container.elements.addAll(clone.elements);
10077 return container.innerHTML;
10078 }
10079
10080 void set innerHTML(String svg) {
10081 final container = new Element.tag("div");
10082 // Wrap the SVG string in <svg> so that SVGElements are created, rather than
10083 // HTMLElements.
10084 container.innerHTML = '<svg version="1.1">$svg</svg>';
10085 this.elements = container.elements.first.elements;
10086 }
10087
10031 10088
10032 // Shadowing definition. 10089 // Shadowing definition.
10033 String get id() native "return this.id;"; 10090 String get id() native "return this.id;";
10034 10091
10035 void set id(String value) native "this.id = value;"; 10092 void set id(String value) native "this.id = value;";
10036 10093
10037 final _SVGSVGElementImpl ownerSVGElement; 10094 final _SVGSVGElementImpl ownerSVGElement;
10038 10095
10039 final _SVGElementImpl viewportElement; 10096 final _SVGElementImpl viewportElement;
10040 10097
10041 String xmlbase; 10098 String xmlbase;
10099
10042 } 10100 }
10043 10101
10044 class _SVGElementInstanceImpl extends _EventTargetImpl implements SVGElementInst ance native "*SVGElementInstance" { 10102 class _SVGElementInstanceImpl extends _EventTargetImpl implements SVGElementInst ance native "*SVGElementInstance" {
10045 10103
10046 _SVGElementInstanceEventsImpl get on() => 10104 _SVGElementInstanceEventsImpl get on() =>
10047 new _SVGElementInstanceEventsImpl(this); 10105 new _SVGElementInstanceEventsImpl(this);
10048 10106
10049 final _SVGElementInstanceListImpl childNodes; 10107 final _SVGElementInstanceListImpl childNodes;
10050 10108
10051 final _SVGElementImpl correspondingElement; 10109 final _SVGElementImpl correspondingElement;
(...skipping 2952 matching lines...) Expand 10 before | Expand all | Expand 10 after
13004 bool multiple; 13062 bool multiple;
13005 13063
13006 String name; 13064 String name;
13007 13065
13008 final _HTMLOptionsCollectionImpl options; 13066 final _HTMLOptionsCollectionImpl options;
13009 13067
13010 bool required; 13068 bool required;
13011 13069
13012 int selectedIndex; 13070 int selectedIndex;
13013 13071
13072 final _HTMLCollectionImpl selectedOptions;
13073
13014 int size; 13074 int size;
13015 13075
13016 final String type; 13076 final String type;
13017 13077
13018 final String validationMessage; 13078 final String validationMessage;
13019 13079
13020 final _ValidityStateImpl validity; 13080 final _ValidityStateImpl validity;
13021 13081
13022 String value; 13082 String value;
13023 13083
13024 final bool willValidate; 13084 final bool willValidate;
13025 13085
13026 void add(_ElementImpl element, _ElementImpl before) native; 13086 void add(_ElementImpl element, _ElementImpl before) native;
13027 13087
13028 bool checkValidity() native; 13088 bool checkValidity() native;
13029 13089
13030 _NodeImpl item(int index) native; 13090 _NodeImpl item(int index) native;
13031 13091
13032 _NodeImpl namedItem(String name) native; 13092 _NodeImpl namedItem(String name) native;
13033 13093
13034 void setCustomValidity(String error) native; 13094 void setCustomValidity(String error) native;
13035 } 13095 }
13036 13096
13037 class _ShadowElementImpl extends _ElementImpl implements ShadowElement native "* HTMLShadowElement" { 13097 class _ShadowElementImpl extends _ElementImpl implements ShadowElement native "* HTMLShadowElement" {
13038 } 13098 }
13039 13099
13040 class _ShadowRootImpl extends _DocumentFragmentImpl implements ShadowRoot native "*ShadowRoot" { 13100 class _ShadowRootImpl extends _DocumentFragmentImpl implements ShadowRoot native "*ShadowRoot" {
13041 13101
13102 final _ElementImpl activeElement;
13103
13042 final _ElementImpl host; 13104 final _ElementImpl host;
13043 13105
13044 String innerHTML; 13106 String innerHTML;
13045 13107
13046 _ElementImpl getElementById(String elementId) native; 13108 _ElementImpl getElementById(String elementId) native;
13047 13109
13048 _NodeListImpl getElementsByClassName(String className) native; 13110 _NodeListImpl getElementsByClassName(String className) native;
13049 13111
13050 _NodeListImpl getElementsByTagName(String tagName) native; 13112 _NodeListImpl getElementsByTagName(String tagName) native;
13051 13113
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
13706 class _TrackElementImpl extends _ElementImpl implements TrackElement native "*HT MLTrackElement" { 13768 class _TrackElementImpl extends _ElementImpl implements TrackElement native "*HT MLTrackElement" {
13707 13769
13708 static final int ERROR = 3; 13770 static final int ERROR = 3;
13709 13771
13710 static final int LOADED = 2; 13772 static final int LOADED = 2;
13711 13773
13712 static final int LOADING = 1; 13774 static final int LOADING = 1;
13713 13775
13714 static final int NONE = 0; 13776 static final int NONE = 0;
13715 13777
13716 bool isDefault;
13717
13718 String kind; 13778 String kind;
13719 13779
13720 String label; 13780 String label;
13721 13781
13722 final int readyState; 13782 final int readyState;
13723 13783
13724 String src; 13784 String src;
13725 13785
13726 String srclang; 13786 String srclang;
13727 13787
(...skipping 3310 matching lines...) Expand 10 before | Expand all | Expand 10 after
17038 static final int CSS_RGBCOLOR = 25; 17098 static final int CSS_RGBCOLOR = 25;
17039 17099
17040 static final int CSS_S = 15; 17100 static final int CSS_S = 15;
17041 17101
17042 static final int CSS_STRING = 19; 17102 static final int CSS_STRING = 19;
17043 17103
17044 static final int CSS_UNKNOWN = 0; 17104 static final int CSS_UNKNOWN = 0;
17045 17105
17046 static final int CSS_URI = 20; 17106 static final int CSS_URI = 20;
17047 17107
17048 static final int CSS_VH = 27;
17049
17050 static final int CSS_VMIN = 28;
17051
17052 static final int CSS_VW = 26;
17053
17054 final int primitiveType; 17108 final int primitiveType;
17055 17109
17056 Counter getCounterValue(); 17110 Counter getCounterValue();
17057 17111
17058 num getFloatValue(int unitType); 17112 num getFloatValue(int unitType);
17059 17113
17060 RGBColor getRGBColorValue(); 17114 RGBColor getRGBColorValue();
17061 17115
17062 Rect getRectValue(); 17116 Rect getRectValue();
17063 17117
(...skipping 3267 matching lines...) Expand 10 before | Expand all | Expand 10 after
20331 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 20385 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
20332 // for details. All rights reserved. Use of this source code is governed by a 20386 // for details. All rights reserved. Use of this source code is governed by a
20333 // BSD-style license that can be found in the LICENSE file. 20387 // BSD-style license that can be found in the LICENSE file.
20334 20388
20335 interface DocumentFragment extends Element default _DocumentFragmentFactoryProvi der { 20389 interface DocumentFragment extends Element default _DocumentFragmentFactoryProvi der {
20336 20390
20337 DocumentFragment(); 20391 DocumentFragment();
20338 20392
20339 DocumentFragment.html(String html); 20393 DocumentFragment.html(String html);
20340 20394
20341 // TODO(nweiz): enable these when XML and/or SVG are ported 20395 // TODO(nweiz): enable this when XML is ported
20342 // /** WARNING: Currently this doesn't work on Dartium (issue 649). */ 20396 // /** WARNING: Currently this doesn't work on Dartium (issue 649). */
20343 // DocumentFragment.xml(String xml); 20397 // DocumentFragment.xml(String xml);
20344 // DocumentFragment.svg(String svg); 20398
20399 DocumentFragment.svg(String svg);
20345 20400
20346 DocumentFragment clone(bool deep); 20401 DocumentFragment clone(bool deep);
20347 20402
20348 20403
20349 ElementEvents get on(); 20404 ElementEvents get on();
20350 20405
20351 Element query(String selectors); 20406 Element query(String selectors);
20352 20407
20353 } 20408 }
20354 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 20409 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
(...skipping 25 matching lines...) Expand all
20380 interface DynamicsCompressorNode extends AudioNode { 20435 interface DynamicsCompressorNode extends AudioNode {
20381 20436
20382 final AudioParam knee; 20437 final AudioParam knee;
20383 20438
20384 final AudioParam ratio; 20439 final AudioParam ratio;
20385 20440
20386 final AudioParam reduction; 20441 final AudioParam reduction;
20387 20442
20388 final AudioParam threshold; 20443 final AudioParam threshold;
20389 } 20444 }
20445 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
20446 // for details. All rights reserved. Use of this source code is governed by a
20447 // BSD-style license that can be found in the LICENSE file.
20448
20449 // WARNING: Do not edit - generated code.
20450
20451 interface EXTTextureFilterAnisotropic {
20452
20453 static final int MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
20454
20455 static final int TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
20456 }
20390 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 20457 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
20391 // for details. All rights reserved. Use of this source code is governed by a 20458 // for details. All rights reserved. Use of this source code is governed by a
20392 // BSD-style license that can be found in the LICENSE file. 20459 // BSD-style license that can be found in the LICENSE file.
20393 20460
20394 // WARNING: Do not edit - generated code. 20461 // WARNING: Do not edit - generated code.
20395 20462
20396 /** 20463 /**
20397 * Provides a Map abstraction on top of data-* attributes, similar to the 20464 * Provides a Map abstraction on top of data-* attributes, similar to the
20398 * dataSet in the old DOM. 20465 * dataSet in the old DOM.
20399 */ 20466 */
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
21214 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 21281 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
21215 // for details. All rights reserved. Use of this source code is governed by a 21282 // for details. All rights reserved. Use of this source code is governed by a
21216 // BSD-style license that can be found in the LICENSE file. 21283 // BSD-style license that can be found in the LICENSE file.
21217 21284
21218 // WARNING: Do not edit - generated code. 21285 // WARNING: Do not edit - generated code.
21219 21286
21220 interface FieldSetElement extends Element { 21287 interface FieldSetElement extends Element {
21221 21288
21222 final FormElement form; 21289 final FormElement form;
21223 21290
21291 String name;
21292
21293 final String type;
21294
21224 final String validationMessage; 21295 final String validationMessage;
21225 21296
21226 final ValidityState validity; 21297 final ValidityState validity;
21227 21298
21228 final bool willValidate; 21299 final bool willValidate;
21229 21300
21230 bool checkValidity(); 21301 bool checkValidity();
21231 21302
21232 void setCustomValidity(String error); 21303 void setCustomValidity(String error);
21233 } 21304 }
(...skipping 3564 matching lines...) Expand 10 before | Expand all | Expand 10 after
24798 // WARNING: Do not edit - generated code. 24869 // WARNING: Do not edit - generated code.
24799 24870
24800 interface SVGDocument extends Document { 24871 interface SVGDocument extends Document {
24801 24872
24802 final SVGSVGElement rootElement; 24873 final SVGSVGElement rootElement;
24803 } 24874 }
24804 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 24875 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
24805 // for details. All rights reserved. Use of this source code is governed by a 24876 // for details. All rights reserved. Use of this source code is governed by a
24806 // BSD-style license that can be found in the LICENSE file. 24877 // BSD-style license that can be found in the LICENSE file.
24807 24878
24808 // WARNING: Do not edit - generated code. 24879 interface SVGElement extends Element default _SVGElementFactoryProvider {
24809 24880
24810 interface SVGElement extends Element { 24881 SVGElement.tag(String tag);
24882 SVGElement.svg(String svg);
24883
24884 SVGElement clone(bool deep);
24885
24811 24886
24812 String id; 24887 String id;
24813 24888
24814 final SVGSVGElement ownerSVGElement; 24889 final SVGSVGElement ownerSVGElement;
24815 24890
24816 final SVGElement viewportElement; 24891 final SVGElement viewportElement;
24817 24892
24818 String xmlbase; 24893 String xmlbase;
24894
24819 } 24895 }
24820 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 24896 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
24821 // for details. All rights reserved. Use of this source code is governed by a 24897 // for details. All rights reserved. Use of this source code is governed by a
24822 // BSD-style license that can be found in the LICENSE file. 24898 // BSD-style license that can be found in the LICENSE file.
24823 24899
24824 // WARNING: Do not edit - generated code. 24900 // WARNING: Do not edit - generated code.
24825 24901
24826 interface SVGElementInstance extends EventTarget { 24902 interface SVGElementInstance extends EventTarget {
24827 24903
24828 SVGElementInstanceEvents get on(); 24904 SVGElementInstanceEvents get on();
(...skipping 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after
26547 static final int RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3; 26623 static final int RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3;
26548 26624
26549 static final int RENDERING_INTENT_SATURATION = 4; 26625 static final int RENDERING_INTENT_SATURATION = 4;
26550 26626
26551 static final int RENDERING_INTENT_UNKNOWN = 0; 26627 static final int RENDERING_INTENT_UNKNOWN = 0;
26552 } 26628 }
26553 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 26629 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
26554 // for details. All rights reserved. Use of this source code is governed by a 26630 // for details. All rights reserved. Use of this source code is governed by a
26555 // BSD-style license that can be found in the LICENSE file. 26631 // BSD-style license that can be found in the LICENSE file.
26556 26632
26557 // WARNING: Do not edit - generated code. 26633 interface SVGSVGElement extends SVGElement, SVGTests, SVGLangSpace, SVGExternalR esourcesRequired, SVGStylable, SVGLocatable, SVGFitToViewBox, SVGZoomAndPan
26634 default _SVGSVGElementFactoryProvider {
26635 SVGSVGElement();
26558 26636
26559 interface SVGSVGElement extends SVGElement, SVGTests, SVGLangSpace, SVGExternalR esourcesRequired, SVGStylable, SVGLocatable, SVGFitToViewBox, SVGZoomAndPan {
26560 26637
26561 String contentScriptType; 26638 String contentScriptType;
26562 26639
26563 String contentStyleType; 26640 String contentStyleType;
26564 26641
26565 num currentScale; 26642 num currentScale;
26566 26643
26567 final SVGPoint currentTranslate; 26644 final SVGPoint currentTranslate;
26568 26645
26569 final SVGAnimatedLength height; 26646 final SVGAnimatedLength height;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
26624 26701
26625 void setCurrentTime(num seconds); 26702 void setCurrentTime(num seconds);
26626 26703
26627 int suspendRedraw(int maxWaitMilliseconds); 26704 int suspendRedraw(int maxWaitMilliseconds);
26628 26705
26629 void unpauseAnimations(); 26706 void unpauseAnimations();
26630 26707
26631 void unsuspendRedraw(int suspendHandleId); 26708 void unsuspendRedraw(int suspendHandleId);
26632 26709
26633 void unsuspendRedrawAll(); 26710 void unsuspendRedrawAll();
26711
26634 } 26712 }
26635 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 26713 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
26636 // for details. All rights reserved. Use of this source code is governed by a 26714 // for details. All rights reserved. Use of this source code is governed by a
26637 // BSD-style license that can be found in the LICENSE file. 26715 // BSD-style license that can be found in the LICENSE file.
26638 26716
26639 // WARNING: Do not edit - generated code. 26717 // WARNING: Do not edit - generated code.
26640 26718
26641 interface SVGScriptElement extends SVGElement, SVGURIReference, SVGExternalResou rcesRequired { 26719 interface SVGScriptElement extends SVGElement, SVGURIReference, SVGExternalResou rcesRequired {
26642 26720
26643 String type; 26721 String type;
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
27157 bool multiple; 27235 bool multiple;
27158 27236
27159 String name; 27237 String name;
27160 27238
27161 final HTMLOptionsCollection options; 27239 final HTMLOptionsCollection options;
27162 27240
27163 bool required; 27241 bool required;
27164 27242
27165 int selectedIndex; 27243 int selectedIndex;
27166 27244
27245 final HTMLCollection selectedOptions;
27246
27167 int size; 27247 int size;
27168 27248
27169 final String type; 27249 final String type;
27170 27250
27171 final String validationMessage; 27251 final String validationMessage;
27172 27252
27173 final ValidityState validity; 27253 final ValidityState validity;
27174 27254
27175 String value; 27255 String value;
27176 27256
(...skipping 20 matching lines...) Expand all
27197 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 27277 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
27198 // for details. All rights reserved. Use of this source code is governed by a 27278 // for details. All rights reserved. Use of this source code is governed by a
27199 // BSD-style license that can be found in the LICENSE file. 27279 // BSD-style license that can be found in the LICENSE file.
27200 27280
27201 // WARNING: Do not edit - generated code. 27281 // WARNING: Do not edit - generated code.
27202 27282
27203 interface ShadowRoot extends DocumentFragment default _ShadowRootFactoryProvider { 27283 interface ShadowRoot extends DocumentFragment default _ShadowRootFactoryProvider {
27204 27284
27205 ShadowRoot(Element host); 27285 ShadowRoot(Element host);
27206 27286
27287 final Element activeElement;
27288
27207 final Element host; 27289 final Element host;
27208 27290
27209 String innerHTML; 27291 String innerHTML;
27210 27292
27211 Element getElementById(String elementId); 27293 Element getElementById(String elementId);
27212 27294
27213 NodeList getElementsByClassName(String className); 27295 NodeList getElementsByClassName(String className);
27214 27296
27215 NodeList getElementsByTagName(String tagName); 27297 NodeList getElementsByTagName(String tagName);
27216 27298
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
27934 interface TrackElement extends Element { 28016 interface TrackElement extends Element {
27935 28017
27936 static final int ERROR = 3; 28018 static final int ERROR = 3;
27937 28019
27938 static final int LOADED = 2; 28020 static final int LOADED = 2;
27939 28021
27940 static final int LOADING = 1; 28022 static final int LOADING = 1;
27941 28023
27942 static final int NONE = 0; 28024 static final int NONE = 0;
27943 28025
27944 bool isDefault;
27945
27946 String kind; 28026 String kind;
27947 28027
27948 String label; 28028 String label;
27949 28029
27950 final int readyState; 28030 final int readyState;
27951 28031
27952 String src; 28032 String src;
27953 28033
27954 String srclang; 28034 String srclang;
27955 28035
(...skipping 3045 matching lines...) Expand 10 before | Expand all | Expand 10 after
31001 // final fragment = new DocumentFragment(); 31081 // final fragment = new DocumentFragment();
31002 // final e = new XMLElement.tag("xml"); 31082 // final e = new XMLElement.tag("xml");
31003 // e.innerHTML = xml; 31083 // e.innerHTML = xml;
31004 // 31084 //
31005 // // Copy list first since we don't want liveness during iteration. 31085 // // Copy list first since we don't want liveness during iteration.
31006 // final List nodes = new List.from(e.nodes); 31086 // final List nodes = new List.from(e.nodes);
31007 // fragment.nodes.addAll(nodes); 31087 // fragment.nodes.addAll(nodes);
31008 // return fragment; 31088 // return fragment;
31009 // } 31089 // }
31010 31090
31011 // TODO(nweiz): enable this when SVG is ported. 31091 factory DocumentFragment.svg(String svg) {
31012 // factory DocumentFragment.svg(String svg) { 31092 final fragment = new DocumentFragment();
31013 // final fragment = new DocumentFragment(); 31093 final e = new SVGSVGElement();
31014 // final e = new SVGSVGElement(); 31094 e.innerHTML = svg;
31015 // e.innerHTML = svg; 31095
31016 // 31096 // Copy list first since we don't want liveness during iteration.
31017 // // Copy list first since we don't want liveness during iteration. 31097 final List nodes = new List.from(e.nodes);
31018 // final List nodes = new List.from(e.nodes); 31098 fragment.nodes.addAll(nodes);
31019 // fragment.nodes.addAll(nodes); 31099 return fragment;
31020 // return fragment; 31100 }
31021 // } 31101 }
31102
31103 class _SVGElementFactoryProvider {
31104 factory SVGElement.tag(String tag) =>
31105 _document._createElementNS("http://www.w3.org/2000/svg", tag);
31106
31107 factory SVGElement.svg(String svg) {
31108 Element parentTag;
31109 final match = _START_TAG_REGEXP.firstMatch(svg);
31110 if (match != null && match.group(1).toLowerCase() == 'svg') {
31111 parentTag = new Element.tag('div');
31112 } else {
31113 parentTag = new SVGSVGElement();
31114 }
31115
31116 parentTag.innerHTML = svg;
31117 if (parentTag.elements.length == 1) return parentTag.nodes.removeLast();
31118
31119 throw new IllegalArgumentException('SVG had ${parentTag.elements.length} ' +
31120 'top-level elements but 1 expected');
31121 }
31122 }
31123
31124 class _SVGSVGElementFactoryProvider {
31125 factory SVGSVGElement() {
31126 final el = new SVGElement.tag("svg");
31127 // The SVG spec requires the version attribute to match the spec version
31128 el.attributes['version'] = "1.1";
31129 return el;
31130 }
31022 } 31131 }
31023 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 31132 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
31024 // for details. All rights reserved. Use of this source code is governed by a 31133 // for details. All rights reserved. Use of this source code is governed by a
31025 // BSD-style license that can be found in the LICENSE file. 31134 // BSD-style license that can be found in the LICENSE file.
31026 31135
31027 class _AudioContextFactoryProvider { 31136 class _AudioContextFactoryProvider {
31028 31137
31029 factory AudioContext() native ''' 31138 factory AudioContext() native '''
31030 var constructor = window.AudioContext || window.webkitAudioContext; 31139 var constructor = window.AudioContext || window.webkitAudioContext;
31031 return new constructor(); 31140 return new constructor();
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
31224 if (length < 0) throw new IllegalArgumentException('length'); 31333 if (length < 0) throw new IllegalArgumentException('length');
31225 if (start < 0) throw new IndexOutOfRangeException(start); 31334 if (start < 0) throw new IndexOutOfRangeException(start);
31226 int end = start + length; 31335 int end = start + length;
31227 if (end > a.length) throw new IndexOutOfRangeException(end); 31336 if (end > a.length) throw new IndexOutOfRangeException(end);
31228 for (int i = start; i < end; i++) { 31337 for (int i = start; i < end; i++) {
31229 accumulator.add(a[i]); 31338 accumulator.add(a[i]);
31230 } 31339 }
31231 return accumulator; 31340 return accumulator;
31232 } 31341 }
31233 } 31342 }
OLDNEW
« no previous file with comments | « client/html/dartium/html_dartium.dart ('k') | client/html/release/html.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698