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

Side by Side Diff: pkg/custom_element/lib/custom_element.dart

Issue 23055008: Making almost all dom_ methods private. Exceptions will be addressed in a later CL. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 | « no previous file | sdk/lib/html/dart2js/html_dart2js.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 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Custom Elements let authors define their own elements. Authors associate code 6 * Custom Elements let authors define their own elements. Authors associate code
7 * with custom tag names, and then use those custom tag names as they would any 7 * with custom tag names, and then use those custom tag names as they would any
8 * standard tag. See <www.polymer-project.org/platform/custom-elements.html> 8 * standard tag. See <www.polymer-project.org/platform/custom-elements.html>
9 * for more information. 9 * for more information.
10 */ 10 */
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 void requestFullScreen(int flags) { requestFullscreen(); } 407 void requestFullScreen(int flags) { requestFullscreen(); }
408 408
409 void requestFullscreen() { host.requestFullscreen(); } 409 void requestFullscreen() { host.requestFullscreen(); }
410 410
411 void requestPointerLock() { host.requestPointerLock(); } 411 void requestPointerLock() { host.requestPointerLock(); }
412 412
413 Element query(String selectors) => host.query(selectors); 413 Element query(String selectors) => host.query(selectors);
414 414
415 ElementList queryAll(String selectors) => host.queryAll(selectors); 415 ElementList queryAll(String selectors) => host.queryAll(selectors);
416 416
417 HtmlCollection get $dom_children => host.$dom_children;
418
419 int get $dom_childElementCount => host.$dom_childElementCount;
420
421 String get className => host.className; 417 String get className => host.className;
422 set className(String value) { host.className = value; } 418 set className(String value) { host.className = value; }
423 419
424 @deprecated 420 @deprecated
425 int get clientHeight => client.height; 421 int get clientHeight => client.height;
426 422
427 @deprecated 423 @deprecated
428 int get clientLeft => client.left; 424 int get clientLeft => client.left;
429 425
430 @deprecated 426 @deprecated
431 int get clientTop => client.top; 427 int get clientTop => client.top;
432 428
433 @deprecated 429 @deprecated
434 int get clientWidth => client.width; 430 int get clientWidth => client.width;
435 431
436 Rect get client => host.client; 432 Rect get client => host.client;
437 433
438 Element get $dom_firstElementChild => host.$dom_firstElementChild;
439
440 Element get $dom_lastElementChild => host.$dom_lastElementChild;
441
442 @deprecated 434 @deprecated
443 int get offsetHeight => offset.height; 435 int get offsetHeight => offset.height;
444 436
445 @deprecated 437 @deprecated
446 int get offsetLeft => offset.left; 438 int get offsetLeft => offset.left;
447 439
448 @deprecated 440 @deprecated
449 int get offsetTop => offset.top; 441 int get offsetTop => offset.top;
450 442
451 @deprecated 443 @deprecated
(...skipping 17 matching lines...) Expand all
469 host.$dom_getAttribute(name); 461 host.$dom_getAttribute(name);
470 462
471 String $dom_getAttributeNS(String namespaceUri, String localName) => 463 String $dom_getAttributeNS(String namespaceUri, String localName) =>
472 host.$dom_getAttributeNS(namespaceUri, localName); 464 host.$dom_getAttributeNS(namespaceUri, localName);
473 465
474 String $dom_setAttributeNS( 466 String $dom_setAttributeNS(
475 String namespaceUri, String localName, String value) { 467 String namespaceUri, String localName, String value) {
476 host.$dom_setAttributeNS(namespaceUri, localName, value); 468 host.$dom_setAttributeNS(namespaceUri, localName, value);
477 } 469 }
478 470
479 bool $dom_hasAttributeNS(String namespaceUri, String localName) =>
480 host.$dom_hasAttributeNS(namespaceUri, localName);
481
482 void $dom_removeAttributeNS(String namespaceUri, String localName) =>
483 host.$dom_removeAttributeNS(namespaceUri, localName);
484
485 Rect getBoundingClientRect() => host.getBoundingClientRect(); 471 Rect getBoundingClientRect() => host.getBoundingClientRect();
486 472
487 List<Rect> getClientRects() => host.getClientRects(); 473 List<Rect> getClientRects() => host.getClientRects();
488 474
489 List<Node> getElementsByClassName(String name) => 475 List<Node> getElementsByClassName(String name) =>
490 host.getElementsByClassName(name); 476 host.getElementsByClassName(name);
491 477
492 List<Node> $dom_getElementsByTagName(String name) =>
493 host.$dom_getElementsByTagName(name);
494
495 bool $dom_hasAttribute(String name) =>
496 host.$dom_hasAttribute(name);
497
498 List<Node> $dom_querySelectorAll(String selectors) => 478 List<Node> $dom_querySelectorAll(String selectors) =>
499 host.$dom_querySelectorAll(selectors); 479 host.$dom_querySelectorAll(selectors);
500 480
501 void $dom_removeAttribute(String name) =>
502 host.$dom_removeAttribute(name);
503
504 void $dom_setAttribute(String name, String value) => 481 void $dom_setAttribute(String name, String value) =>
505 host.$dom_setAttribute(name, value); 482 host.$dom_setAttribute(name, value);
506 483
507 get $dom_attributes => host.$dom_attributes;
508
509 List<Node> get $dom_childNodes => host.$dom_childNodes; 484 List<Node> get $dom_childNodes => host.$dom_childNodes;
510 485
511 Node get firstChild => host.firstChild; 486 Node get firstChild => host.firstChild;
512 487
513 Node get lastChild => host.lastChild; 488 Node get lastChild => host.lastChild;
514 489
515 String get localName => host.localName; 490 String get localName => host.localName;
516 String get $dom_localName => host.$dom_localName;
517 491
518 String get namespaceUri => host.namespaceUri; 492 String get namespaceUri => host.namespaceUri;
519 String get $dom_namespaceUri => host.$dom_namespaceUri;
520 493
521 int get nodeType => host.nodeType; 494 int get nodeType => host.nodeType;
522 495
523 void $dom_addEventListener(String type, EventListener listener, 496 void $dom_addEventListener(String type, EventListener listener,
524 [bool useCapture]) { 497 [bool useCapture]) {
525 host.$dom_addEventListener(type, listener, useCapture); 498 host.$dom_addEventListener(type, listener, useCapture);
526 } 499 }
527 500
528 bool dispatchEvent(Event event) => host.dispatchEvent(event); 501 bool dispatchEvent(Event event) => host.dispatchEvent(event);
529 502
530 Node $dom_removeChild(Node oldChild) => host.$dom_removeChild(oldChild);
531
532 void $dom_removeEventListener(String type, EventListener listener, 503 void $dom_removeEventListener(String type, EventListener listener,
533 [bool useCapture]) { 504 [bool useCapture]) {
534 host.$dom_removeEventListener(type, listener, useCapture); 505 host.$dom_removeEventListener(type, listener, useCapture);
535 } 506 }
536 507
537 Node $dom_replaceChild(Node newChild, Node oldChild) =>
538 host.$dom_replaceChild(newChild, oldChild);
539
540 get xtag => host.xtag; 508 get xtag => host.xtag;
541 509
542 set xtag(value) { host.xtag = value; } 510 set xtag(value) { host.xtag = value; }
543 511
544 Node append(Node e) => host.append(e); 512 Node append(Node e) => host.append(e);
545 513
546 void appendText(String text) => host.appendText(text); 514 void appendText(String text) => host.appendText(text);
547 515
548 void appendHtml(String html) => host.appendHtml(html); 516 void appendHtml(String html) => host.appendHtml(html);
549 517
550 void $dom_scrollIntoView([bool alignWithTop]) {
551 if (alignWithTop == null) {
552 host.$dom_scrollIntoView();
553 } else {
554 host.$dom_scrollIntoView(alignWithTop);
555 }
556 }
557
558 void $dom_scrollIntoViewIfNeeded([bool centerIfNeeded]) {
559 if (centerIfNeeded == null) {
560 host.$dom_scrollIntoViewIfNeeded();
561 } else {
562 host.$dom_scrollIntoViewIfNeeded(centerIfNeeded);
563 }
564 }
565
566 String get regionOverset => host.regionOverset; 518 String get regionOverset => host.regionOverset;
567 519
568 List<Range> getRegionFlowRanges() => host.getRegionFlowRanges(); 520 List<Range> getRegionFlowRanges() => host.getRegionFlowRanges();
569 521
570 // TODO(jmesserly): rename "created" to "onCreated". 522 // TODO(jmesserly): rename "created" to "onCreated".
571 void onCreated() => created(); 523 void onCreated() => created();
572 524
573 Stream<Event> get onAbort => host.onAbort; 525 Stream<Event> get onAbort => host.onAbort;
574 Stream<Event> get onBeforeCopy => host.onBeforeCopy; 526 Stream<Event> get onBeforeCopy => host.onBeforeCopy;
575 Stream<Event> get onBeforeCut => host.onBeforeCut; 527 Stream<Event> get onBeforeCut => host.onBeforeCut;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 for (var removed in record.removedNodes) { 614 for (var removed in record.removedNodes) {
663 if (identical(node, removed)) { 615 if (identical(node, removed)) {
664 observer.disconnect(); 616 observer.disconnect();
665 element.removed(); 617 element.removed();
666 return; 618 return;
667 } 619 }
668 } 620 }
669 } 621 }
670 }).observe(element.parentNode, childList: true); 622 }).observe(element.parentNode, childList: true);
671 } 623 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698