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

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

Issue 33433005: Mark jQuery methods as experimental. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 | « sdk/lib/html/dartium/html_dartium.dart ('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 class _ChildrenElementList extends ListBase<Element> { 7 class _ChildrenElementList extends ListBase<Element> {
8 // Raw Element. 8 // Raw Element.
9 final Element _element; 9 final Element _element;
10 final HtmlCollection _childElements; 10 final HtmlCollection _childElements;
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 @Experimental() 1211 @Experimental()
1212 CssRect get marginEdge => new _MarginCssRect(this); 1212 CssRect get marginEdge => new _MarginCssRect(this);
1213 1213
1214 /** 1214 /**
1215 * Provides the coordinates of the element relative to the top of the 1215 * Provides the coordinates of the element relative to the top of the
1216 * document. 1216 * document.
1217 * 1217 *
1218 * This method is the Dart equivalent to jQuery's 1218 * This method is the Dart equivalent to jQuery's
1219 * [offset](http://api.jquery.com/offset/) method. 1219 * [offset](http://api.jquery.com/offset/) method.
1220 */ 1220 */
1221 @Experimental()
1221 Point get documentOffset => offsetTo(document.documentElement); 1222 Point get documentOffset => offsetTo(document.documentElement);
1222 1223
1223 /** 1224 /**
1224 * Provides the offset of this element's [borderEdge] relative to the 1225 * Provides the offset of this element's [borderEdge] relative to the
1225 * specified [parent]. 1226 * specified [parent].
1226 * 1227 *
1227 * This is the Dart equivalent of jQuery's 1228 * This is the Dart equivalent of jQuery's
1228 * [position](http://api.jquery.com/position/) method. Unlike jQuery's 1229 * [position](http://api.jquery.com/position/) method. Unlike jQuery's
1229 * position, however, [parent] can be any parent element of `this`, 1230 * position, however, [parent] can be any parent element of `this`,
1230 * rather than only `this`'s immediate [offsetParent]. If the specified 1231 * rather than only `this`'s immediate [offsetParent]. If the specified
1231 * element is _not_ an offset parent or transitive offset parent to this 1232 * element is _not_ an offset parent or transitive offset parent to this
1232 * element, an [ArgumentError] is thrown. 1233 * element, an [ArgumentError] is thrown.
1233 */ 1234 */
1235 @Experimental()
1234 Point offsetTo(Element parent) { 1236 Point offsetTo(Element parent) {
1235 return Element._offsetToHelper(this, parent); 1237 return Element._offsetToHelper(this, parent);
1236 } 1238 }
1237 1239
1238 static Point _offsetToHelper(Element current, Element parent) { 1240 static Point _offsetToHelper(Element current, Element parent) {
1239 // We're hopping from _offsetParent_ to offsetParent (not just parent), so 1241 // We're hopping from _offsetParent_ to offsetParent (not just parent), so
1240 // offsetParent, "tops out" at BODY. But people could conceivably pass in 1242 // offsetParent, "tops out" at BODY. But people could conceivably pass in
1241 // the document.documentElement and I want it to return an absolute offset, 1243 // the document.documentElement and I want it to return an absolute offset,
1242 // so we have the special case checking for HTML. 1244 // so we have the special case checking for HTML.
1243 bool foundAsParent = identical(current, parent) || parent.tagName == 'HTML'; 1245 bool foundAsParent = identical(current, parent) || parent.tagName == 'HTML';
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1427 const ScrollAlignment._internal(this._value); 1429 const ScrollAlignment._internal(this._value);
1428 toString() => 'ScrollAlignment.$_value'; 1430 toString() => 'ScrollAlignment.$_value';
1429 1431
1430 /// Attempt to align the element to the top of the scrollable area. 1432 /// Attempt to align the element to the top of the scrollable area.
1431 static const TOP = const ScrollAlignment._internal('TOP'); 1433 static const TOP = const ScrollAlignment._internal('TOP');
1432 /// Attempt to center the element in the scrollable area. 1434 /// Attempt to center the element in the scrollable area.
1433 static const CENTER = const ScrollAlignment._internal('CENTER'); 1435 static const CENTER = const ScrollAlignment._internal('CENTER');
1434 /// Attempt to align the element to the bottom of the scrollable area. 1436 /// Attempt to align the element to the bottom of the scrollable area.
1435 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); 1437 static const BOTTOM = const ScrollAlignment._internal('BOTTOM');
1436 } 1438 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698