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

Side by Side Diff: client/html/release/html.dart

Issue 8659020: Temporary build fix in generated code (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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 | « no previous file | client/html/release/htmlimpl.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 #import('dart:dom', prefix:'dom'); 3 #import('dart:dom', prefix:'dom');
4 #import('dart:htmlimpl'); 4 #import('dart:htmlimpl');
5 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 5 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
6 // for details. All rights reserved. Use of this source code is governed by a 6 // for details. All rights reserved. Use of this source code is governed by a
7 // BSD-style license that can be found in the LICENSE file. 7 // BSD-style license that can be found in the LICENSE file.
8 8
9 // DO NOT EDIT 9 // DO NOT EDIT
10 // Auto-generated Dart HTML library. 10 // Auto-generated Dart HTML library.
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 CSSKeyframeRule findRule(String key); 453 CSSKeyframeRule findRule(String key);
454 454
455 void insertRule(String rule); 455 void insertRule(String rule);
456 } 456 }
457 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 457 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
458 // for details. All rights reserved. Use of this source code is governed by a 458 // for details. All rights reserved. Use of this source code is governed by a
459 // BSD-style license that can be found in the LICENSE file. 459 // BSD-style license that can be found in the LICENSE file.
460 460
461 // WARNING: Do not edit - generated code. 461 // WARNING: Do not edit - generated code.
462 462
463 interface CSSMatrix factory _CSSMatrixFactoryProvider { 463 interface CSSMatrix factory CSSMatrixFactoryProvider {
464 464
465 CSSMatrix([String spec]); 465 CSSMatrix([String spec]);
466 466
467 num get a(); 467 num get a();
468 468
469 void set a(num value); 469 void set a(num value);
470 470
471 num get b(); 471 num get b();
472 472
473 void set b(num value); 473 void set b(num value);
(...skipping 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after
2019 int get length(); 2019 int get length();
2020 2020
2021 File item(int index); 2021 File item(int index);
2022 } 2022 }
2023 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 2023 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2024 // for details. All rights reserved. Use of this source code is governed by a 2024 // for details. All rights reserved. Use of this source code is governed by a
2025 // BSD-style license that can be found in the LICENSE file. 2025 // BSD-style license that can be found in the LICENSE file.
2026 2026
2027 // WARNING: Do not edit - generated code. 2027 // WARNING: Do not edit - generated code.
2028 2028
2029 interface FileReader factory _FileReaderFactoryProvider { 2029 interface FileReader factory FileReaderFactoryProvider {
2030 2030
2031 FileReader(); 2031 FileReader();
2032 2032
2033 static final int DONE = 2; 2033 static final int DONE = 2;
2034 2034
2035 static final int EMPTY = 0; 2035 static final int EMPTY = 0;
2036 2036
2037 static final int LOADING = 1; 2037 static final int LOADING = 1;
2038 2038
2039 FileError get error(); 2039 FileError get error();
(...skipping 2183 matching lines...) Expand 10 before | Expand all | Expand 10 after
4223 String get valueType(); 4223 String get valueType();
4224 4224
4225 void set valueType(String value); 4225 void set valueType(String value);
4226 } 4226 }
4227 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 4227 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
4228 // for details. All rights reserved. Use of this source code is governed by a 4228 // for details. All rights reserved. Use of this source code is governed by a
4229 // BSD-style license that can be found in the LICENSE file. 4229 // BSD-style license that can be found in the LICENSE file.
4230 4230
4231 // WARNING: Do not edit - generated code. 4231 // WARNING: Do not edit - generated code.
4232 4232
4233 interface Point factory _PointFactoryProvider { 4233 interface Point factory PointFactoryProvider {
4234 4234
4235 Point(num x, num y); 4235 Point(num x, num y);
4236 4236
4237 num get x(); 4237 num get x();
4238 4238
4239 void set x(num value); 4239 void set x(num value);
4240 4240
4241 num get y(); 4241 num get y();
4242 4242
4243 void set y(num value); 4243 void set y(num value);
(...skipping 2263 matching lines...) Expand 10 before | Expand all | Expand 10 after
6507 6507
6508 CompositionEvent(String type, Window view, String data, [bool canBubble, 6508 CompositionEvent(String type, Window view, String data, [bool canBubble,
6509 bool cancelable]); 6509 bool cancelable]);
6510 6510
6511 String get data(); 6511 String get data();
6512 } 6512 }
6513 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 6513 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
6514 // for details. All rights reserved. Use of this source code is governed by a 6514 // for details. All rights reserved. Use of this source code is governed by a
6515 // BSD-style license that can be found in the LICENSE file. 6515 // BSD-style license that can be found in the LICENSE file.
6516 6516
6517 // TODO - figure out whether classList exists, and if so use that
6518 // rather than the className property that is being used here.
6519
6520 class _CssClassSet implements Set<String> {
6521
6522 final _element;
6523
6524 _CssClassSet(this._element);
6525
6526 String toString() {
6527 return _formatSet(_read());
6528 }
6529
6530 // interface Iterable - BEGIN
6531 Iterator<String> iterator() {
6532 return _read().iterator();
6533 }
6534 // interface Iterable - END
6535
6536 // interface Collection - BEGIN
6537 void forEach(void f(String element)) {
6538 _read().forEach(f);
6539 }
6540
6541 Collection<String> filter(bool f(String element)) {
6542 return _read().filter(f);
6543 }
6544
6545 bool every(bool f(String element)) {
6546 return _read().every(f);
6547 }
6548
6549 bool some(bool f(String element)) {
6550 return _read().some(f);
6551 }
6552
6553 bool isEmpty() {
6554 return _read().isEmpty();
6555 }
6556
6557 int get length() {
6558 return _read().length;
6559 }
6560 // interface Collection - END
6561
6562 // interface Set - BEGIN
6563 bool contains(String value) {
6564 return _read().contains(value);
6565 }
6566
6567 void add(String value) {
6568 // TODO - figure out if we need to do any validation here
6569 // or if the browser natively does enough
6570 _modify((s) => s.add(value));
6571 }
6572
6573 bool remove(String value) {
6574 Set<String> s = _read();
6575 bool result = s.remove(value);
6576 _write(s);
6577 return result;
6578 }
6579
6580 void addAll(Collection<String> collection) {
6581 // TODO - see comment above about validation
6582 _modify((s) => s.addAll(collection));
6583 }
6584
6585 void removeAll(Collection<String> collection) {
6586 _modify((s) => s.removeAll(collection));
6587 }
6588
6589 bool isSubsetOf(Collection<String> collection) {
6590 return _read().isSubsetOf(collection);
6591 }
6592
6593 bool containsAll(Collection<String> collection) {
6594 return _read().containsAll(collection);
6595 }
6596
6597 Set<String> intersection(Collection<String> other) {
6598 return _read().intersection(other);
6599 }
6600
6601 void clear() {
6602 _modify((s) => s.clear());
6603 }
6604 // interface Set - END
6605
6606 /**
6607 * Helper method used to modify the set of css classes on this element.
6608 *
6609 * f - callback with:
6610 * s - a Set of all the css class name currently on this element.
6611 *
6612 * After f returns, the modified set is written to the
6613 * className property of this element.
6614 */
6615 void _modify( f(Set<String> s)) {
6616 Set<String> s = _read();
6617 f(s);
6618 _write(s);
6619 }
6620
6621 /**
6622 * Read the class names from the HTMLElement class property,
6623 * and put them into a set (duplicates are discarded).
6624 */
6625 Set<String> _read() {
6626 // TODO(mattsh) simplify this once split can take regex.
6627 Set<String> s = new Set<String>();
6628 for (String name in _element.className.split(' ')) {
6629 String trimmed = name.trim();
6630 if (!trimmed.isEmpty()) {
6631 s.add(trimmed);
6632 }
6633 }
6634 return s;
6635 }
6636
6637 /**
6638 * Join all the elements of a set into one string and write
6639 * back to the element.
6640 */
6641 void _write(Set s) {
6642 _element.className = _formatSet(s);
6643 }
6644
6645 String _formatSet(Set<String> s) {
6646 // TODO(mattsh) should be able to pass Set to String.joins http:/b/5398605
6647 List list = new List.from(s);
6648 return Strings.join(list, ' ');
6649 }
6650
6651 }
6652 6517
6653 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 6518 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
6654 // for details. All rights reserved. Use of this source code is governed by a 6519 // for details. All rights reserved. Use of this source code is governed by a
6655 // BSD-style license that can be found in the LICENSE file. 6520 // BSD-style license that can be found in the LICENSE file.
6656 6521
6657 // WARNING: Do not edit. 6522 // WARNING: Do not edit.
6658 // This file was generated by html/scripts/css_code_generator.py 6523 // This file was generated by html/scripts/css_code_generator.py
6659 6524
6660 // Source of CSS properties: 6525 // Source of CSS properties:
6661 // Source/WebCore/css/CSSPropertyNames.in 6526 // Source/WebCore/css/CSSPropertyNames.in
(...skipping 3862 matching lines...) Expand 10 before | Expand all | Expand 10 after
10524 EventListenerList get abort(); 10389 EventListenerList get abort();
10525 EventListenerList get error(); 10390 EventListenerList get error();
10526 EventListenerList get load(); 10391 EventListenerList get load();
10527 EventListenerList get loadStart(); 10392 EventListenerList get loadStart();
10528 EventListenerList get progress(); 10393 EventListenerList get progress();
10529 } 10394 }
10530 10395
10531 interface XMLHttpRequestUpload extends EventTarget { 10396 interface XMLHttpRequestUpload extends EventTarget {
10532 XMLHttpRequestUploadEvents get on(); 10397 XMLHttpRequestUploadEvents get on();
10533 } 10398 }
OLDNEW
« no previous file with comments | « no previous file | client/html/release/htmlimpl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698