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

Unified Diff: tool/input_sdk/lib/html/html_common/conversions.dart

Issue 1887233005: Fix all dart:html strong mode errors except for spurious FINAL_NOT_INITIALIZED_CONSTRUCTOR warnings. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: rebased Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: tool/input_sdk/lib/html/html_common/conversions.dart
diff --git a/tool/input_sdk/lib/html/html_common/conversions.dart b/tool/input_sdk/lib/html/html_common/conversions.dart
index 0dca4d3f0814a4636009c64959af75f194506212..de0d423258d971447938882f573cc9e49e86fd09 100644
--- a/tool/input_sdk/lib/html/html_common/conversions.dart
+++ b/tool/input_sdk/lib/html/html_common/conversions.dart
@@ -266,7 +266,7 @@ abstract class _AcceptStructuredClone {
// Conversions for ContextAttributes.
//
// On Firefox, the returned ContextAttributes is a plain object.
-class _TypedContextAttributes implements gl.ContextAttributes {
+class ContextAttributes {
bool alpha;
bool antialias;
bool depth;
@@ -275,21 +275,16 @@ class _TypedContextAttributes implements gl.ContextAttributes {
bool stencil;
bool failIfMajorPerformanceCaveat;
- _TypedContextAttributes(this.alpha, this.antialias, this.depth,
+ ContextAttributes(this.alpha, this.antialias, this.depth,
this.failIfMajorPerformanceCaveat, this.premultipliedAlpha,
this.preserveDrawingBuffer, this.stencil);
}
-gl.ContextAttributes convertNativeToDart_ContextAttributes(
- nativeContextAttributes) {
- if (nativeContextAttributes is gl.ContextAttributes) {
- return nativeContextAttributes;
- }
-
+convertNativeToDart_ContextAttributes(nativeContextAttributes) {
// On Firefox the above test fails because ContextAttributes is a plain
// object so we create a _TypedContextAttributes.
- return new _TypedContextAttributes(
+ return new ContextAttributes(
JS('var', '#.alpha', nativeContextAttributes),
JS('var', '#.antialias', nativeContextAttributes),
JS('var', '#.depth', nativeContextAttributes),
« no previous file with comments | « tool/input_sdk/lib/html/dart2js/html_dart2js.dart ('k') | tool/input_sdk/lib/html/html_common/conversions_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698