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

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

Issue 9145004: Revert "Example showing alternate async measurement solution" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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 | 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 11276 matching lines...) Expand 10 before | Expand all | Expand 10 after
11287 11287
11288 DeviceOrientationEvent(String type, double alpha, double beta, double gamma, 11288 DeviceOrientationEvent(String type, double alpha, double beta, double gamma,
11289 [bool canBubble, bool cancelable]); 11289 [bool canBubble, bool cancelable]);
11290 11290
11291 num get alpha(); 11291 num get alpha();
11292 11292
11293 num get beta(); 11293 num get beta();
11294 11294
11295 num get gamma(); 11295 num get gamma();
11296 } 11296 }
11297 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 11297 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
11298 // for details. All rights reserved. Use of this source code is governed by a 11298 // for details. All rights reserved. Use of this source code is governed by a
11299 // BSD-style license that can be found in the LICENSE file. 11299 // BSD-style license that can be found in the LICENSE file.
11300 11300
11301 interface DocumentEvents extends ElementEvents { 11301 interface DocumentEvents extends ElementEvents {
11302 EventListenerList get readyStateChange(); 11302 EventListenerList get readyStateChange();
11303 EventListenerList get selectionChange(); 11303 EventListenerList get selectionChange();
11304 EventListenerList get contentLoaded(); 11304 EventListenerList get contentLoaded();
11305 } 11305 }
11306 11306
11307 // TODO(jacobr): add DocumentFragment ctor 11307 // TODO(jacobr): add DocumentFragment ctor
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
11348 11348
11349 // TODO(jacobr): should this be removed? Users could write document.query("tit le").text instead. 11349 // TODO(jacobr): should this be removed? Users could write document.query("tit le").text instead.
11350 String get title(); 11350 String get title();
11351 11351
11352 void set title(String value); 11352 void set title(String value);
11353 11353
11354 bool get webkitHidden(); 11354 bool get webkitHidden();
11355 11355
11356 String get webkitVisibilityState(); 11356 String get webkitVisibilityState();
11357 11357
11358 /** Only call when [window.inMeasurementFrame] is true. */ 11358 Future<Range> caretRangeFromPoint([int x, int y]);
11359 Range caretRangeFromPoint([int x, int y]);
11360 11359
11361 /** Only call when [window.inMeasurementFrame] is true. */ 11360 Future<Element> elementFromPoint([int x, int y]);
11362 Element elementFromPoint([int x, int y]);
11363 11361
11364 bool execCommand([String command, bool userInterface, String value]); 11362 bool execCommand([String command, bool userInterface, String value]);
11365 11363
11366 // TODO(jacobr): remove once a new API is specified 11364 // TODO(jacobr): remove once a new API is specified
11367 CanvasRenderingContext getCSSCanvasContext(String contextId, String name, 11365 CanvasRenderingContext getCSSCanvasContext(String contextId, String name,
11368 int width, int height); 11366 int width, int height);
11369 11367
11370 bool queryCommandEnabled([String command]); 11368 bool queryCommandEnabled([String command]);
11371 11369
11372 bool queryCommandIndeterm([String command]); 11370 bool queryCommandIndeterm([String command]);
11373 11371
11374 bool queryCommandState([String command]); 11372 bool queryCommandState([String command]);
11375 11373
11376 bool queryCommandSupported([String command]); 11374 bool queryCommandSupported([String command]);
11377 11375
11378 String queryCommandValue([String command]); 11376 String queryCommandValue([String command]);
11379 11377
11380 String get manifest(); 11378 String get manifest();
11381 11379
11382 void set manifest(String value); 11380 void set manifest(String value);
11383 11381
11384 DocumentEvents get on(); 11382 DocumentEvents get on();
11383
11384 Future<ElementRect> get rect();
11385 } 11385 }
11386 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 11386 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
11387 // for details. All rights reserved. Use of this source code is governed by a 11387 // for details. All rights reserved. Use of this source code is governed by a
11388 // BSD-style license that can be found in the LICENSE file. 11388 // BSD-style license that can be found in the LICENSE file.
11389 11389
11390 interface DocumentFragment extends Element default DocumentFragmentWrappingImple mentation { 11390 interface DocumentFragment extends Element default DocumentFragmentWrappingImple mentation {
11391 11391
11392 DocumentFragment(); 11392 DocumentFragment();
11393 11393
11394 DocumentFragment.html(String html); 11394 DocumentFragment.html(String html);
(...skipping 30 matching lines...) Expand all
11425 static final int UPDATEREADY = 4; 11425 static final int UPDATEREADY = 4;
11426 11426
11427 int get status(); 11427 int get status();
11428 11428
11429 void swapCache(); 11429 void swapCache();
11430 11430
11431 void update(); 11431 void update();
11432 11432
11433 DOMApplicationCacheEvents get on(); 11433 DOMApplicationCacheEvents get on();
11434 } 11434 }
11435 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 11435 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
11436 // for details. All rights reserved. Use of this source code is governed by a 11436 // for details. All rights reserved. Use of this source code is governed by a
11437 // BSD-style license that can be found in the LICENSE file. 11437 // BSD-style license that can be found in the LICENSE file.
11438 11438
11439 interface ElementList extends List<Element> { 11439 interface ElementList extends List<Element> {
11440 // TODO(jacobr): add element batch manipulation methods. 11440 // TODO(jacobr): add element batch manipulation methods.
11441 Element get first(); 11441 Element get first();
11442 // TODO(jacobr): add insertAt 11442 // TODO(jacobr): add insertAt
11443 } 11443 }
11444 11444
11445 class DeferredElementRect {
11446 // TODO(jacobr)
11447 }
11448
11445 interface ElementEvents extends Events { 11449 interface ElementEvents extends Events {
11446 EventListenerList get abort(); 11450 EventListenerList get abort();
11447 EventListenerList get beforeCopy(); 11451 EventListenerList get beforeCopy();
11448 EventListenerList get beforeCut(); 11452 EventListenerList get beforeCut();
11449 EventListenerList get beforePaste(); 11453 EventListenerList get beforePaste();
11450 EventListenerList get blur(); 11454 EventListenerList get blur();
11451 EventListenerList get change(); 11455 EventListenerList get change();
11452 EventListenerList get click(); 11456 EventListenerList get click();
11453 EventListenerList get contextMenu(); 11457 EventListenerList get contextMenu();
11454 EventListenerList get copy(); 11458 EventListenerList get copy();
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
11608 Element get parent(); 11612 Element get parent();
11609 11613
11610 void scrollByLines([int lines]); 11614 void scrollByLines([int lines]);
11611 11615
11612 void scrollByPages([int pages]); 11616 void scrollByPages([int pages]);
11613 11617
11614 void scrollIntoView([bool centerIfNeeded]); 11618 void scrollIntoView([bool centerIfNeeded]);
11615 11619
11616 bool matchesSelector([String selectors]); 11620 bool matchesSelector([String selectors]);
11617 11621
11618 /** Only access members when [window.inMeasurementFrame] is true. */ 11622 Future<ElementRect> get rect();
11619 ElementRect get rect();
11620 11623
11621 /** Only call when [window.inMeasurementFrame] is true. */ 11624 Future<CSSStyleDeclaration> get computedStyle();
11622 CSSStyleDeclaration get computedStyle();
11623 11625
11624 /** Only call when [window.inMeasurementFrame] is true. */ 11626 Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement);
11625 CSSStyleDeclaration getComputedStyle(String pseudoElement);
11626 11627
11627 ElementEvents get on(); 11628 ElementEvents get on();
11628 11629
11629 Element clone(bool deep); 11630 Element clone(bool deep);
11630 } 11631 }
11631 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 11632 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
11632 // for details. All rights reserved. Use of this source code is governed by a 11633 // for details. All rights reserved. Use of this source code is governed by a
11633 // BSD-style license that can be found in the LICENSE file. 11634 // BSD-style license that can be found in the LICENSE file.
11634 11635
11635 interface ErrorEvent extends Event default ErrorEventWrappingImplementation { 11636 interface ErrorEvent extends Event default ErrorEventWrappingImplementation {
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
12478 int get attrChange(); 12479 int get attrChange();
12479 12480
12480 String get attrName(); 12481 String get attrName();
12481 12482
12482 String get newValue(); 12483 String get newValue();
12483 12484
12484 String get prevValue(); 12485 String get prevValue();
12485 12486
12486 Node get relatedNode(); 12487 Node get relatedNode();
12487 } 12488 }
12488 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 12489 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
12489 // for details. All rights reserved. Use of this source code is governed by a 12490 // for details. All rights reserved. Use of this source code is governed by a
12490 // BSD-style license that can be found in the LICENSE file. 12491 // BSD-style license that can be found in the LICENSE file.
12491 12492
12492 // TODO(jacobr): stop extending eventTarget. 12493 // TODO(jacobr): stop extending eventTarget.
12493 interface Node extends EventTarget { 12494 interface Node extends EventTarget {
12494 12495
12495 NodeList get nodes(); 12496 NodeList get nodes();
12496 12497
12497 // TODO: The type of value should be Collection<Node>. See http://b/5392897 12498 // TODO: The type of value should be Collection<Node>. See http://b/5392897
12498 void set nodes(value); 12499 void set nodes(value);
(...skipping 15 matching lines...) Expand all
12514 Node remove(); 12515 Node remove();
12515 12516
12516 bool contains(Node otherNode); 12517 bool contains(Node otherNode);
12517 12518
12518 // TODO(jacobr): remove when/if Array supports a method similar to 12519 // TODO(jacobr): remove when/if Array supports a method similar to
12519 // insertBefore or we switch NodeList to implement LinkedList rather than 12520 // insertBefore or we switch NodeList to implement LinkedList rather than
12520 // array. 12521 // array.
12521 Node insertBefore(Node newChild, Node refChild); 12522 Node insertBefore(Node newChild, Node refChild);
12522 12523
12523 Node clone(bool deep); 12524 Node clone(bool deep);
12524
12525 bool get _inDocument();
12526 } 12525 }
12527 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 12526 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
12528 // for details. All rights reserved. Use of this source code is governed by a 12527 // for details. All rights reserved. Use of this source code is governed by a
12529 // BSD-style license that can be found in the LICENSE file. 12528 // BSD-style license that can be found in the LICENSE file.
12530 12529
12531 interface NodeList extends List<Node> { 12530 interface NodeList extends List<Node> {
12532 Node get first(); 12531 Node get first();
12533 } 12532 }
12534 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 12533 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
12535 // for details. All rights reserved. Use of this source code is governed by a 12534 // for details. All rights reserved. Use of this source code is governed by a
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
13060 int get wheelDelta(); 13059 int get wheelDelta();
13061 13060
13062 int get wheelDeltaX(); 13061 int get wheelDeltaX();
13063 13062
13064 int get wheelDeltaY(); 13063 int get wheelDeltaY();
13065 13064
13066 int get x(); 13065 int get x();
13067 13066
13068 int get y(); 13067 int get y();
13069 } 13068 }
13070 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 13069 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
13071 // for details. All rights reserved. Use of this source code is governed by a 13070 // for details. All rights reserved. Use of this source code is governed by a
13072 // BSD-style license that can be found in the LICENSE file. 13071 // BSD-style license that can be found in the LICENSE file.
13073 13072
13074 typedef void LayoutCallback();
13075 typedef LayoutCallback MeasurementCallback();
13076
13077 interface WindowEvents extends Events { 13073 interface WindowEvents extends Events {
13078 EventListenerList get abort(); 13074 EventListenerList get abort();
13079 EventListenerList get beforeUnload(); 13075 EventListenerList get beforeUnload();
13080 EventListenerList get blur(); 13076 EventListenerList get blur();
13081 EventListenerList get canPlay(); 13077 EventListenerList get canPlay();
13082 EventListenerList get canPlayThrough(); 13078 EventListenerList get canPlayThrough();
13083 EventListenerList get change(); 13079 EventListenerList get change();
13084 EventListenerList get click(); 13080 EventListenerList get click();
13085 EventListenerList get contextMenu(); 13081 EventListenerList get contextMenu();
13086 EventListenerList get dblClick(); 13082 EventListenerList get dblClick();
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
13366 int setInterval(TimeoutHandler handler, int timeout); 13362 int setInterval(TimeoutHandler handler, int timeout);
13367 13363
13368 int setTimeout(TimeoutHandler handler, int timeout); 13364 int setTimeout(TimeoutHandler handler, int timeout);
13369 13365
13370 Object showModalDialog(String url, [Object dialogArgs, String featureArgs]); 13366 Object showModalDialog(String url, [Object dialogArgs, String featureArgs]);
13371 13367
13372 void stop(); 13368 void stop();
13373 13369
13374 void webkitCancelRequestAnimationFrame(int id); 13370 void webkitCancelRequestAnimationFrame(int id);
13375 13371
13372 // TODO(jacobr): make these return Future<Point>.
13376 Point webkitConvertPointFromNodeToPage([Node node, Point p]); 13373 Point webkitConvertPointFromNodeToPage([Node node, Point p]);
13374
13377 Point webkitConvertPointFromPageToNode([Node node, Point p]); 13375 Point webkitConvertPointFromPageToNode([Node node, Point p]);
13378 13376
13379 int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback, [Eleme nt element]); 13377 int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback, [Eleme nt element]);
13380 13378
13381 /** 13379 /**
13382 * Executes [callback] after the event loop unwinds but before the page is 13380 * Executes a [callback] after the next batch of browser layout measurements
13383 * rendered. Inside the callback, synchronous element measurement is 13381 * has completed or would have completed if any browser layout measurements
13384 * allowed and dom manipulation that could trigger a layout is disallowed. 13382 * had been scheduled.
13385 * The [callback] may return a closure that is run in the normal
13386 * context where dom manipulation is allowed but sync measurement is
13387 * disallowed.
13388 */ 13383 */
13389 void requestMeasurementFrame(MeasurementCallback callback); 13384 void requestLayoutFrame(TimeoutHandler callback);
13390
13391 /**
13392 * True iff within a call to [:requestMeasurementFrame:]
13393 * When inside a measurement frame, any DOM manipulation that could trigger
13394 * a layout is prohibited to avoid accidentally triggering large numbers of
13395 * layouts.
13396 */
13397 bool get inMeasurementFrame();
13398 13385
13399 // Window open(String url, String target, WindowSpec features); 13386 // Window open(String url, String target, WindowSpec features);
13400 13387
13401 WindowEvents get on(); 13388 WindowEvents get on();
13402 } 13389 }
13403 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 13390 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
13404 // for details. All rights reserved. Use of this source code is governed by a 13391 // for details. All rights reserved. Use of this source code is governed by a
13405 // BSD-style license that can be found in the LICENSE file. 13392 // BSD-style license that can be found in the LICENSE file.
13406 13393
13407 interface WorkerEvents extends AbstractWorkerEvents { 13394 interface WorkerEvents extends AbstractWorkerEvents {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
13503 EventListenerList get abort(); 13490 EventListenerList get abort();
13504 EventListenerList get error(); 13491 EventListenerList get error();
13505 EventListenerList get load(); 13492 EventListenerList get load();
13506 EventListenerList get loadStart(); 13493 EventListenerList get loadStart();
13507 EventListenerList get progress(); 13494 EventListenerList get progress();
13508 } 13495 }
13509 13496
13510 interface XMLHttpRequestUpload extends EventTarget { 13497 interface XMLHttpRequestUpload extends EventTarget {
13511 XMLHttpRequestUploadEvents get on(); 13498 XMLHttpRequestUploadEvents get on();
13512 } 13499 }
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