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

Side by Side Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 11697011: Fixing up history test to pass properly on supported platforms. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixing dartium. Created 7 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 | sdk/lib/html/dartium/html_dartium.dart » ('j') | tests/html/html.status » ('J')
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:collection'; 3 import 'dart:collection';
4 import 'dart:html_common'; 4 import 'dart:html_common';
5 import 'dart:indexed_db'; 5 import 'dart:indexed_db';
6 import 'dart:isolate'; 6 import 'dart:isolate';
7 import 'dart:json'; 7 import 'dart:json';
8 import 'dart:svg' as svg; 8 import 'dart:svg' as svg;
9 import 'dart:web_audio' as web_audio; 9 import 'dart:web_audio' as web_audio;
10 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 10 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
(...skipping 9760 matching lines...) Expand 10 before | Expand all | Expand 10 after
9771 String align; 9771 String align;
9772 } 9772 }
9773 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 9773 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
9774 // for details. All rights reserved. Use of this source code is governed by a 9774 // for details. All rights reserved. Use of this source code is governed by a
9775 // BSD-style license that can be found in the LICENSE file. 9775 // BSD-style license that can be found in the LICENSE file.
9776 9776
9777 9777
9778 /// @domName History; @docsEditable true 9778 /// @domName History; @docsEditable true
9779 class History implements HistoryBase native "*History" { 9779 class History implements HistoryBase native "*History" {
9780 9780
9781 /**
9782 * Checks if the State APIs are supported on the current platform.
9783 *
9784 * See also:
9785 *
9786 * * [pushState]
9787 * * [replaceState]
9788 * * [state]
9789 */
9790 static bool get supportsState => JS('bool', '!!window.history.pushState');
9791
9781 /// @domName History.length; @docsEditable true 9792 /// @domName History.length; @docsEditable true
9782 final int length; 9793 final int length;
9783 9794
9784 /// @domName History.state; @docsEditable true 9795 /// @domName History.state; @docsEditable true
9785 dynamic get state => _convertNativeToDart_SerializedScriptValue(this._state); 9796 dynamic get state => _convertNativeToDart_SerializedScriptValue(this._state);
9786 @JSName('state') 9797 @JSName('state')
9787 @annotation_Creates_SerializedScriptValue @annotation_Returns_SerializedScript Value 9798 @annotation_Creates_SerializedScriptValue @annotation_Returns_SerializedScript Value
9788 final dynamic _state; 9799 final dynamic _state;
9789 9800
9790 /// @domName History.back; @docsEditable true 9801 /// @domName History.back; @docsEditable true
9791 void back() native; 9802 void back() native;
9792 9803
9793 /// @domName History.forward; @docsEditable true 9804 /// @domName History.forward; @docsEditable true
9794 void forward() native; 9805 void forward() native;
9795 9806
9796 /// @domName History.go; @docsEditable true 9807 /// @domName History.go; @docsEditable true
9797 void go(int distance) native; 9808 void go(int distance) native;
9798 9809
9799 /// @domName History.pushState; @docsEditable true 9810 /// @domName History.pushState; @docsEditable true
9811 @SupportedBrowser(SupportedBrowser.CHROME) @SupportedBrowser(SupportedBrowser. FIREFOX) @SupportedBrowser(SupportedBrowser.IE, '10') @SupportedBrowser(Supporte dBrowser.SAFARI)
Emily Fortuna 2012/12/28 22:58:54 Can these be on separate lines?
blois 2012/12/28 23:03:45 Requires a refactor of the dart2js annotations- cu
9800 void pushState(Object data, String title, [String url]) native; 9812 void pushState(Object data, String title, [String url]) native;
9801 9813
9802 /// @domName History.replaceState; @docsEditable true 9814 /// @domName History.replaceState; @docsEditable true
9815 @SupportedBrowser(SupportedBrowser.CHROME) @SupportedBrowser(SupportedBrowser. FIREFOX) @SupportedBrowser(SupportedBrowser.IE, '10') @SupportedBrowser(Supporte dBrowser.SAFARI)
9803 void replaceState(Object data, String title, [String url]) native; 9816 void replaceState(Object data, String title, [String url]) native;
9804 } 9817 }
9805 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 9818 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
9806 // for details. All rights reserved. Use of this source code is governed by a 9819 // for details. All rights reserved. Use of this source code is governed by a
9807 // BSD-style license that can be found in the LICENSE file. 9820 // BSD-style license that can be found in the LICENSE file.
9808 9821
9809 9822
9810 /// @domName HTMLAllCollection; @docsEditable true 9823 /// @domName HTMLAllCollection; @docsEditable true
9811 class HtmlAllCollection implements JavaScriptIndexingBehavior, List<Node> native "*HTMLAllCollection" { 9824 class HtmlAllCollection implements JavaScriptIndexingBehavior, List<Node> native "*HTMLAllCollection" {
9812 9825
(...skipping 15663 matching lines...) Expand 10 before | Expand all | Expand 10 after
25476 T next() { 25489 T next() {
25477 if (!hasNext) { 25490 if (!hasNext) {
25478 throw new StateError("No more elements"); 25491 throw new StateError("No more elements");
25479 } 25492 }
25480 return _array[_pos++]; 25493 return _array[_pos++];
25481 } 25494 }
25482 25495
25483 final List<T> _array; 25496 final List<T> _array;
25484 int _pos; 25497 int _pos;
25485 } 25498 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | tests/html/html.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698