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

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

Issue 2875773003: Roll 50: Updated for push to origin/master. (Closed)
Patch Set: Roll 50: Updated to latest Created 3 years, 7 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
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 // WARNING: Do not edit - generated code. 5 // WARNING: Do not edit - generated code.
6 6
7 part of $LIBRARYNAME; 7 part of $LIBRARYNAME;
8 8
9 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS { 9 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS {
10 $!MEMBERS 10 $!MEMBERS
(...skipping 27 matching lines...) Expand all
38 * Checks if the getCssCanvasContext API is supported on the current platform. 38 * Checks if the getCssCanvasContext API is supported on the current platform.
39 * 39 *
40 * See also: 40 * See also:
41 * 41 *
42 * * [getCssCanvasContext] 42 * * [getCssCanvasContext]
43 */ 43 */
44 $if DART2JS 44 $if DART2JS
45 static bool get supportsCssCanvasContext => 45 static bool get supportsCssCanvasContext =>
46 JS('bool', '!!(document.getCSSCanvasContext)'); 46 JS('bool', '!!(document.getCSSCanvasContext)');
47 $else 47 $else
48 static bool get supportsCssCanvasContext => true; 48 static bool get supportsCssCanvasContext => false;
49 $endif 49 $endif
50 50
51 51
52 /** 52 /**
53 * Gets a CanvasRenderingContext which can be used as the CSS background of an 53 * Gets a CanvasRenderingContext which can be used as the CSS background of an
54 * element. 54 * element.
55 * 55 *
56 * CSS: 56 * CSS:
57 * 57 *
58 * background: -webkit-canvas(backgroundCanvas) 58 * background: -webkit-canvas(backgroundCanvas)
59 * 59 *
60 * Generate the canvas: 60 * Generate the canvas:
61 * 61 *
62 * var context = document.getCssCanvasContext('2d', 'backgroundCanvas', 62 * var context = document.getCssCanvasContext('2d', 'backgroundCanvas',
63 * 100, 100); 63 * 100, 100);
64 * context.fillStyle = 'red'; 64 * context.fillStyle = 'red';
65 * context.fillRect(0, 0, 100, 100); 65 * context.fillRect(0, 0, 100, 100);
66 * 66 *
67 * See also: 67 * See also:
68 * 68 *
69 * * [supportsCssCanvasContext] 69 * * [supportsCssCanvasContext]
70 * * [CanvasElement.getContext] 70 * * [CanvasElement.getContext]
71 */ 71 */
72 @SupportedBrowser(SupportedBrowser.CHROME) 72 @SupportedBrowser(SupportedBrowser.CHROME)
73 @SupportedBrowser(SupportedBrowser.SAFARI) 73 @SupportedBrowser(SupportedBrowser.SAFARI)
74 @Experimental() 74 @Experimental()
75 @DomName('Document.getCSSCanvasContext') 75 @DomName('Document.getCSSCanvasContext')
76 CanvasRenderingContext getCssCanvasContext(String contextId, String name, 76 CanvasRenderingContext getCssCanvasContext(String contextId, String name,
77 int width, int height) { 77 int width, int height) {
78 return _getCssCanvasContext(contextId, name, width, height); 78 $if DART2JS
79 if (HtmlDocument.supportsCssCanvasContext)
80 return JS('CanvasRenderingContext', '#.getCSSCanvasContext(#, #, #, #)', this, contextId, name, width, height);
81 $endif
82 throw new UnsupportedError("Not supported");
79 } 83 }
80 84
81 @DomName('Document.head') 85 @DomName('Document.head')
82 HeadElement get head => _head; 86 HeadElement get head => _head;
83 87
84 @DomName('Document.lastModified') 88 @DomName('Document.lastModified')
85 String get lastModified => _lastModified; 89 String get lastModified => _lastModified;
86 90
87 @DomName('Document.preferredStylesheetSet') 91 @DomName('Document.preferredStylesheetSet')
88 String get preferredStylesheetSet => _preferredStylesheetSet; 92 String get preferredStylesheetSet => _preferredStylesheetSet;
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 /// parameter must be provided. 474 /// parameter must be provided.
471 @Experimental() 475 @Experimental()
472 ElementUpgrader createElementUpgrader(Type type, {String extendsTag}) { 476 ElementUpgrader createElementUpgrader(Type type, {String extendsTag}) {
473 $if DART2JS 477 $if DART2JS
474 return new _JSElementUpgrader(this, type, extendsTag); 478 return new _JSElementUpgrader(this, type, extendsTag);
475 $else 479 $else
476 return new _VMElementUpgrader(this, type, extendsTag); 480 return new _VMElementUpgrader(this, type, extendsTag);
477 $endif 481 $endif
478 } 482 }
479 } 483 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698