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

Side by Side Diff: tools/dom/templates/html/impl/impl_Element.darttemplate

Issue 12747009: Undeprecating some Element position APIs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « tools/dom/scripts/htmlrenamer.py ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 // TODO(jacobr): use _Lists.dart to remove some of the duplicated 7 // TODO(jacobr): use _Lists.dart to remove some of the duplicated
8 // functionality. 8 // functionality.
9 class _ChildrenElementList implements List { 9 class _ChildrenElementList implements List {
10 // Raw Element. 10 // Raw Element.
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 * * [Pseudo-elements](http://docs.webplatform.org/wiki/css/selectors/pseudo-e lements) 724 * * [Pseudo-elements](http://docs.webplatform.org/wiki/css/selectors/pseudo-e lements)
725 */ 725 */
726 CssStyleDeclaration getComputedStyle([String pseudoElement]) { 726 CssStyleDeclaration getComputedStyle([String pseudoElement]) {
727 if (pseudoElement == null) { 727 if (pseudoElement == null) {
728 pseudoElement = ''; 728 pseudoElement = '';
729 } 729 }
730 // TODO(jacobr): last param should be null, see b/5045788 730 // TODO(jacobr): last param should be null, see b/5045788
731 return window.$dom_getComputedStyle(this, pseudoElement); 731 return window.$dom_getComputedStyle(this, pseudoElement);
732 } 732 }
733 733
734 @deprecated 734 /**
735 int get clientHeight => client.height; 735 * Gets the position of this element relative to the client area of the page.
736 @deprecated 736 */
737 int get clientLeft => client.left; 737 Rect get client => new Rect(clientLeft, clientTop, clientWidth, clientHeight);
738 @deprecated
739 int get clientTop => client.top;
740 @deprecated
741 int get clientWidth => client.width;
742 738
743 @DomName('Element.clientHeight') 739 /**
744 @DomName('Element.clientLeft') 740 * Gets the offset of this element relative to its offsetParent.
745 @DomName('Element.clientTop') 741 */
746 @DomName('Element.clientWidth') 742 Rect get offset => new Rect(offsetLeft, offsetTop, offsetWidth, offsetHeight);
747 Rect get client => new Rect($dom_clientLeft, $dom_clientTop, $dom_clientWidth,
748 $dom_clientHeight);
749
750 @deprecated
751 int get offsetHeight => offset.height;
752 @deprecated
753 int get offsetLeft => offset.left;
754 @deprecated
755 int get offsetTop => offset.top;
756 @deprecated
757 int get offsetWidth => offset.width;
758
759 @DomName('Element.offsetHeight')
760 @DomName('Element.offsetLeft')
761 @DomName('Element.offsetTop')
762 @DomName('Element.offsetWidth')
763 Rect get offset => new Rect($dom_offsetLeft, $dom_offsetTop, $dom_offsetWidth,
764 $dom_offsetHeight);
765 743
766 /** 744 /**
767 * Adds the specified text as a text node after the last child of this 745 * Adds the specified text as a text node after the last child of this
768 * element. 746 * element.
769 */ 747 */
770 void appendText(String text) { 748 void appendText(String text) {
771 this.insertAdjacentText('beforeend', text); 749 this.insertAdjacentText('beforeend', text);
772 } 750 }
773 751
774 /** 752 /**
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 const ScrollAlignment._internal(this._value); 1127 const ScrollAlignment._internal(this._value);
1150 toString() => 'ScrollAlignment.$_value'; 1128 toString() => 'ScrollAlignment.$_value';
1151 1129
1152 /// Attempt to align the element to the top of the scrollable area. 1130 /// Attempt to align the element to the top of the scrollable area.
1153 static const TOP = const ScrollAlignment._internal('TOP'); 1131 static const TOP = const ScrollAlignment._internal('TOP');
1154 /// Attempt to center the element in the scrollable area. 1132 /// Attempt to center the element in the scrollable area.
1155 static const CENTER = const ScrollAlignment._internal('CENTER'); 1133 static const CENTER = const ScrollAlignment._internal('CENTER');
1156 /// Attempt to align the element to the bottom of the scrollable area. 1134 /// Attempt to align the element to the bottom of the scrollable area.
1157 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); 1135 static const BOTTOM = const ScrollAlignment._internal('BOTTOM');
1158 } 1136 }
OLDNEW
« no previous file with comments | « tools/dom/scripts/htmlrenamer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698