Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 implements NodeListWrapper { | 8 implements NodeListWrapper { |
| 9 // Raw Element. | 9 // Raw Element. |
| 10 final Element _element; | 10 final Element _element; |
| (...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1321 | 1321 |
| 1322 /** | 1322 /** |
| 1323 * This is an ease-of-use accessor for event streams which should only be | 1323 * This is an ease-of-use accessor for event streams which should only be |
| 1324 * used when an explicit accessor is not available. | 1324 * used when an explicit accessor is not available. |
| 1325 */ | 1325 */ |
| 1326 ElementEvents get on => new ElementEvents(this); | 1326 ElementEvents get on => new ElementEvents(this); |
| 1327 | 1327 |
| 1328 $if DART2JS | 1328 $if DART2JS |
| 1329 @DomName('Element.offsetHeight') | 1329 @DomName('Element.offsetHeight') |
| 1330 @DocsEditable() | 1330 @DocsEditable() |
| 1331 num get offsetHeight => JS('num', '#.offsetHeight', this).round(); | 1331 int get offsetHeight => JS('int', '#.offsetHeight', this).round(); |
|
vsm
2014/06/03 10:50:45
The JS type probably should be num. I.e., JS('num
Leaf
2014/06/03 11:01:42
Done.
| |
| 1332 | 1332 |
| 1333 @DomName('Element.offsetLeft') | 1333 @DomName('Element.offsetLeft') |
| 1334 @DocsEditable() | 1334 @DocsEditable() |
| 1335 num get offsetLeft => JS('num', '#.offsetLeft', this).round(); | 1335 int get offsetLeft => JS('int', '#.offsetLeft', this).round(); |
| 1336 | 1336 |
| 1337 @DomName('Element.offsetTop') | 1337 @DomName('Element.offsetTop') |
| 1338 @DocsEditable() | 1338 @DocsEditable() |
| 1339 num get offsetTop => JS('num', '#.offsetTop', this).round(); | 1339 int get offsetTop => JS('int', '#.offsetTop', this).round(); |
| 1340 | 1340 |
| 1341 @DomName('Element.offsetWidth') | 1341 @DomName('Element.offsetWidth') |
| 1342 @DocsEditable() | 1342 @DocsEditable() |
| 1343 num get offsetWidth => JS('num', '#.offsetWidth', this).round(); | 1343 int get offsetWidth => JS('int', '#.offsetWidth', this).round(); |
| 1344 | 1344 |
| 1345 @DomName('Element.clientHeight') | 1345 @DomName('Element.clientHeight') |
| 1346 @DocsEditable() | 1346 @DocsEditable() |
| 1347 num get clientHeight => JS('num', '#.clientHeight', this).round(); | 1347 int get clientHeight => JS('int', '#.clientHeight', this).round(); |
| 1348 | 1348 |
| 1349 @DomName('Element.clientLeft') | 1349 @DomName('Element.clientLeft') |
| 1350 @DocsEditable() | 1350 @DocsEditable() |
| 1351 num get clientLeft => JS('num', '#.clientLeft', this).round(); | 1351 int get clientLeft => JS('int', '#.clientLeft', this).round(); |
| 1352 | 1352 |
| 1353 @DomName('Element.clientTop') | 1353 @DomName('Element.clientTop') |
| 1354 @DocsEditable() | 1354 @DocsEditable() |
| 1355 num get clientTop => JS('num', '#.clientTop', this).round(); | 1355 int get clientTop => JS('int', '#.clientTop', this).round(); |
| 1356 | 1356 |
| 1357 @DomName('Element.clientWidth') | 1357 @DomName('Element.clientWidth') |
| 1358 @DocsEditable() | 1358 @DocsEditable() |
| 1359 num get clientWidth => JS('num', '#.clientWidth', this).round(); | 1359 int get clientWidth => JS('int', '#.clientWidth', this).round(); |
| 1360 | 1360 |
| 1361 @DomName('Element.scrollHeight') | 1361 @DomName('Element.scrollHeight') |
| 1362 @DocsEditable() | 1362 @DocsEditable() |
| 1363 num get scrollHeight => JS('num', '#.scrollHeight', this).round(); | 1363 int get scrollHeight => JS('int', '#.scrollHeight', this).round(); |
| 1364 | 1364 |
| 1365 @DomName('Element.scrollLeft') | 1365 @DomName('Element.scrollLeft') |
| 1366 @DocsEditable() | 1366 @DocsEditable() |
| 1367 num get scrollLeft => JS('num', '#.scrollLeft', this).round(); | 1367 int get scrollLeft => JS('int', '#.scrollLeft', this).round(); |
| 1368 | 1368 |
| 1369 @DomName('Element.scrollLeft') | 1369 @DomName('Element.scrollLeft') |
| 1370 @DocsEditable() | 1370 @DocsEditable() |
| 1371 void set scrollLeft(num value) => JS("void", "#.scrollLeft = #", this, value.r ound()); | 1371 void set scrollLeft(int value) => JS("void", "#.scrollLeft = #", this, value.r ound()); |
| 1372 | 1372 |
| 1373 @DomName('Element.scrollTop') | 1373 @DomName('Element.scrollTop') |
| 1374 @DocsEditable() | 1374 @DocsEditable() |
| 1375 num get scrollTop => JS('num', '#.scrollTop', this).round(); | 1375 int get scrollTop => JS('int', '#.scrollTop', this).round(); |
| 1376 | 1376 |
| 1377 @DomName('Element.scrollTop') | 1377 @DomName('Element.scrollTop') |
| 1378 @DocsEditable() | 1378 @DocsEditable() |
| 1379 void set scrollTop(num value) => JS("void", "#.scrollTop = #", this, value.rou nd()); | 1379 void set scrollTop(int value) => JS("void", "#.scrollTop = #", this, value.rou nd()); |
| 1380 | 1380 |
| 1381 @DomName('Element.scrollWidth') | 1381 @DomName('Element.scrollWidth') |
| 1382 @DocsEditable() | 1382 @DocsEditable() |
| 1383 num get scrollWidth => JS('num', '#.scrollWidth', this).round(); | 1383 int get scrollWidth => JS('int', '#.scrollWidth', this).round(); |
| 1384 | 1384 |
| 1385 $else | 1385 $else |
| 1386 @DomName('Element.offsetHeight') | 1386 @DomName('Element.offsetHeight') |
| 1387 @DocsEditable() | 1387 @DocsEditable() |
| 1388 num get offsetHeight => _blink.Native_Element_offsetHeight_Getter(this).round( ); | 1388 int get offsetHeight => _blink.Native_Element_offsetHeight_Getter(this).round( ); |
| 1389 | 1389 |
| 1390 @DomName('Element.offsetLeft') | 1390 @DomName('Element.offsetLeft') |
| 1391 @DocsEditable() | 1391 @DocsEditable() |
| 1392 num get offsetLeft => _blink.Native_Element_offsetLeft_Getter(this).round(); | 1392 int get offsetLeft => _blink.Native_Element_offsetLeft_Getter(this).round(); |
| 1393 | 1393 |
| 1394 @DomName('Element.offsetTop') | 1394 @DomName('Element.offsetTop') |
| 1395 @DocsEditable() | 1395 @DocsEditable() |
| 1396 num get offsetTop => _blink.Native_Element_offsetTop_Getter(this).round(); | 1396 int get offsetTop => _blink.Native_Element_offsetTop_Getter(this).round(); |
| 1397 | 1397 |
| 1398 @DomName('Element.offsetWidth') | 1398 @DomName('Element.offsetWidth') |
| 1399 @DocsEditable() | 1399 @DocsEditable() |
| 1400 num get offsetWidth => _blink.Native_Element_offsetWidth_Getter(this).round(); | 1400 int get offsetWidth => _blink.Native_Element_offsetWidth_Getter(this).round(); |
| 1401 | 1401 |
| 1402 @DomName('Element.clientHeight') | 1402 @DomName('Element.clientHeight') |
| 1403 @DocsEditable() | 1403 @DocsEditable() |
| 1404 num get clientHeight => _blink.Native_Element_clientHeight_Getter(this).round( ); | 1404 int get clientHeight => _blink.Native_Element_clientHeight_Getter(this).round( ); |
| 1405 | 1405 |
| 1406 @DomName('Element.clientLeft') | 1406 @DomName('Element.clientLeft') |
| 1407 @DocsEditable() | 1407 @DocsEditable() |
| 1408 num get clientLeft => _blink.Native_Element_clientLeft_Getter(this).round(); | 1408 int get clientLeft => _blink.Native_Element_clientLeft_Getter(this).round(); |
| 1409 | 1409 |
| 1410 @DomName('Element.clientTop') | 1410 @DomName('Element.clientTop') |
| 1411 @DocsEditable() | 1411 @DocsEditable() |
| 1412 num get clientTop => _blink.Native_Element_clientTop_Getter(this).round(); | 1412 int get clientTop => _blink.Native_Element_clientTop_Getter(this).round(); |
| 1413 | 1413 |
| 1414 @DomName('Element.clientWidth') | 1414 @DomName('Element.clientWidth') |
| 1415 @DocsEditable() | 1415 @DocsEditable() |
| 1416 num get clientWidth => _blink.Native_Element_clientWidth_Getter(this).round(); | 1416 int get clientWidth => _blink.Native_Element_clientWidth_Getter(this).round(); |
| 1417 | 1417 |
| 1418 @DomName('Element.scrollHeight') | 1418 @DomName('Element.scrollHeight') |
| 1419 @DocsEditable() | 1419 @DocsEditable() |
| 1420 num get scrollHeight => _blink.Native_Element_scrollHeight_Getter(this).round( ); | 1420 int get scrollHeight => _blink.Native_Element_scrollHeight_Getter(this).round( ); |
| 1421 | 1421 |
| 1422 @DomName('Element.scrollLeft') | 1422 @DomName('Element.scrollLeft') |
| 1423 @DocsEditable() | 1423 @DocsEditable() |
| 1424 num get scrollLeft => _blink.Native_Element_scrollLeft_Getter(this).round(); | 1424 int get scrollLeft => _blink.Native_Element_scrollLeft_Getter(this).round(); |
| 1425 | 1425 |
| 1426 @DomName('Element.scrollLeft') | 1426 @DomName('Element.scrollLeft') |
| 1427 @DocsEditable() | 1427 @DocsEditable() |
| 1428 void set scrollLeft(num value) => _blink.Native_Element_scrollLeft_Setter(this , value.round()); | 1428 void set scrollLeft(int value) => _blink.Native_Element_scrollLeft_Setter(this , value.round()); |
| 1429 | 1429 |
| 1430 @DomName('Element.scrollTop') | 1430 @DomName('Element.scrollTop') |
| 1431 @DocsEditable() | 1431 @DocsEditable() |
| 1432 num get scrollTop => _blink.Native_Element_scrollTop_Getter(this).round(); | 1432 int get scrollTop => _blink.Native_Element_scrollTop_Getter(this).round(); |
| 1433 | 1433 |
| 1434 @DomName('Element.scrollTop') | 1434 @DomName('Element.scrollTop') |
| 1435 @DocsEditable() | 1435 @DocsEditable() |
| 1436 void set scrollTop(num value) => _blink.Native_Element_scrollTop_Setter(this, value.round()); | 1436 void set scrollTop(int value) => _blink.Native_Element_scrollTop_Setter(this, value.round()); |
| 1437 | 1437 |
| 1438 @DomName('Element.scrollWidth') | 1438 @DomName('Element.scrollWidth') |
| 1439 @DocsEditable() | 1439 @DocsEditable() |
| 1440 num get scrollWidth => _blink.Native_Element_scrollWidth_Getter(this).round(); | 1440 int get scrollWidth => _blink.Native_Element_scrollWidth_Getter(this).round(); |
| 1441 $endif | 1441 $endif |
| 1442 | 1442 |
| 1443 $!MEMBERS | 1443 $!MEMBERS |
| 1444 } | 1444 } |
| 1445 | 1445 |
| 1446 | 1446 |
| 1447 class _ElementFactoryProvider { | 1447 class _ElementFactoryProvider { |
| 1448 | 1448 |
| 1449 @DomName('Document.createElement') | 1449 @DomName('Document.createElement') |
| 1450 $if DART2JS | 1450 $if DART2JS |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 1478 const ScrollAlignment._internal(this._value); | 1478 const ScrollAlignment._internal(this._value); |
| 1479 toString() => 'ScrollAlignment.$_value'; | 1479 toString() => 'ScrollAlignment.$_value'; |
| 1480 | 1480 |
| 1481 /// Attempt to align the element to the top of the scrollable area. | 1481 /// Attempt to align the element to the top of the scrollable area. |
| 1482 static const TOP = const ScrollAlignment._internal('TOP'); | 1482 static const TOP = const ScrollAlignment._internal('TOP'); |
| 1483 /// Attempt to center the element in the scrollable area. | 1483 /// Attempt to center the element in the scrollable area. |
| 1484 static const CENTER = const ScrollAlignment._internal('CENTER'); | 1484 static const CENTER = const ScrollAlignment._internal('CENTER'); |
| 1485 /// Attempt to align the element to the bottom of the scrollable area. | 1485 /// Attempt to align the element to the bottom of the scrollable area. |
| 1486 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 1486 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
| 1487 } | 1487 } |
| OLD | NEW |